Saturday, 8 November 2008

Updated handling & track

Ok this version has a lot of updates:

- steering is mapped to joystick's first axis... this is being tested on a psx controller + tigergame usb adapter untill we can do "configs", since that's about as close to a "standard" as we're going to get for now. I'm still having some issues with getting smooth linear motion from the joystick but it's getting resolved gradually. Currently it seems to go in steps but that could be I need to poll the sensor more frequently or something. It does have the beginnings of proportional steering though which is what I was after. Hasn't been tested on the G25 yet :\

- improved the scenery..it might seem like fluff but I figured the more credible the track is the better overall picture we'll get so I tidied up some of the edges, so now we're basically on a walled-off dirt track in the centre of a giant oval. Much of the lighting and texturing is still subject to randomness, but again that's being resolved over time :)

- It also looks like the car mass was waaay to high before which is why I couldn't get the suspension to behave properly. I've since reduced this from 950 to about 300 which seems to give quite a nice "momentum" feel and decent suspension deflection without feeling sloppy. I've had the car vaguely drifting a few times but there looks to be an issue with the current setup in that when you ge thte car sideways it won't put the power down to maintain the drift.

I suspect this could be fixed by reducing the grip of the tyre at that point (loss of traction) which would mimic reality better too, but for that I need to have access to positional data of the vehicle and I haven't figured that bit out yet.


to do:

- figure out how to replace the wheel models. I tried to make the current ones pointy to help righting the car but in fact they go right through the collision detection and make the car more unstable. Solution would be some nice detailed wheels but haven't figured how to replace a mesh cleanly.

- figure out how to attach other things to the car like guns and "righting mechanisms" to flip the car back up when you land on the roof. currently the car freaks when I attach anything and applying forces to it directly doesn't work.


To test download & install blender from www.blender.nl

Download the current build from the link on the top right "download CGZ files"

unzip/rar and run the file.

Once blender's open hit P to go into game mode and there you are \o/


Current build is:
track_car_convex_1_BIGFOOT_MUTANT_11_jOYSTICK_lightercar.rar

Sunday, 2 November 2008

Merged tests

ok managed to get something like the best of both worlds, same url as below, file is 

track_car_convex_1_BIGFOOT_MUTANT_8_jOYSTICK.rar

- now runs with a joystick, still only digital controls and the button assignments may not be the same 

- offroad oval with some texturing

- quite reasonable handling (using convex polytope)

Updated test environments..


there seem to be two routes with this, one using a bounding box for the car collisions and the other using convex hull polytope and they give quite different results. 

I've been exploring both paths at the same time and have made a number of amendments to the powertrain script:

- improved ebrake

- added "nos" (n key) - steering's hardly possible under full power and currently we're on keys so this allows a degree of stepping

- added some basic differential functionality which varies the power distribution on inside and outside wheel during cornering. Once I've figured out how to get the rotation speeds of the wheels and the velocity of the vehicle I can can set up a similar sort of power distribution thing like in the nissan skyline. 



the file you want is track_and_bigfoot... oh yes there's monster trucks :)

 

proposed test systems to get something networked

(this list will be completed later, i want to try and run something...)

In order of steev preference:

blender + ogre3d + pygame
blender + ogre3d + raknet
blender + ogre3d + tnl

(not sure if ogre3d is needed or pygame)

blender + torque3d + xxx


blender (bge) + python sockets
This is and updated test scenario with higher gravity (2x9.8) - makes the car handle much nicer, front doesn't lift of anymore now, handles not far off gta or twisted metal black imho.


I've made a nicer oval track and am working on a decent skybox both currently as external files.

I'm using the vehicle setup made in a tutorial here:


I basically just expanded the test environment a bit and have been playing with the car physics to try and get the sort of handling I'm aiming for. W/S = forward backwards, left/right cursor for steering and possibly space for handbrake.


I'm stil working on the terrain-generation from google maps...looks promising but noting I'm particularly happy with yet. I'm hoping we can use the original image as a coloured texture over the displaced, desaturated version.


On a side note - I wonder if we can use yahoo pipes to handle some of the realtime data-gathering? 




Networking libraries

It seems that for ultimate flexibility, an external network library will be needed:

requirements:
  • python/ruby bindings
  • tcp/ip / udp
  • multiplayer
  • object persistence
  • support p2p and client-server
Raknet - opensource & commercial - choose what to pay, free for opensource or $500 will get you support from the writer!
http://www.jenkinssoftware.com/
  • at first looks - complex and in c++
  • lobby system
  • object repliaction system (damage persistence?)
  • ssl/tls connections
  • message queuing
  • autopatcher
  • RPC calls
  • voice comms
  • NAT punchthrough
  • Python bindings are only in alpha http://sourceforge.net/forum/forum.php?forum_id=691902
enet - opensource/free
http://enet.bespin.org/
  • networking stack for games
  • c++
  • only does udp connection management
http://www.zoidcom.com/ - free for non-commercial - licences available
  • like raknet
Opentnl - gpl, indy and commercial
http://www.opentnl.org/
  • used in torque 3d engine (starsiege, tribes, tribes2)
  • object management infrastructure
  • C++ (now resigned to learning c++)

Game Engines

It seems that the current BGE wont be robust enough to support some of the requirements without a great deal of fiddling.

Requirements for a game engine:
  1. multiplayer
  2. stateful (damage to objects must persist)
  3. open source
  4. tcp/ip
nice to have:
  1. multiplatform (export to osx, linux, windows, ps2/3, ngage, java)
  2. opensource language - e.g. python for scripting

Game engines

Torque 3D - $749
http://www.garagegames.com/products/torque/tge/who/
  • used on 100s of games (apparently)
  • looks ok, works with blender files
  • doesnt work with bge
  • needs to be scripted in 'torque' script
Orge - opensource/free
http://www.ogre3d.org/index.php?option=com_content&task=view&id=19&Itemid=105
  • Ogre is a 3d rendering engine that 'can' use libraries for multiplayer, entites etc.
  • TODO: Worth investigating on the forums for what libs are available
  • http://www.ogre3d.org/wiki/index.php/PyOgre - use python to program ogre
gamestudio
http://3dgamestudio.com/
  • 3d gay studio
crystalspace - opensource/free
http://www.crystalspace3d.org/main/Main_Page
  • This looks to be the best
  • looks like im learning c++
  • sponsored by google and all sorts...
irrlicht - opensource/free
http://irrlicht.sourceforge.net/features.html
  • looks well supported, but is like ogre - e.g. have to add stuff to it
  • TODO: see how easy adding networking is