Author Topic: Iron Pants - ClrDraw  (Read 7610 times)

0 Members and 1 Guest are viewing this topic.

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Iron Pants - ClrDraw
« on: February 17, 2014, 07:01:02 am »
Iron Pants - ClrDraw



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=892

From the makers of Flappy Bird comes the infinitely more frustrating sequel, Iron Pants. Use the enter key to dodge the crates for as long as you can.

Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline nspireguy

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +11/-6
    • View Profile
    • NspireGuy
Re: Iron Pants - ClrDraw
« Reply #1 on: February 17, 2014, 08:51:11 am »
this is so awesome! good job!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Iron Pants - ClrDraw
« Reply #2 on: February 17, 2014, 12:08:26 pm »
yup, nice game :)
« Last Edit: February 17, 2014, 12:08:33 pm by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: Iron Pants - ClrDraw
« Reply #3 on: February 17, 2014, 12:17:53 pm »
Looks nice, actually it seems better than Flappy Bird. Just try to not release 8000 clones of flappy bird though O.O

Offline bb010g

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 428
  • Rating: +22/-1
  • I do stuff
    • View Profile
    • elsewhere on the net
Re: Iron Pants - ClrDraw
« Reply #4 on: February 17, 2014, 12:18:32 pm »
Nice job!
Also, if we're doing Flappy Bird clones, I wouldn't mind a Maverick Bird clone.
« Last Edit: February 17, 2014, 12:18:51 pm by bb010g »
Arch Linux user
Haskell newbie | Warming up to Lua | Being dragged into C++
Calculators: HP 50g, HP 35s, Casio Prizm, TI-Nspire CX CAS, HP 28s, HP Prime, Mathematica 9 (if that counts)
π: 3.14...; l: 108; i: 105; e: 101; l+i+e: 314
THE CAKE IS A LIE IS A PIE

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Re: Iron Pants - ClrDraw
« Reply #5 on: February 17, 2014, 04:39:16 pm »
Looks nice, actually it seems better than Flappy Bird. Just try to not release 8000 clones of flappy bird though O.O
Don't worry this should be my last game from Dong Nguyen.

Quote
Nice job!
Also, if we're doing Flappy Bird clones, I wouldn't mind a Maverick Bird clone.
I just played that game, it's pretty addicting (and far more difficult than flappy bird)! Did you make it?
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Iron Pants - ClrDraw
« Reply #6 on: February 17, 2014, 05:28:41 pm »
You could maybe make Iron Pants so that you can choose which game mode you want. Basically, multiple Flappy Bird clones into one. :P

Offline bb010g

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 428
  • Rating: +22/-1
  • I do stuff
    • View Profile
    • elsewhere on the net
Re: Iron Pants - ClrDraw
« Reply #7 on: February 18, 2014, 12:37:07 am »
Quote
Nice job!
Also, if we're doing Flappy Bird clones, I wouldn't mind a Maverick Bird clone.
I just played that game, it's pretty addicting (and far more difficult than flappy bird)! Did you make it?
It's not mine, but Terry Cavanagh's. He's awesome.
Arch Linux user
Haskell newbie | Warming up to Lua | Being dragged into C++
Calculators: HP 50g, HP 35s, Casio Prizm, TI-Nspire CX CAS, HP 28s, HP Prime, Mathematica 9 (if that counts)
π: 3.14...; l: 108; i: 105; e: 101; l+i+e: 314
THE CAKE IS A LIE IS A PIE

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Iron Pants - ClrDraw
« Reply #8 on: February 19, 2014, 06:17:01 am »
Nice job!
Also, if we're doing Flappy Bird clones, I wouldn't mind a Maverick Bird clone.
That is looking cool!

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Iron Pants - ClrDraw
« Reply #9 on: February 19, 2014, 02:12:28 pm »
Some random optimizations I saw when looking at your code.

At the beginning, you have (among other affectations)
0→B
0→G

which can be optimized as 0→B→G

Below, you have
Repeat (getKey) and (getKey(9))
 If getKey(15)
  Goto END
 End
End

which can be written without external parentheses around "getKey", and I also think that
While 1
End!If getKey-9 and (-6→r1)
!If r1
 Goto END
End

works the same but is better.

If A>4000
0→A
0→B
End

can be written
If A>4000
 and 0→A→B
End

because A>4000 equals one if we enter the If, and 1<256 so A>4000 and 0 equals 0.

If getKey(9)
B--
Else
B++
End

can be written getKey(9)?B--,B++ to be more readable, but that doesn't save any space once compiled. But I am sure something like getKey(9)*2-1*~1+B→B can be done. I didn't try though. Note that "~" is the "little minus" sign.

If C=~16 saves space if written !If C+16.
Same for If D=~16.

I am pretty sure that If (C>65527) or (C<19) is the same as If C+9<28.

(A/5)<(F+31) is the same as A/5-F-32<0 but this one doesn't have to save a calculation to recall it later.

In this,
r3/10→r3
End!If r3

You don't have to put "r3" after "End!If".

Return
Return

???

I didn't try this one (same for the others in fact :P) but I think that [/tt]{Y1}-G<0[/tt] is more optimized than G>({Y1}).

Here,
If G>({|Y1})
 SCORE(41,49,G)
Else
 SCORE(41,49,{|Y1})
End
DispGraph
If G>({|Y1})
 DelVar "|vIrnPants"
 GetCalc("|vIrnPants",14)->r1
 G->{r1}
 Archive "|vIrnPants"
 GetCalc("|vIrnPants",|Y1)
Else
 Pause 1000
End
DispGraph

You put two times the same If. Either get everything in one, or at least save the result of the calculation in a var and make on If with the calculation, the other one with the var.
I also don't get why there are two DispGraph, both outside all If.

That's all I saw :P
And once again, I didn't try them, so don't put them all at once, try them one after each other, separately, and be sure that one has not broken anything before trying another ;)

I also noticed that, at the very beginning:
...
A y value
B accel
C counter 1
D counter 2
E pipe 1
F pipe 2
G score
...

You know, you can use variables with custom names in Axe. You just have to do pointer_to_two_bytes_ram_area→°Name_of_var, like for example
L5→°Acceleration
L5+2→°Speed

and then you can do Acceleration+Speed→Speed and whatever you want (just be sure in that case to clean L5 at the end of your program, with a ClrHome).
You can also do °E→°Pipe to rename the E var into Pipe (and then, if you do Pipe after a 1→E, you'll get 1).
« Last Edit: February 19, 2014, 02:31:13 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline TheCoder1998

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 434
  • Rating: +20/-2
  • my art is written in code, not in graphite
    • View Profile
    • My website :D
Re: Iron Pants - ClrDraw
« Reply #10 on: February 19, 2014, 02:29:54 pm »
this game is so %&#@!$@ hard!  :mad:

but great job at programming it  :thumbsup:
my ticalc acc:

http://www.ticalc.org/archives/files/authors/113/11365.html

Spoiler For The Best Song Ever:


follow me on tumblr :)
www.rickdepizza.tumblr.com

check out my anilist :D
http://anilist.co/animelist/29701/Rickdepizza

Offline ClrDraw

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 627
  • Rating: +61/-2
    • View Profile
    • GitHub
Re: Iron Pants - ClrDraw
« Reply #11 on: February 19, 2014, 10:46:47 pm »
Woah Hayleia, thank you so much! O.O I'm definitely gonna do that this weekend, and put you in the credits. Wow, that's so much Axe I never knew  *.*
Visit my GitHub for all my TI programs as well as other projects.
Also check out my website.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Iron Pants - ClrDraw
« Reply #12 on: February 20, 2014, 02:13:12 am »
Np, but as I said, don't put them all at the same time but try them one after the other, and keep a backup of your old source, because there are chances some of my "optimizations" don't work. And that's not because I said "I'm not sure" to some of them that I am sure for the other ones :P
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s