Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1370288 Posts in 64455 Topics- by 56510 Members - Latest Member: MariamThomson

December 10, 2019, 09:39:22 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignMovement in grid platformers (or cinematic platformers)
Pages: [1]
Print
Author Topic: Movement in grid platformers (or cinematic platformers)  (Read 203 times)
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« on: September 07, 2019, 11:19:19 AM »

I have a feeling I made this topic already but search yield nothing so maybe I'm just crazy.

There is a set of games I like to call grid platformers. Some people call them cinematic platformers but I feel that term encompasses a lot more games, plus that term is silly and I hate it. So the games that really fit this description are surprisingly few: flashback and blackthorne. Prince of persia and others are surprisingly not limited to a grid!

I have been thinking about how to implement a grid platformer lately. I noticed both these games I mentioned have a slated camera angle, which I thought was intriguing but didn't give it a second thought. Until I tried implementing my own system. See, if you partition the screen into a grid of cells where the player can move into. Whenever you are standing on a corner, the slant perspective makes it look like you are standing on ground, it's a clever optical illusion. Jumping to platforms straight up also looks better with the slant perspective.






Anyway, I though this was interesting and decided to share. I'm making a pico-8 prototype, but super mega simple. Not even animations, it will look like chess pieces moving around. This topic has little to do with my current problems Tongue
« Last Edit: September 07, 2019, 11:26:56 AM by diegzumillo » Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #1 on: September 07, 2019, 01:27:13 PM »

Since I made this topic might as well keep it going with additional thoughts.

My first instinct when coding this was to come up with a simplified representation of the level in a matrix. For example
0 1 1 1
1 1 0 1
1 1 1 1
each index represents a cell the character can stand on. If the above cell is 1 and its neighboring cell is 0, then you can jump to it. But how to make walls? oh yeah, maybe we need additional information. Should I use the same matrix or create some kind of adjacency matrix defining how each cell is connected as well? What if I need more information in this matrix, like doors, objects, enemy placement etc? Let's break each element of the matrix into bits and blalbalba

I keep following this line of thinking for a while until I become mentally overwhelmed. For a quick prototype this might not be necessary. I can just use a tilemap and just use a bunch of if statements to ask what's underneath the player and always move by the same increments.

When performance becomes an issue, or more complex calculations need to be performed on the game grid, then I can make this matrix thing calculated from a tilemap. In any case, level design will be on the tilemap, not on an abstract matrix.

I wonder how the basic mechanics were implemented in those original games.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic