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.

Author
Message
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 19th Jan 2013 21:23 Edited at: 19th Jan 2013 23:33
________SOLVED__________

Hello fellow AppGameKit developers

Whilst working on a project with a friend, I have encountered a bug which is really annoying. Basically, on the mainmenu of our game, I have added some animations of weather ( rain + snow ) so I have these hooked up to a random value which decides which weather is faded in/out and shown. Problem is that I must call the
command after each step of 'fade', this causes that I cannot click/interact with my buttons when the weather is fading in/out.

If anyone knows how to bypass this annoying problem, I would be greatful! I have uploaded the project, with the necessary files. Feel free to test it and .ect ... Although donot steal any graphics/names. Especially the effects graphics since they are rendered in a program which I have bought... So you will have Copyright issues if you use them without a liscence.

//Anton

EDIT: SOLVED - files removed
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Jan 2013 22:16
We don't need to see the entire project. At this point.

Please, what version of AppGameKit are you using.

If you could just post the code around the sync() statement, whatever the outermost if/while sort of bit.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 19th Jan 2013 22:18
Its not that much code, but sure:


I am using version 107.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Jan 2013 22:23
I have a suspicion that your project isn't quite set up right.

You have "main.agc" being included by your file and that is not right.

main.agc may include lots of other files, but you should NOT include it in other files.

It is the main.agc file that is the head of the compile loop and you are probably including things in a strange way, based on the posted sample.

Now, can you show how you are using the two functions posted.

But first try removing the include statement for main.agc and see what impact that has.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 19th Jan 2013 22:41
Ok, I understand. I have put as much code as possible out of the main.agc, to keep it clean. I have pritty much 95% of the code in corresponding .agc files. I removed all #includes to "main.agc"... no difference (I had to move some values around but thats it)

I call the functions like this in a sub which is ran indirectly in the DO LOOP:
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 19th Jan 2013 22:52
What do you have your syncrate set to?

The loops you are running will keep the app from responding to touches/clicks because you aren't checking them in the functions.

And only the very last one will be picked up in your main loop.

So for 256/framerate time, your app is not going to respond to user inputs.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 19th Jan 2013 22:55
The sync rate is 60... So I need to add the checking for clicks/interaction in the functions aswell?
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 19th Jan 2013 23:34
Thanks for the help, all I needed to do was have the checking for interaction with the buttons running in the functions aswell!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Jan 2013 04:57
Always glad to help.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paronamixxe
AGK Bronze Backer
12
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 20th Jan 2013 11:21
thanks

Login to post a reply

Server time is: 2024-05-03 22:31:29
Your offset time is: 2024-05-03 22:31:29