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 / Move up two sprite at same time

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 6th Nov 2015 17:55 Edited at: 6th Nov 2015 18:12
Hi.

I made a duck shooter game that when Timer< 15, once duck move up.
Now I want when Timer > 15 Two Duck move up, but ducks move up One by one.

This is my project.

https://www.dropbox.com/s/5ww38s7imyt98g6/Duck%20Shooter.zip?dl=0

Please Guide Me.

Thanks.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 6th Nov 2015 18:04
Nothing attached.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 6th Nov 2015 18:12
sorry, fix it.
my internet have Problem.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 7th Nov 2015 04:15
Here's your starter for ten:

Timer() returns the length of time since the app started. so t#=timer() would set t# to the length of time the app has been running for. Timer() on its own is doing absolutely nothing for your app apart from wasting CPU.

In your code, you have two sections as follows:


These can both be re-written as:



You have a comment: //Repeat Random if Rand1 = Rand2
but then you don't repeat... you just try one more time. What if it is the same result again the 2nd time around? Instead you need:



There's too much wrong with your code. A complete re-write would be easier than trying to fix it. In fact, I have done just that. A simple duckshoot game in 48 lines of code with increasing difficult over time (more ducks to shoot, and they get faster). It's actually quite neat so I think I'll work on it a little more.

Good luck with yours man!
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 7th Nov 2015 04:42
Thanks CJB for Guide.
Grook
AGK Backer
12
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: Lancashire, England
Posted: 7th Nov 2015 09:15
Whoosh!
"It is said that your life flashes before your eyes just before you die. That is true, it's called Life.”
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 8th Nov 2015 09:26 Edited at: 8th Nov 2015 13:34
@CJB

This is my simple duck shooter code. without Functions is 52 Line:



do you have better idea for check timer automatically and increase MaxDuck value? (Below code)



Thanks.
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 9th Nov 2015 07:41
I fix it. if there is any problem I ask here.

Login to post a reply

Server time is: 2024-11-17 00:07:05
Your offset time is: 2024-11-17 00:07:05