Join us on Discord!
You can help CodeWalrus stay online by donating here.

First person 2d platformer

Started by guicrith, June 13, 2015, 02:49:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

guicrith

The project has just been started and I cant find any good tutorials on how to rotate and move the camera for 3d rendering.(I still need a camera for projecting 2d to 1d)
I only know math up to geometry no trig.(aside for sin,cos,tan)

This is likely the biggest challenge the project will face.(the project should only take 2 months after this)

Picture of what I am trying to do.(I know my writing sucks and no I am not in kindergarten)
https://drive.google.com/file/d/0B5HuG10h5HbnMHlNR2FxUWNkRkk/view?usp=sharing
The squares underneath the view port are the block the character is standing on.
  • Calculators owned: None
  • Consoles, mobile devices and vintage computers owned: GBC,PS1,GENESIS,NDS

Unicorn

I probably won't be able to help, but it would be nice to know what language this is in?
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

guicrith

  • Calculators owned: None
  • Consoles, mobile devices and vintage computers owned: GBC,PS1,GENESIS,NDS

Snektron

Have you considered Three.js? It's a 3D library based on WebGL and really easy to use. Maybe you could make the game so it just looks from one side. Also how do you plan to rotate the camera? (i mean how would you look to the other side). Also do you know Vectors? They're REALLY handy in games. If not i suggest you look up on them ;)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Dream of Omnimaga

Since it's 3D, shouldn't the title say 3D instead of 2D?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

ben_g

Quote from: guicrith on June 13, 2015, 02:49:48 AM
The project has just been started and I cant find any good tutorials on how to rotate and move the camera for 3d rendering.(I still need a camera for projecting 2d to 1d)
I only know math up to geometry no trig.(aside for sin,cos,tan)

...
Maybe you should look into raycasting. Simple raycasting algorithms use a 2D world (usually a tilemap) as input, and their output is basically a line (so 1d) of which the thickness depends on the depth of the scene at that point. The only thing you'd still need to do then is rotate everything 90° to make the world vertical instead of horizontal (to get a platformer) and maybe remove the code that handles the depth if you want real 1d instead of the 3d illusion.

p4nix

#6
I once had the idea of making this too (if we mean the similar), inspired by
  • Calculators owned: fx9860GII (SH4)

p4nix

So if you want to use vertical raycasting, here's a good tutorial on it: http://lodev.org/cgtutor/raycasting.html
  • Calculators owned: fx9860GII (SH4)

Unicorn

p4nix, please do not double post. There is a modify button after all. ;)
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

That Mario looks cool p4nix. :D If I was to make an actual 2D FPS I would probably just do it like this:

https://www.youtube.com/watch?v=KE9k2ED2aw8

And if it was gonna be 3D I would probably either do it like the above but with extra perspective
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal