by date
Plan for David "FenrirWolf" Grace
Plan for David "FenrirWolf" Grace
| Name: | David Grace | ![]() |
|---|---|---|
| Date Posted: | Sep 20, 2004 | |
| Rating: | Not Rated | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for David Grace |
Blog post
Nuts and bolts and custom classes, all in preperation of IGC04
I've decided to concentrate on re-working Space Race for IGC04, instead of GRM. The yet-unnamed game will expand upon the original and include many more dangers, plus what I hope will be exciting boss fights. It's shaping up to be less of a racing game and more like a mix between rally racing and a shooter. I've decided to forego multiplayer so I can concentrate on fine-tuning the gameplay.
Most of my time has been devoted to getting moving platforms working. Sadly, I still haven't been able to come up with anything that satisfies me; I tried to build my own object class, a ShapeBase that contained camera pathing code. It worked fine, as far as moving around is concerned, but I couldn't get collision detection to work right. (My ship could shoot/ram the platforms fine, but if the platform rammed my ship, nothing would happen.)
Someone from IRC showed me how to lobotomize the FlyingVehicle class and make it a "hockey puck" as he put it. (Basically a moveable object that will trigger collisions correctly.) I then glued in pathing code, but this didn't work out as I expected; Due to the class being controlled by rigid physics, you can't just set its transform matrix and go, you have to work with relative positions. I ended up getting the aiming and pathing code to work, but I will use this for my chaser/patrol ships, instead of moving platforms. In that respect, the code is fairly robust and it will follow a path correctly in 3D space, including height changes. (In fact, I've pretty much duplicated the AIFlyingVehicle mod that is floating around on the forums. Too bad I didn't discover this until after I was 90% done with my own implementation, heh.)
I've finished the pathed starship class, so I can take a ship, populate it with turrets and have it patrol a section of my mission. I'm now working on the chaser ship type, which uses the same modified flying vehicle, except it sets waypoints in realtime to fly towards the player.
One problem I am having is that when my AI-controlled flying vehicles collide with any DIF shapes, the game locks up. The problem seems to happen less if I set the integration higher, but it doesn't entirely go away. Besides, that slows down the game. (As I will have at least a dozen or more of these shapes in a single mission.)
No screenshots as of yet, I forgot to snap a few. :)
Most of my time has been devoted to getting moving platforms working. Sadly, I still haven't been able to come up with anything that satisfies me; I tried to build my own object class, a ShapeBase that contained camera pathing code. It worked fine, as far as moving around is concerned, but I couldn't get collision detection to work right. (My ship could shoot/ram the platforms fine, but if the platform rammed my ship, nothing would happen.)
Someone from IRC showed me how to lobotomize the FlyingVehicle class and make it a "hockey puck" as he put it. (Basically a moveable object that will trigger collisions correctly.) I then glued in pathing code, but this didn't work out as I expected; Due to the class being controlled by rigid physics, you can't just set its transform matrix and go, you have to work with relative positions. I ended up getting the aiming and pathing code to work, but I will use this for my chaser/patrol ships, instead of moving platforms. In that respect, the code is fairly robust and it will follow a path correctly in 3D space, including height changes. (In fact, I've pretty much duplicated the AIFlyingVehicle mod that is floating around on the forums. Too bad I didn't discover this until after I was 90% done with my own implementation, heh.)
I've finished the pathed starship class, so I can take a ship, populate it with turrets and have it patrol a section of my mission. I'm now working on the chaser ship type, which uses the same modified flying vehicle, except it sets waypoints in realtime to fly towards the player.
One problem I am having is that when my AI-controlled flying vehicles collide with any DIF shapes, the game locks up. The problem seems to happen less if I set the integration higher, but it doesn't entirely go away. Besides, that slows down the game. (As I will have at least a dozen or more of these shapes in a single mission.)
No screenshots as of yet, I forgot to snap a few. :)
Recent Blog Posts
| List: | 06/13/05 - Plan for David "FenrirWolf" Grace 06/08/05 - Plan for David "FenrirWolf" Grace 03/13/05 - Plan for David "FenrirWolf" Grace 03/06/05 - Plan for David "FenrirWolf" Grace 11/27/04 - Plan for David "FenrirWolf" Grace 09/28/04 - Plan for David "FenrirWolf" Grace 09/20/04 - Plan for David "FenrirWolf" Grace 09/07/04 - Plan for David "FenrirWolf" Grace |
|---|
Submit your own resources!| Stefan Lundmark (Sep 20, 2004 at 18:19 GMT) |
I'm having a similiar problem where our flyingvehicle collides with the terrain and goes trough, then crashes TGE. Setting the integration eliminates the problem partly at lower speeds, but if you really try hard you can still get trough the terrain and crash again.
It's the collision system for sure, probably how it updates it's forces and where on the object it does it.
Edited on Sep 20, 2004 18:20 GMT
| David Grace (Sep 20, 2004 at 19:23 GMT) |
| James Brady (Jun 18, 2006 at 20:32 GMT) |
Im having trouble getting an AI flying vehicle to follow a path. You mentioned a AIFlyingVehicle mod above - can you point me to it?
The closest Ive come is to use a 'projectile' whose shape is the airplane or helicopter or whatever - I just spawn it and use setVelocity to set it off.
The trouble is that I cannot shoot that down (because a projectile doesnt have a collision box as far as I can tell..) - how did you solve this?
I also tried to get flying vehicles to follow paths but (without having an AIPlayer fly the plane) I have had no luck so far...
Thanks for any tips!
(PS: I clicked on the screen shots in the follow ups but those links are down now.. did you give up on this game ?)
You must be a member and be logged in to either append comments or rate this resource.



Not Rated


