It is currently Wed Nov 22, 2017 9:08 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 5 posts ] 
Author Message
 Post subject: Mareks engine in Java
PostPosted: Thu Feb 01, 2007 7:10 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
A headlight is added to the player so that as they move in the scene, a light source follows their position and points in the direction that they look.


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 22 - Headlight
PostPosted: Sat Feb 10, 2007 10:41 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
This VMK has been split into part A and B so that the download file size is a little bit easier to work with. Because of this, VMK22a will only play up to the beginning of 20min. VMK22b contains the rest of the video. After you download both parts, you can extract all VMK files (from 22a and 22b) into one directory to allow you to watch the entire VMK in one go.


Last edited by Marek on Sat Jan 03, 2009 7:38 am, edited 1 time in total.

Offline
 Profile  
 
 Post subject: Re: GameDev VMK 22 - Headlight
PostPosted: Wed Jul 11, 2007 5:40 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
For a better way to handle the F button key presses, in the GameOGL::HandleKeyboard() function replace the code that we wrote in this VMK with:

//headlight
if (m_bKeys[VK_KEYF]) {
     m_bKeys[VK_KEYF] = false;
     m_pScene->ToggleHeadLight();
}


Offline
 Profile  
 
 Post subject: GameDev 22 - Headlight
PostPosted: Fri Jan 02, 2009 2:19 pm 

Joined: Wed Dec 24, 2008 4:25 pm
Posts: 16
I thought it would be potentially useful to not require that the headlight be first, so I modified the headlight functionality to use a Scene member variable m_uiHeadlightID that would be set when I called AddLight on the desired light. This also allows no headlight at all, if the user doesn't want one. It works as desired, but now I have a question for the more experienced game designers in the room: is that more trouble than it's worth? Or, put another way, will there always be a headlight?


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2009 7:59 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
If you are making a FPS with lights enabled, you will most likely have a headlight. If you don't then you're going to have to make sure you have enough lights in the scene to illuminate all the objects or else the user won't be able to see anything!

You could make a game with lights disabled (making the game look like a cartoon), in that case you wouldn't need a headlight.


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron