Author Topic: Maximum Security: DT's (formerly) unnamed puzzle platformer  (Read 77987 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: DT's unnamed puzzle platformer
« Reply #60 on: November 28, 2012, 09:29:01 pm »
I'm curious as to what the method you use to make the water tiles spread out.  From what I gathered, each tile has a water level associated with it, and it spreads out to neighboring tiles, but what is the equation and algorithm exactly?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: DT's unnamed puzzle platformer
« Reply #61 on: November 28, 2012, 11:16:19 pm »
Yes, each tile is two bytes, one for the actual tile type and one for the water level. The water level byte is a number between 0 and 6, where 6 is completely filled with water. It's also used as the offset from the beginning of the sprite [000000000000FCFCFCFCFCFC] when I update the back (water) every frame. Notice a water level of 6 gives you [FCFCFCFCFCFCXX], 5 gives you [00FCFCFCFCFC], and so on:

+0 ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ⎫
+1 ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ⎬ level 0
+2 ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ⎪
+3 ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ⎪ ⎫
+4 ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ⎪ ⎬ level 3
+5 ░░ ░░ ░░ ░░ ░░ ░░ ░░ ░░ ⎭ ⎪
+6 ██ ██ ██ ██ ██ ██ ░░ ░░    ⎪ ⎫
+7 ██ ██ ██ ██ ██ ██ ░░ ░░    ⎪ ⎬ level 6
+8 ██ ██ ██ ██ ██ ██ ░░ ░░    ⎭ ⎪
+9 ██ ██ ██ ██ ██ ██ ░░ ░░       ⎪
+10██ ██ ██ ██ ██ ██ ░░ ░░       ⎪
+11██ ██ ██ ██ ██ ██ ░░ ░░       ⎭

The actual algorithm is a bit crude. I loop through each tile T, doing the following:

  • If tile T contains two or more units of water:
    • For U = T – 1 and U = T + 1:
      • Abort if tile U's water level is higher than tile T's water level
      • Abort if the block above tile U is solid
      • Loop:
        • Abort if U + 17 is solid
        • Abort if U contains water
        • U = U + 17
      • If the water level at U is not 6:
        • Increment the water level at U
      • Else (if the water level at U is 6):
        • Increment the water level at U
      • If T is not a water pipe:
        • Decrement the water level at T
      • Draw a vertical gray line from the bottom corner of T to the bottom corner of U (flowing water); side depends on whether U started as T – 1 or T + 1
  • Draw the sprite corresponding to the water level at T

(The 17s in there are because each row has 17 tiles.)

It sounds complicated, but the code for all of that (including the End statements) are just 14 lines total.

The net effect is that small horizontal segments of six pixels seem to move sideways as possible, and as far down as possible.

Notice though that this means water flows more easily to the left than to the right. I fixed that by swapping the order of I-1 every frame (one frame it starts with T – 1, the next it starts with T + 1). Yay for SMC :D
« Last Edit: June 16, 2013, 12:40:22 am by Deep Thought »




Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: DT's unnamed puzzle platformer
« Reply #62 on: May 05, 2013, 08:08:07 pm »
Lost my calculator (and all progress on this). Sorry guys :/




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: DT's unnamed puzzle platformer
« Reply #63 on: May 05, 2013, 08:09:01 pm »
You lost a calulator O.O How is that possible D:
And it sucks, it looked so awesome...... :(

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

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: DT's unnamed puzzle platformer
« Reply #64 on: May 06, 2013, 01:52:46 am »
Damn, that sucks Deep. D:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: DT's unnamed puzzle platformer
« Reply #65 on: May 06, 2013, 04:12:06 am »
You've shown us screenies before, did you only transfer the executable at that time? D:

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: DT's unnamed puzzle platformer
« Reply #66 on: May 06, 2013, 06:35:41 am »
How did you even lose your calc o.o
I'm not a nerd but I pretend:

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: DT's unnamed puzzle platformer
« Reply #67 on: May 06, 2013, 09:47:00 am »
^ that O.O I take care of mine like nothing else .__.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: DT's unnamed puzzle platformer
« Reply #68 on: May 06, 2013, 12:54:59 pm »
As Builderboy said, don't you have backups, even old ones ? :(
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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: DT's unnamed puzzle platformer
« Reply #69 on: May 12, 2013, 01:54:20 am »
This sucks. This is why I always kept my calcs on me (in a pocket if I had cargo pants or something), not even in a pencil case. That said, I lost my Nspire Clickpad keypad once, though, but it was actually in my home.

Offline Joshuasm32

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 142
  • Rating: +19/-7
    • View Profile
    • Network
Re: DT's unnamed puzzle platformer
« Reply #70 on: May 12, 2013, 04:38:30 pm »
You will probably find it unless you left it somewhere far away (i.e., on a vacation, restaurant or road-trip).  There always is the possibility that someone stole it, but let's face it: no one petty enough to steal people's stuff would steal a graphing calculator.  I will "loose" mine all the time, only to find at my house or at school.  Anyway, if you find it, I have a story-line for you:

Name: Maximum Security

Story-Line: You are a prisoner in a maximum security prison accused unjustly of some horrendous crime and are made a felon.  You escape your cell but have no weapons.  There are turrets, water, and some other crazy stuff at this place.  (The boulders could be some task that they made the prisoners do).  You have to escape using the methods you described above.  You could also theme each level (i.e., the fenced area you break through, the vent you climb through, eccetera).  Then, just for another idea for some more crazy stuff, you could put moving helicopters (with guns) and attack dogs in the game.  You could also make a game map that is an escape plan chart or something.

I wish you luck finding your calc!   ;D
« Last Edit: May 12, 2013, 04:41:27 pm by codebender »
My name is Josh and I a developer at Moonzean. I enjoy Radiohead, web development, Java, and cryptograms.
Spoiler For No Surprises, by Radiohead:
A heart that's full up like a landfill
A job that slowly kills you
Bruises that won't heal

You look so tired unhappy
Bring down the government
They don't, they don't speak for us

I'll take a quiet life
A handshake of carbon monoxide

And no alarms and no surprises
No alarms and no surprises
No alarms and no surprises
Silent, silent

This is my final fit
My final bellyache

With no alarms and no surprises
No alarms and no surprises
No alarms and no surprises please

Such a pretty house
And such a pretty garden

No alarms and no surprises
No alarms and no surprises
No alarms and no surprises please

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: DT's unnamed puzzle platformer
« Reply #71 on: May 12, 2013, 04:41:36 pm »
Epic name, epic story, well deserved +1 :thumbsup:

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: DT's unnamed puzzle platformer
« Reply #72 on: May 13, 2013, 05:06:35 am »
I agree! Now if only Deep Thought can find his calc!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: DT's unnamed puzzle platformer
« Reply #73 on: May 13, 2013, 03:24:54 pm »
Agreed.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: DT's unnamed puzzle platformer
« Reply #74 on: May 13, 2013, 07:34:44 pm »
To be honest, calc theft is entirely possible depending of the area he lives in. Over here I think there were about 10-20 calc thefts a year at school. Thieves just re-sold them at flea markets/lists/different school afterward.
« Last Edit: May 13, 2013, 07:35:31 pm by DJ Omnimaga »