flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Snake: The Dark Descent
Hahahahhaa, finally I get what your talking about now XD Nice work!
|
|
11-03-2011, 06:17 AM |
|
Brute
Member
Posts: 197
Threads: 10
Joined: Aug 2011
Reputation:
3
|
RE: Snake: The Dark Descent
First Tetris TDD and now Snake TDD?
I this community!
|
|
11-03-2011, 07:28 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: Snake: The Dark Descent
The animation is simply an infinitely loop; a function which calls itself on a timer. The timer's duration is a global variable so I can change it with power ups and such, or simply to debug by watching it slowly.
Since the grid consists of 800 units, it's not very efficient to use a for loop or to try and track which grid units should be lit/unlit and other data. The data structure would be huge...I tried that approach but I ended up with an 800 member array, and each member was an array of 7 or 8 variables (direction, lit/unlit, and some more variables I can't think of off the top of my head). Instead, I just activate the grid light which is the snake's head position, and create a timer whose duration increases as the snake's length increases, which in turn deactivates the grid light. It's really quite a simple approach, and makes checking for the snake's head-to-body collisions fairly simple.
|
|
11-03-2011, 08:15 AM |
|
RawkBandMan
Posting Freak
Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation:
5
|
RE: Snake: The Dark Descent
Is it weird I thought Snake meant that guy from Metal Gear Solid?
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
|
|
11-07-2011, 03:28 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: Snake: The Dark Descent
Haha RockBandMan, that would be called Metal Gear: The Dark Descent.
|
|
11-07-2011, 08:18 AM |
|
Juby
Senior Member
Posts: 290
Threads: 2
Joined: May 2011
Reputation:
5
|
RE: Snake: The Dark Descent
(11-07-2011, 08:18 AM)palistov Wrote: Haha RockBandMan, that would be called Metal Gear: The Dark Descent. Ahem
Metal Gear Solid 5: The Dark Descent
Insanity. Static.
|
|
11-07-2011, 02:02 PM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: Snake: The Dark Descent
Haha. But I mean, if you think about it....Amnesia has a MGS feel to it. Except in Amnesia you can't kill the grunts if they spot you >_>
|
|
11-07-2011, 07:01 PM |
|
Arvuti
Senior Member
Posts: 468
Threads: 10
Joined: May 2010
Reputation:
17
|
RE: Snake: The Dark Descent
(11-07-2011, 07:01 PM)palistov Wrote: Haha. But I mean, if you think about it....Amnesia has a MGS feel to it. Except in Amnesia you can't kill the grunts if they spot you >_>
Uh..Amnesia has a MGS feel to it ? I don't really see how amnesia has anything to do with MGS. Calling a game like Deus Ex Human Revolution a game what has MGS feel to it, sure I agree with that but amnesia..Uh my brain hurts now.
(This post was last modified: 11-07-2011, 07:05 PM by Arvuti.)
|
|
11-07-2011, 07:05 PM |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
RE: Snake: The Dark Descent
Actually it has nothing to overthink. You just hide, I'm sure you are able to see this.
|
|
11-07-2011, 08:26 PM |
|
RawkBandMan
Posting Freak
Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation:
5
|
RE: Snake: The Dark Descent
Progress Report?
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
|
|
01-16-2012, 02:11 AM |
|
|