Author Topic: My Helicopter Game  (Read 11077 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: My Helicopter Game
« Reply #15 on: April 24, 2011, 07:57:41 am »
@Fast_Crash: Thanks much. I'll try that.

Offline Fast Crash

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 192
  • Rating: +45/-7
  • Virus of tomorrow
    • View Profile
Re: My Helicopter Game
« Reply #16 on: April 24, 2011, 08:23:04 am »
Add the Pixels-Test after the "Dispgraph" too ( if the player hits a wall )

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: My Helicopter Game
« Reply #17 on: April 24, 2011, 08:28:57 am »
Code: [Select]
.HELI
DiagnosticOff
29->Y
Repeat getkey(15)
If getKey(1)
Y-2->Y
End
Y-1->Y
.I always decrease Y by 1 because a helicopter has to fall
Pt-On(X,Y,[sprite])
Dispgraph
Pt-Change(X,Y,[80C0E0F0E0C08000
.LOSING CODE
If pxl-Test(X,Y+7)
Return
End
If pxl-Test(X,Y-1)
Return
End
.END OF LOSING CODE
Horizontal -
End

I guess all I have left is displaying the tunnel.

Offline Fast Crash

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 192
  • Rating: +45/-7
  • Virus of tomorrow
    • View Profile
Re: My Helicopter Game
« Reply #18 on: April 24, 2011, 09:11:35 am »
More optimized :

Code: [Select]
...
.LOSING CODE
If Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)
Return
End
.END OF LOSING CODE
...

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: My Helicopter Game
« Reply #19 on: April 24, 2011, 09:25:34 am »
More optimized :

Code: [Select]
...
.LOSING CODE
If Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)
Return
End
.END OF LOSING CODE
...

Good idea.
« Last Edit: April 24, 2011, 09:26:23 am by Scout »

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: My Helicopter Game
« Reply #20 on: April 24, 2011, 09:36:29 am »
More optimized :

Code: [Select]
...
.LOSING CODE
If Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)
Return
End
.END OF LOSING CODE
...

is + smaller than OR? I never even thought about that comparison...If so, then I may have some optimizing to do (I needed a LOT of conditions)
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: My Helicopter Game
« Reply #21 on: April 24, 2011, 09:38:33 am »
More optimized :

Code: [Select]
...
.LOSING CODE
If Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)
Return
End
.END OF LOSING CODE
...

is + smaller than OR? I never even thought about that comparison...If so, then I may have some optimizing to do (I needed a LOT of conditions)

+ doesn't mean or remember.

However, here's my study:
Size of program with +: 723bytes
Size of program with or: 725 bytes
Size of program with two if blocks: 726 byes

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: My Helicopter Game
« Reply #22 on: April 24, 2011, 09:40:24 am »
More optimized :

Code: [Select]
...
.LOSING CODE
If Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)
Return
End
.END OF LOSING CODE
...

is + smaller than OR? I never even thought about that comparison...If so, then I may have some optimizing to do (I needed a LOT of conditions)

+ doesn't mean or remember.

However, here's my study:
Size of program with +: 723bytes
Size of program with or: 725 bytes
Size of program with two if blocks: 726 byes

I am aware that + doesn't mean or, but it works just fine for the purposes I have. I had always just assumed or was smaller. It's good to know that there are more optimizations to be done :D
« Last Edit: April 24, 2011, 09:40:42 am by ZippyDee »
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Tgooseman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 17
  • Rating: +1/-0
    • View Profile
Re: My Helicopter Game
« Reply #23 on: May 22, 2011, 12:15:42 pm »
So now that track is finally done I could actually work on my first game some more. I even made a screen shot .gif thing. It is pretty crappy but you get the basic idea.  I plan on adding difficulties (higher brick frequency, faster) and making it look a lot better.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: My Helicopter Game
« Reply #24 on: May 23, 2011, 02:59:22 am »
The image provided by that emulator is not very good, perhaps you could use Wabbitemu (Windows and Mac only though).

Either way, nice to see you managed to make it.

Offline Tgooseman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 17
  • Rating: +1/-0
    • View Profile
Re: My Helicopter Game
« Reply #25 on: May 23, 2011, 10:06:31 pm »
I tried using calc capture but with a wabbitemu configuration. Maybe I just didn't do it right?

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: My Helicopter Game
« Reply #26 on: May 23, 2011, 11:04:06 pm »
You don't need to use calccapture because WabbitEmu can take recordings itself :D
It's configurable in the options, and you can start it by right-clicking on the screen and choosing the appropriate option or by pressing the backspace key (hopefully).
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Tgooseman

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 17
  • Rating: +1/-0
    • View Profile
Re: My Helicopter Game
« Reply #27 on: May 23, 2011, 11:23:31 pm »
Well that is great to know for future use. Thanks!

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: My Helicopter Game
« Reply #28 on: May 23, 2011, 11:26:17 pm »
Always willing to help :)
Also, by the screenshot it seems to work rather well, so congrats on your game! ;D
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: My Helicopter Game
« Reply #29 on: May 25, 2011, 04:42:01 am »
Looks nice. I like how this one has blocks instead of just a tunnel. It makes it different from all other helicopter games. Congrats on your first game. :)