* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: First person 2d platformer  (Read 1492 times)

0 Members and 1 Guest are viewing this topic.

Offline guicrith

  • New User
  • Join Date: May 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
    • View Profile
First person 2d platformer
« 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)

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.



Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2716
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • View Profile
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: First person 2d platformer
« Reply #1 on: June 13, 2015, 03:35:36 am »
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 ??? ??? ??? ??? ???



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

Offline guicrith

  • New User
  • Join Date: May 2015
  • Location:
  • Posts: 17
  • Post Rating Ratio: +0/-0
    • View Profile
Re: First person 2d platformer
« Reply #2 on: June 13, 2015, 03:56:20 am »
Javascript

Offline Snektron

  • Lvl 69 Russian Snake
  • CodeWalrus Staff
  • Super User
  • Topic Management
  • Join Date: Dec 2014
  • Location: Netherlands
  • Posts: 3147
  • Post Rating Ratio: +31/-0
  • SSSssssss.....
    • RobinDeWalvis
    • Kzyrox
    • RobinDeWalvis
    • View Profile
    • quantuminfinity
  • Gender: Male
Re: First person 2d platformer
« Reply #3 on: June 13, 2015, 10:30:44 am »
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...


Offline DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 17468
  • Post Rating Ratio: +83/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: First person 2d platformer
« Reply #4 on: June 13, 2015, 10:48:00 am »
Since it's 3D, shouldn't the title say 3D instead of 2D?
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX, HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

Offline ben_g

  • Full User
  • Safe-haven access
  • Join Date: Dec 2014
  • Location:
  • Posts: 159
  • Post Rating Ratio: +9/-0
    • View Profile
Re: First person 2d platformer
« Reply #5 on: June 13, 2015, 12:09:37 pm »
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.

Offline p4nix

  • Full User
  • Join Date: Jun 2015
  • Location: Germany
  • Posts: 402
  • Post Rating Ratio: +6/-1
  • Don't catch the ball.
    • p4nix
    • View Profile
  • Gender: Male
Re: First person 2d platformer
« Reply #6 on: June 13, 2015, 04:07:32 pm »
I once had the idea of making this too (if we mean the similar), inspired by
 <iframe width="640" height="385" src="//www.youtube.com/embed/uL4UdNcK4kc?fs=1&start=" frameborder="0" allowfullscreen></iframe>
« Last Edit: June 13, 2015, 05:25:13 pm by p4nix »
  • Calculators owned: fx9860GII (SH4)

Offline p4nix

  • Full User
  • Join Date: Jun 2015
  • Location: Germany
  • Posts: 402
  • Post Rating Ratio: +6/-1
  • Don't catch the ball.
    • p4nix
    • View Profile
  • Gender: Male
Re: First person 2d platformer
« Reply #7 on: June 13, 2015, 04:39:54 pm »
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)

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2716
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • View Profile
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: First person 2d platformer
« Reply #8 on: June 13, 2015, 07:39:55 pm »
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 ??? ??? ??? ??? ???



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

Offline DJ Omnimaga

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Forum Maintenance
  • Original 5
  • CodeWalrus Supporter
  • *
  • Topic Management
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 17468
  • Post Rating Ratio: +83/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • View Profile
    • DJ Omnimaga music store
  • Gender: Male
Re: First person 2d platformer
« Reply #9 on: June 15, 2015, 01:26:10 pm »
That Mario looks cool p4nix. :D If I was to make an actual 2D FPS I would probably just do it like this:



And if it was gonna be 3D I would probably either do it like the above but with extra perspective
  • Calculators owned: TI-73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX, HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)
??? ??? ??? ???

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games