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 / Game stuck in while-loop after 1086

Author
Message
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 5th Jan 2013 15:57
First off, I compile to Android in Freedom Engine because I've got stuck in the compile process just using AppGameKit once too many times to bother again. This assumes that Freedom Engine uses 1.086 to compile the android app, which I believe it does.

I'm posting here anyway because I have two threads on the FE forum from Nov 28 that are completely unanswered.

I'm doing finishing touches to a game, but since this update it doesn't get past this stage:



It gets stuck when x# is above 20.0 and it doesn't reach a code line beyond endWhile.

It worked before, and it still works in the windows part of AppGameKit but not in FE or deployed to android by FE. Just noticed it also works with the new player broadcast from AGK. (it crashed in a new place after that instead)

After the while-loop the code goes into a Do-loop with a sync() in it. It's to "animate" the menu using physics to get a slightly different result each time you start the game.

My hovercraft is full of eels
MarcoBruti
12
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 5th Jan 2013 16:59
Try to write the condition inside parentheses:

The parser is not very sophisticated , I had problems with repeat/until for example.
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 5th Jan 2013 19:33
Thank you for you input, but it didn't help.

I think it catches when x# is > 20 because that's when the program stops working. Mind you it's not like a normal crash, it keeps playing the music but everything is just frozen in spot. It's like it doesn't move on from the loop even though the loop is done and it has stopped syncing

My hovercraft is full of eels
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 6th Jan 2013 00:00 Edited at: 6th Jan 2013 01:05
Is x# actually incrementing? Looks to me that your first block will not update x# if the double conditional fails, or something like that.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Jan 2013 00:27
I agree with JimHawkins.

This line is the only place that moves the sprite you check:


And there isn't anything in the loop that moves the menuShapes sprite.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 6th Jan 2013 02:32
x# increments as it should. Menushapes drops because it's physical and triggers menugo and menubye's movement. It all stops when x# passes 20.0 instead of leaving the loop and letting the menu finish its course and let the user interact with it.

If I could compile this with 1076 the app would be finished by now. I guess I have to spend another 2-3hrs attempting that

My hovercraft is full of eels
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Jan 2013 03:55
Why can't you compile it in v1076?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 6th Jan 2013 04:50
Does the same thing happen if you use a repeat-until loop?

Auger
12
Years of Service
User Offline
Joined: 21st Aug 2011
Location: Out There
Posted: 6th Jan 2013 05:40 Edited at: 6th Jan 2013 06:15
I think Jim and AL are correct you need to check the Y values of menuShapes. I took out your conditional check and it exited after x# was greater then 20

here's the code I used in FE




Maybe FE is is doing something strange to the Y values of menuShapes ?

[edit]

I used your original code and put a couple dummy sprites in that met your conditional checks and it seems to work fine.

Change the Y value of menuShapes to anything greater then 10 and it'll never exit the while loop

Code for FE again


Auger
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 6th Jan 2013 08:59
AL: I just have never succeeded. I've reinstalled and set up the compile environment three times and the advice I usually get after failing is "do it over again", I don't have the patience or time to keep trying, even if I know I have to make it work. It's a horrible mix of procrastination and fear of failure (waste of time)

Hodgey: I'll give it a shot thanks!

Auger: x# does reach 20 in my loop (I print it to check) because menushapes is physical and falls from above the screen

My hovercraft is full of eels

Login to post a reply

Server time is: 2024-05-06 23:00:05
Your offset time is: 2024-05-06 23:00:05