Re: Location Information
Rod McCall <
rodmc@...>
2011-08-04 13:04:18 GMT
Hi Jean-Philippe,
Thanks for your quick reply.
Yes it is the location of the car on the track, I will take a look at
what you have said below and see if there is an easy way to get the
data out of SD.
Cheers,
rod
On 4 August 2011 14:49, Jean-Philippe <jpmeuret@...> wrote:
> Welcome, Rod.
>
>> I am currently exploring using Speed Dreams as the basis of a
>> simulator, and as part of this need to be able to get current location
>> information from the game instance and send it to an external device
>> e.g. a tablet PC. As I am new to Speed Dreams I am currently messing
>> around with the code, almost blindly but would appreciate information
>> on where I could find the relevant part of the source code or
>> variables? If anyone knows where I should look please let me know.
>
> Not sure about what you mean by "location" ...
>
> If it is the position (coordinates) of a car on the track,
> you can explore the C structures in src/interfaces/raceman.h
> and src/interfaces/car.h
>
> First, you should start from the RmInfo structure : the race engine
> (in src/raceengine) owns 1 only instance of it : 'ReInfo',
> and this instance (or its sub-objects) is used to communicate
> with the modules of the game (like the physics or graphics engines).
>
> The data describing each racing car (position and many other things)
> can be found by digging in the 's' field of ReInfo (tSituation type).
>
> We currently use src/modules/simu/simu v2.1 as our official physics engine
> (the car physics is currently being setup for this simu version).
>
> The graphics engine is in src/modules/graphic/ssggraph.
>
> To be short about how the game mainly works in-race
> (see src/raceengine/raceupdate.cpp) :
> * the race engine loops as long as the race is not finished or the user
> does not stop it ;
> * in each loop, the race engine sequentially calls (more or less directly) :
> - R times the rbDrive function of each racing 'driver',
> which is an instance of a 'robot'
> (see src/drivers/usr* , simplix* and kilo*,
> and human for the human player with the wheel/joystick/keyboard in
> hands)
> - S times the update function of the physics engine
> - once the update function of the graphics engine (giving 1 frame)
> * R and S mainly depend on the current CPU load, in order to let the user
> feel like it is real-time ; of course, this can become false when the CPU
> is overwhelmed by too rich graphics or too many drivers.
>
> Feel free for asking more details.
>
> Cheers,
>
> Jean-Philippe.
>
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1