If you were making a space PBBG without a 3D engine or Flash, just with PHP/MySQL/JS/AJAX/jQuery/CSS/HTML, etc, how would you go about creating the effect of the player being in the cockpit in first person view? So when you are playing you see your "viewport" or like the "main viewer" in Star Trek and depending on your location (probably static grids/pages or something?) you see a planet out the window, or stars, or a space station, whatever? Would it be that hard to do using images and layers? If you navigate to the same "grid" or location of other players, would it be hard to have dynamically generated icons pop up on your viewport to represent the other players there? They would also be listed by player / ship name below the viewport in a simple list (clickable to target or whatever). What about having the dynamically generated icons be clickable so when a red box or whatever pops up on your screen as you enter that location, you can click it and a "attack" or "scan" option appears?
Is this all doable with just code and pictures? Thank you and sorry if I confused anyone.
Fake or Simulatate a First Person Cockpit View?
Fake or Simulatate a First Person Cockpit View?
"In order to understand recursion, one must first understand recursion".
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Fake or Simulatate a First Person Cockpit View?
It is definitely all do-able without Flash, using only Javascript. The question is, how hard is it going to be? That depends on a lot of things, most important being how well-versed you are with Javascript, and probably secondly, do you want it animated?
I would check out some of Halls' Javascript tutorials that include the live map features. It is all pretty much the same techniques, whether you are making a ground-based map or a cockpit view of space.
I would check out some of Halls' Javascript tutorials that include the live map features. It is all pretty much the same techniques, whether you are making a ground-based map or a cockpit view of space.
The indelible lord of tl;dr
Re: Fake or Simulatate a First Person Cockpit View?
Alright, thanks Jack.
"In order to understand recursion, one must first understand recursion".
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Fake or Simulatate a First Person Cockpit View?
if it is static as in no animations and no true 3d view port then yeah, quite simple. Just use css to make the cockpit like a GUI. The 3d side all depeends on what you are wanting to achieve.
Re: Fake or Simulatate a First Person Cockpit View?
I'll probably just use some simple animations in the background to make the "static" pages feel a little less static. Either animated .GIF's or something new like CSS3 or HTML5 or something (haven't gotten into it much, the newer coding).
"In order to understand recursion, one must first understand recursion".
Re: Fake or Simulatate a First Person Cockpit View?
I want to make a radar screen on the GUI, somehow get real-time dots to represent nearby ships or something like that. jQuery?
"In order to understand recursion, one must first understand recursion".
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Fake or Simulatate a First Person Cockpit View?
yes, you can store the left and top locations in the DB then just place them in a div and place dots relative to the div. So if the entire map is 500px x 500px, make the radar 50px x 50px then divide everything by 10.