@hpsoft how was the update process?
sorry i would say the information on the top, not the buttons
for the update, i have deteled the xfc app and download it again, i’ve just changed the name xfctest
Oops mistake again. Sorry I’ll correct this now. (when working, i update XFCtest project to avoid erasing my current version by error… But before publishing i must change it back. Forgot. Grrrrr).
I have uploaded a new 1.1 version with XFC as the project name
thanks for sharing. i have a question. in your program streetview you can update photos.
but is it possible to load image of a website ( for exemple my website ) not in the setup function but in draw function, i need for some projects. thanks
First i cant believe i m so dumb: i uploaded the wrong version (1.0). Hopefully it is finally corrected: the link is to v1.1, with XFC as project name. Reload again if you updated (sorry).
Concerning streetview: you can load anything, as long as you have the adress. But then you dont want to use the google API. You can look at another program i posted, the one with house pictures. These pictures are simply links to my website. If you want to update in he draw, you simply have to be careful you send the request only once, and not 60 times per s!
i will see thank you
Btw I can’t use air code because codea crash, so i 'll work in a new iPad (mini)
for exemple how can i transform code to load image in draw function and not in setup in this code
displayMode(FULLSCREEN)
function setup()
img=nil
http.get('http://www.econologie.com/photo/fun_tableau_mendeleiev.jpg',didGetImage)
end
function didGetImage(theImage,status,head)
img=theImage
end
function draw()
background(20,20,40)
if img ~= nil then
spriteMode(CORNER)
sprite(img,0,0,1024,768)
end
end
thanks
it works now
displayMode(FULLSCREEN)
function setup()
img1, img2, img3 = nil, nil, nil
load1=0 ; load2=0 ; load3=0
end
function didGetImage1(theImage1,status,head)
img1=theImage1
end
function didGetImage2(theImage2,status,head)
img2=theImage2
end
function didGetImage3(theImage3,status,head)
img3=theImage3
end
function draw()
background(20,20,40)
if load1==0 then
http.get('http://www.econologie.com/photo/fun_tableau_mendeleiev.jpg',didGetImage1)
load1=1
end
if load2==0 then
http.get('http://m.ruvr.ru/2012/11/10/1275764296/kinopoisk.ru-Marilyn-Monroe-42462.jpg',didGetImage2)
load2=1
end
if load3==0 then
http.get('http://www.mrwallpaper.com/wallpapers/Gullwing-Ferrari-F340.jpg',didGetImage3)
load3=1
end
if img1 ~= nil then
spriteMode(CORNER)
sprite(img1,0,0,512,384)
end
if img2 ~= nil then
spriteMode(CORNER)
sprite(img2,513,385,512,384)
end
if img3 ~= nil then
spriteMode(CORNER)
sprite(img3,0,385,512,384)
end
end
You’ve got the idea!
Update 1.2 : i have added the possibility to load a beta version, so people can easily revert to last stable version if they dont want problems.
@Jmv38 I’ve looked at your frame rate code and it’s certainly far, far better than the fps = .9*fps + .1/DeltaTime
one so I hope that we can finally consign that one to /dev/null
!
But it still is only measuring over discrete time intervals, rather than a rolling computation which would always measure over the last dt seconds or n frames.
@Jmv38, for some reason it is still not working for me.
Try this code out.
function draw()
background()
--resetStyle() --uncomment this line.
font("AmericanTypewriter")
fontSize(30)
textMode(CORNER)
text("XFC Test", 0, HEIGHT/2)
spriteMode(CORNER)
sprite("Cargo Bot:Clear Button", 0, HEIGHT/2 - 200, 200, 150)
end
Does the text disappear after the options pop up? For me it does. The sprite is also drawn as if noSmooth was called.
For some reason, XFC makes every sprite in my game very pixelated, but removing it returns the sprites to normal
@CodeaNoob good point, i use nosmooth() to be faster and nicer, i should manage to revert. If i cant you can still write smooth() at the beginning of your draw