Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / White Screen?

Author
Message
AmbulanceGames
13
Years of Service
User Offline
Joined: 15th May 2010
Location: Salt Lake City, UT
Posted: 25th Sep 2011 09:41
Forgive me if this has been posted before, did a search and didn't find anything but you never know, but does anyone have any idea as to why it doesn't post the sprite I'm calling and it just gives me a white screen? Here's my code:



I had it to where it showed a background (The ADITL.png Image) before but after I changed the image in an editor and erased/re-did some of the code all I get is a white screen. Puzzling...
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 25th Sep 2011 11:06
A white sprite, means the system could not find the imagedata, please post the picturefile you are using, so we can see whats wrong with it.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Sep 2011 12:26
Another cause could be that when using the SetDisplayAspect command, sprites are usually scaled massively. Try scaling down to 25% of it's original size (you may have to go even smaller). A quick way to work out if this is the problem is to temporarily use the SetVirtualResolution command and set it to the corrensponding width and height values found in the setup.agc.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 26th Sep 2011 05:02
My moneys on the virtual res being too small. 100x100 seems a low base res. Hodgey's suggestions should fix it. I only think you get a blank sprite if you specify it as an image value of 0. If it couldn't load the image it would fail with an error(or should).

Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 26th Sep 2011 05:35
If you are seeing a white image, my guess is that the image is not being loaded. Try moving the image into just the media folder, and as Hodgey says, use a virtual resolution to test whether it loads.

But tell us how big your device size is, so we can compare that to the 100x100 sprite size.

Oh, and by the way, you should move that sprite size outside the loop, you only have to set it once. (unless you plan to change the size in the game loop)

chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 26th Sep 2011 12:58
have you put the sync() command in your game loop ? not using sync makes a white screen.

chunks.

nvidia geforce 9500gt + amd athlon 64
windows vista ultimate.
AmbulanceGames
13
Years of Service
User Offline
Joined: 15th May 2010
Location: Salt Lake City, UT
Posted: 27th Sep 2011 06:11
Well shoot...sync was the issue. Wow, I'm really sorry you guys, usually I'm not this retarded, I swear. It's just been a stressful couple of weeks at work and I've been off my game. I do have one dumb question though. DBPro I'm pretty good at, but app programming is a whole new thing to me. I just chose the basic 'landscape' project when starting this new one. That and the default 4.0/3.0 aspect should be fine for iPhones right?
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 27th Sep 2011 08:39
As soon as I saw chunks's response I was like "He's probably right".

Quote: "I just chose the basic 'landscape' project when starting this new one. That and the default 4.0/3.0 aspect should be fine for iPhones right? "

I don't think so. The display aspect is generally set to width / height which in this case would be 480 / 320 which is 3 / 2.

LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 9th Oct 2011 03:12
Hi Guys, I tried to abolish Sync() somehow and bury it in the automated engine system but it just has so many useful places to exist as you code. I guess we need this level of control

I drink tea, and in my spare time I write software.

Login to post a reply

Server time is: 2024-04-19 18:52:50
Your offset time is: 2024-04-19 18:52:50