Skip to main content

Vehicles in game (again)

It's been a while since i posted any updates. It's not tat I haven't been busy, only that the work hadn't reached a point where it was worth showing.
It's been a lot of small incremental changes, building a modular menu system with widgets and buttons, porting over some of my old code for displaying vehicle models etc...

This is just a dummy menu at the moment. From here I can set the active profile, manage vehicles for testing and jump right in to an in game testing environment.

Each chunk of screen space like this is a widget. It can have a number of buttons. The buttons react to being moused over and clicked. They send a message to the widget to decide how to deal with that interaction. The widget then executes some code and might reset the menu page or load a different one.

Clicking manage vehicles loads this menu:

I've moved some of the structural elements of vehicles away from components mounted in the vehicle and in to a system of options which modify how the vehicle stats are generated. For example, sloped armor is now a property of a vehicle and not something you can just add in the factory. It requires a whole different vehicle layout.

Clicking on contents takes you to the temporary vehicle contents modification menu:

The colored components you can see placed in the chassis will feature images to describe the parts placed there later, but for now it's just testing so they are just colored tiles. During testing I've discovered that I've made the chassis and turrets too big, there's too much space when compared to real life vehicles. This results in vehicles which are too heavy for their size category. I'm going to have to go back and juggle those values some more once I start testing more systematically.

Components are now single entities with a limited supply, if you pick one up from the inventory box, it is removed from the inventory. You can drop it back there by clicking outside the chassis in the contents box, or automatically when you either leave the menu or when you pick up a different item. There will be another screen where you can buy new components to add to your vehicles.

In game you will buy or salvage vehicles and then buy or salvage components to use in kitting them out.

The vehicles are now ready to be added in game:

I think they are a little small right now, so that's another thing I'll be modifying in future.
Next step is working on vehicle combat and movement. After that maybe enemy AI. Finally mission selection and design, UI and mini map and then it's nearly done. At that stage I'll be working on content, like all the infantry sprites, buildings and probably reworking the vehicle models.

Before that though I'm going to be doing some work on refactoring the code so more of the agent's behavior is in the agent states instead of the agent object, that will make it easier to write the AI control code.


  1. Will a unit be able to steal a working enemy tank?
    Like a engineer or a saboteur?

    1. Yes, if the crew is knocked out you can send in your own.
      Have to see how it goes in testing, but capturing enemy equipment is going to be quite a big part of the game.


Post a Comment

Popular posts from this blog

Make your game models POP with fake rim lighting.

I was watching one of my son's cartoons today and I noticed they models were using serious amounts of simulated rim lighting. Even though it wasn't a dark scene where you'd usually see such an effect, the result was actually quite effective.

The white edge highlighting and ambient occluded creases give a kind of high contrast that is similar to, but different from traditional comic book ink work.

I'll be honest, I don't know if there's a specific term for this effect in 3d design, since my major at university was in traditional art. I learned it as part of photography.

You can find plenty of tutorials on "what is rim lighting" for photography. It basically means putting your main sources of light behind your subject so that they are lit around the edges. It can produce very arresting photographs, either with an obvious effect when used on a dark subject...

..,or as part of a fully lit scene to add some subtle highlights. See how alive the subject look…

How to... build a strong art concept.

So you want to make some art assets for your game. The first on the list is a Steampunk Revolver for your main character to shoot up Cthulhu with. Quickly opening your internet browser you start with a Google image search. Ah, there is is!

It might be a good idea to find a few influences so you don't accidentally end up copying a famous design.

Just mash them up and you're ready to go! Off to your favorite modeling program.
But wait! isn't there more to building a strong design concept than that?

Of course there is.
One of the diseases of modern design is that of recursion. Everything is a copy of a copy of a copy. This is especially a problem with "historical" concepts. Over the course of that recursive process the concept becomes infected with modern design elements, and ends up looking very similar to everything else that anyone else has ever made.
If you want to come up with a really fresh idea, you have to get beyond secondary references and go look at real …


Ok, so it's not exactly skynet, but I have got my first AI state working, kind of.

The first state is "HOLD" in which case the agent stays in place where they are and shoots at any unit that comes in range. When I started writing this module, I found that the existing method of triggering actions wasn't good enough to allow the AI to choose the best weapon or target. It worked by simply sending a command to the unit to trigger the currently selected action.

If the action is valid, it triggered, if not it didn't.
That's fine for play controlled units, as that's all they need to do. But AI needs to know in advance if the action is valid. The player can get that info from UI feedback, but that wasn't available to the AI player.

There were three problems:

1. The UI feedback duplicated code in the action trigger function. These  two sets of code could get out of phase so that UI feedback was wrong.

2. The action trigger didn't give enough feedback for …