SOLVED Add "3D" Perspective/Depth to 2D Platformer

J

JacobSyndeo

Guest
Hey,

I'm making a sidescrolling 2D platformer similar to what you would find on a Game Boy Color or GBA. I'm pretty new to GameMaker and game development in general, but I have about a decade of experience with mobile app development and general software engineering.

Progress has been going quite well, with gameplay and "physics" running how I want. However, I'm now wondering if I could my game look a bit more modern than what I was basing it on. I'd like to go about altering the way the game is presented, how it's drawn to screen essentially, while keeping the underlying physics/collision logic constrained to two dimensions.

A much-more detailed (and way out-of-scope for GameMaker) example of what I'm after is what Shantae: 1/2 Genie Hero did:
19aad970946e3cd32ce6468932b053c3.jpg
2D characters in "3D" environments, but unlike Paper Mario, the characters are constrained to X/Y movement.

A much closer example of what I'm after (and one I think GameMaker may be able to do) is demonstrated in the 3dSen NES emulator, which basically takes 2D square sprites and renders them onto 3D cube blocks, giving the game environments a sense of depth:
mm1.jpg
mm2.jpg
(Ignore the more advanced voxel stuff on the characters and other sprites; that's out of scope here—my main focus is the blocks that make up the stage. I want my characters and such to remain 2D sprites, for the time being at least.)

Now, I found a few tutorials on how to do this sort of thing in GameMaker, but they all depend on D3D functions (e.g. `d3d_draw_block`, none of which are present in current versions of GMS. ☹

Is there a good way to go about this in GMS2? I imagine it'd be code inside of my block object's draw event, but any help on this front would be hugely appreciated.

(I've invested a couple hundred dollars into GMS by now for licenses and maybe $60 of content from the marketplace, not to mention nearly 100 hours of development thus far, so I hope that wasn't a bad investment vs. just going with Unity or something. I know GameMaker is 2D, but I was under the impression it could do basic 3D fairly easily as well, as long as gameplay is kept to 2 dimensions.)
 
Last edited by a moderator:
D

Deleted member 13992

Guest
I don't have experience in the 3D stuff in gamemaker, but I'm under the impression that it *can* do 3D as long as you design the rendering code yourself. There are a few things to help you out, but it's not as straightforward as dropping 3D objects in a world using the room editor. I've seen some pretty cool 3D demos made my the community using this, but I think they had to do a lot of the engine/rendering legwork themselves. I'll let someone else elaborate further (or correct me if I'm wrong).

I'd be interested to see what you (or this thread) come up with. I do a sort of 3D effect on my platformer, but it's by manipulating parallax layers in an unconventional way to simulate perspective and depth "scaling". I do not turn my foreground playable area into blocks, unfortunately.

There might be a way to do something this using sprite stacking (search gms sprite stacking on youtube). It's a hack (think of turning sprites into voxels), but it produces results if you're good.


(not my video, I have not tried this personally)
 
J

JacobSyndeo

Guest
I'd be interested to see what you (or this thread) come up with. I do a sort of 3D effect on my platformer, but it's by manipulating parallax layers in an unconventional way to simulate perspective and depth "scaling". I do not turn my foreground playable area into blocks, unfortunately.
Dang, I've gotta say I love the aesthetic on this. Very nice job; that reverb sounds really nice in my headphones, and the rope physics are great. Any plans to finish/release this?

Not exactly 3D, but this method of turning 2D into psuedo 3D might be useful - https://www.yoyogames.com/en/blog/utilizing-3d-cameras-in-2d-games
I actually started by following this guide with mine, and loved the result so much that I wanted to go deeper! (pun intended)

Matharoo has a very nice tutorial explains that :)
Boom, this looks perfect! Not sure why I didn't see this one sooner, but it looks to be exactly the sort of guide that can get me most of the way to my destination. Thanks so much!
 
Top