Fake or Simulatate a First Person Cockpit View?

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
Verahta
Posts: 440
Joined: Wed Aug 24, 2011 1:50 am

Fake or Simulatate a First Person Cockpit View?

Post by Verahta »

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.
"In order to understand recursion, one must first understand recursion".
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Fake or Simulatate a First Person Cockpit View?

Post by Jackolantern »

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.
The indelible lord of tl;dr
User avatar
Verahta
Posts: 440
Joined: Wed Aug 24, 2011 1:50 am

Re: Fake or Simulatate a First Person Cockpit View?

Post by Verahta »

Alright, thanks Jack.
"In order to understand recursion, one must first understand recursion".
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Fake or Simulatate a First Person Cockpit View?

Post by hallsofvallhalla »

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.
User avatar
Verahta
Posts: 440
Joined: Wed Aug 24, 2011 1:50 am

Re: Fake or Simulatate a First Person Cockpit View?

Post by Verahta »

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".
User avatar
Verahta
Posts: 440
Joined: Wed Aug 24, 2011 1:50 am

Re: Fake or Simulatate a First Person Cockpit View?

Post by Verahta »

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".
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Fake or Simulatate a First Person Cockpit View?

Post by hallsofvallhalla »

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.
Post Reply

Return to “Beginner Help and Support”