Mech Arcade Combat Game


#1

Well, here’s my initial Panda3d project.

It’s a bit more complicated than I initially planned on, but I decided to go ahead and challenge myself. I’ve written a lot of 2D games in my life, but never a 3D one. So, my goal was simple. I set about with the concept of making an arcade-style action game that is done entirely in 3D.

Here’s what I wrote in my design doc:

You pilot a giant mech using a hybrid FPS/third-person camera.  Your mech guns aim where the mouse is located, torso-twisting to be able to reach that spot, and the mech's arms will tilt to aim up/down.  Mouse-buttons fire.  (Left=primary, right=secondary.)  ASDW controls move the mech.  (A/D rotates, W/S forward and backward.)  Movement is not instaneous, so the mech requires time to aim.

Game takes place on terrain, with sparing 3d mesh buildings and such as backdrop.  The mech is mostly attacked by vehicles (tanks) and aircraft (helicopters, jets).  Game levels work as a series of triggers in the map;  You move into an object trigger, and enemies and such are spawned.

Levels are driven from a single Egg, which loads references to other models and terrain.  Lighting, environmental data, etc are stored in tags in the Egg file.  A Python file is loaded with each level that might define additional in-game logic.

Game play is simple.  The intent is to be a 3d free-form arcade shooter without too much complexity.  Waves of enemies attack and you survive, simple as that.  Levels will consist of a set of sub-missions within a single level which you can complete in any order.  Visiting locations will trigger events and start a sub-mission.  (This gives the player a chance to explore the map and find additional weapon icons, or possibly to be ambushed.)

Your mech will take hits and has an armor rating.  When your armor is gone, you are destroyed.  As you fire your weapons, you generate heat.  It will dissipate slowly, but you can "dump coolant" to speed this up.  Coolant is in limited supply.

Enemies will drop weapon and coolant refill icons when destroyed.  There will be additional supplies air-lifted inbetween sub-missions.

I don’t have much to show yet, but here is a video of a critical failure in my ground-finding code… Resulting in flying tanks!

Flying debug tanks!

Also, here is my initial concept for the mech that you pilot. I modeled this in Lightwave and converted it to Egg using Blender and Chicken. It weighs in around 8.5k triangles and is fully normal/spec mapped.

I hope to have more here soon, as I’m starting to drop in something that’s more than just boxes and cylinders for enemy/object stand-ins.


#2

This looks good, i’m looking forward to playing it. Dispite the flying tank the rest of it looks pritty solid :slight_smile: keep up the great work.


#3

Thanks! I’m enjoying the heck out of using Panda3d for a game. I’ve been able to accomplish more in the last two months than I have in the years I’ve dabbled in other engines.

It’s been a real challenge, too, as I re-acquaint myself with trig and linear algebra. It’s just “one more dimension” over 2D but it requires a lot more thought.

I’m also taking the time to learn some modern 3d concepts, such as shaders.

I hope to have more video/pictures soon. I’ve made an enormous amount of progress in the last few days. Flying tanks are a thing of the past. :slight_smile:


#4

Neat. I’m really liking how smooth the mech moves and aims. Also, i like how the aiming works right now, seems pretty intuitive.

Hopefully we can get a demo soon :slight_smile:


#5

looks nice. keep up the good work :slight_smile:


#6

Probably not too soon. Currently, it’s just me working on it, so I use my spare time to put hours in.

However, I’ve a lot of progress and I’m almost ready to start showing what the actual gameplay is like. I’ll be updating my post as I make progress. Thanks for the encouragement!


#7

Well, making some progress.

I’m just about done with my pathfinding code. I have a navmesh system in place with some really simple steering behavior. I’m working right now on hooking the graph built from the navmesh into something like AStar to do high-level pathfinding.

Here’s a video of what I got now: Navmesh steering tests in Panda3d

From the YT description:

More tests of my path finding code. Here you will see 15 individual wheeled vehicles (tanks) moving about a GeoMipTerrain with random obstacles spread about.

A navigation mesh was generated by hand out of convex polygons and then a simple steering behavior was tied into the individual vehicles. They will attempt to stay within the navmesh as they take a straight shot towards the goal. (They wander out a lot, as they currently cannot slow down or back up.)

What I found interesting is that despite lacking any kind of high-level pathfinding, the vehicles are able to navigate from one end of the map to the other when given that single goal waypoint. The only navigating behavior they are experiencing is a desire to move directly towards the goal waypoint, and at the same time stay within the navigation mesh. If they fall out of the mesh, they temporarily abandon the goal-seek and try to return to the nearest convex polygon of the navmesh.

Of course, without any high level system to give them hints on where to go, and incomplete steering, they can take a VERY long time to reach their goal.

It’s all plain Python code with no optimization or JIT compilation, and yet it runs acceptably fast for what I need. It’s also overkill for my project; But I wanted to see if I could implement such a system myself, as a way to teach myself more 3D concepts.

I’m using a modified version of Birukoff’s 2D convex class, found here: https://discourse.panda3d.org/viewtopic.php?t=5817

Also, the vehicles are using simple pusher spheres to keep out of each other, and this is very unstable. I’ll probably have to include some dynamic object avoidance in the steering to avoid this.