Author Topic: Meishe91's Tunnel  (Read 7466 times)

0 Members and 2 Guests are viewing this topic.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Meishe91's Tunnel
« on: September 21, 2010, 04:03:58 am »
This isn't anything to spectacular or anything, just thought it might be a cool little thing to make real quick. To see what I could come up with and how small I could make it on a "just go with it" type of thing. I think it turned out pretty well. But like I said, it's nothing special. Just another homescreen tunnel game.

Object of the game is pretty simple: don't hit the walls. As you progress the walls continually get closer together. Shouldn't be any bugs that I know of. Only thing is that don't try to go off screen before you reach the tunnel :P I have no edge code built in since it really isn't needed (I don't think you can reach the edge anyways). Um, ya. Think that's about it. Score is at the bottom. Have fun and enjoy :) Tell me what ya think.

Oh ya, it's only 304 bytes. Tried to keep it under 300 but failed to do so. I optimized it the best I could but if anyone sees any, if you go looking through the code, let me know and I'll change it :)




Note:
Just noticed that in the screenshots you can see the score on the seventh line just barely. On a calculator you can't see it, or very barely can.
« Last Edit: September 21, 2010, 11:13:55 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Meishe91's Tunnel
« Reply #1 on: September 21, 2010, 04:11:57 am »
Nice, pretty small indeed. The roads are generated as the game progresses, right? It seems kinda fast. I could not get better than 4 fps on a regular 83+ on a tunnel

Offline coolsnake

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
    • View Profile
Re: Meishe91's Tunnel
« Reply #2 on: September 21, 2010, 08:10:34 am »
score: 1269 ^^
Fun game!
Unpretty Integrals
This program gives you a graphical representation of the "fnint(" function, which allows you to calculate definite integrals. It is extremely similar to the functionality MathPrint provides, minus the extreme bloat that slows your calculator down to a crawl.

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Meishe91's Tunnel
« Reply #3 on: September 21, 2010, 09:45:18 am »
basic skillage!
nicely done there

Offline Broseph Radson

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 295
  • Rating: +20/-1
  • Its 0x1A4 somewhere
    • View Profile
Re: Meishe91's Tunnel
« Reply #4 on: September 21, 2010, 10:00:37 am »
Nice! :D

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Meishe91's Tunnel
« Reply #5 on: September 21, 2010, 03:01:45 pm »
Thanks guys :)

@DJ
Ya, the road is generated as it goes.

On another note, I realized there is one possible bug, but not very likely to happen.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Meishe91's Tunnel
« Reply #6 on: September 21, 2010, 03:14:21 pm »
What would be the bug?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Meishe91's Tunnel
« Reply #7 on: September 21, 2010, 05:14:07 pm »
When the tunnels shrink there could be a spot that looks like this:

Code: [Select]
XXX______XXXXXXX
XXXX______XXXXXX
XXXXX______XXXXX
XXXXXXX_____XXXX ←
...

In theory you might be able to get into that extra "X" but it wouldn't really give you any advantage, or at least not in the long run. I don't think it's really big enough to fix but if people really want it to be I can.

There is actually an example of that type of wall in the monochrome screenshot.

Edit:
By the way, for those of you who were wondering what the levels are:

Six: 0-50
Five: 51-200
Four: 201-800
Three: 801-3200
Two: 3201-12800
One: >12800

Also, my high is 2441, who can beat it? :P
« Last Edit: September 21, 2010, 05:33:38 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Meishe91's Tunnel
« Reply #8 on: September 21, 2010, 06:53:38 pm »
Ah i see, so it only checks to see if your position is equal to the wall?  Why not just say less and or equal to and it could be fixed easily?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Meishe91's Tunnel
« Reply #9 on: September 21, 2010, 09:30:40 pm »
Oh, hmmm, never even thought of that :P Ya, that would fix it. Thanks :) I'll post a updated version soon.
« Last Edit: September 21, 2010, 09:34:12 pm by meishe91 »
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Meishe91's Tunnel
« Reply #10 on: September 21, 2010, 09:31:57 pm »
Heh sounds good :) Sometimes the simplest solutions are the best ^^ Although not always the most obvious

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Meishe91's Tunnel
« Reply #11 on: September 21, 2010, 09:35:45 pm »
Well actually it isn't as simple as that apparently :(
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Meishe91's Tunnel
« Reply #12 on: September 21, 2010, 09:38:48 pm »
:( Oh noo whats going wrong?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Meishe91's Tunnel
« Reply #13 on: September 21, 2010, 09:44:09 pm »
I don't know. Well...actually I do now that I think about it. It checks the list element that lines up with the first row. So since those are zero at first it is saying it is larger than the right wall point, therefore ending the program.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Meishe91's Tunnel
« Reply #14 on: September 21, 2010, 09:54:35 pm »
yeah.. i just scored 500 by placing the cursor at the right side of the screen and then forgetting about it for a bit. anyway; here's a 295 byte version:
Code: [Select]
:DelVar {L1}16→dim({L1}
:1→B
:6→S
:5→A
:8→X
:10→W
:5W→J
:DelVar H1→L
:For(F,0,6
:Disp "
:End
:Repeat 0
:X+sum(DeltaList(getKey={24,26→X
:"**************
:Disp sub(Ans,1,A)+sub("      ",1,S)+sub(Ans,1,W-A
:min(W-1,max(1,A+randInt({-}1,1→A
:Ans→{L1}(L
:17-W+Ans→{L1}(L+1
:Output(1,X,"V
:Output(8,1,H
:If X={L1}(L+2-16(L=15)) or X={L1}(L+3-16(L=15
:Stop
:L+2
:Ans-16(Ans=17→L
:H+B→H
:If Ans>J
:Then
:max(1,S-1→S
:min(14,W+1→W
:4J→J
:B+1→B
:End
:End

all i did was eliminate the need for Str1 by replacing it with ans, changed a few things to Ans (speed optimization) and added getKey as part of the movement code statement.

by the way.. if you can get collision detection to work without the list, you'll save a ton of memory.

edit: it'd be really cool if you had a snippet of inline ASM to get the byte at which the V is. then it's not pure basic.. but still. otherwise you need a  112 external string variable... and managing that would be slow and memory consuming. it'd be slower, but i suggesting instead of using Disp, using Output. it makes collision detection so much simpler.
« Last Edit: September 21, 2010, 10:06:46 pm by nemo »