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

Back to Vinland.

I'm going back to my real time tactics project, Vinland 1936.
While working on the other project I overcame the problems which were stopping me from saving/loading the game and also cleaned up the base code a lot.

After a few weeks I'm getting near the the state I was in before.

Infantry are back to their previous state, and vehicles are running OK.
This time I'm going to push ahead with mocking up the combat system though before I work any more on the vehicle builder or graphical aspects of the game.


I finished working on the code for adding foliage and having some extra time I decided to experiment with the code for rockets.

The original idea I had was that rockets would be large vehicle components that can be fired very quickly, regardless of how much manpower is used for reloading.

They would use up a lot of ammo, so they would run dry after a short but devastating barrage.
The problem here is that it's easy to take advantage of this by adding a lot of ammo, which is much smaller than in bulk than the rockets.

There's also the problem of firing large caliber rockets. In real life rockets of up to 30cm were used, but I think that will be too powerful for the scale of combat in this game.

lol. Somehow that one trooper survived the mother of all explosions...

A 30cm rocket could contain nearly 30KG of explosive. That would be a very large explosion.

I've tried to balance the game by using a simple equation to make bigger guns more powerful, but hopefully not too powerf…

Infantry combat and entering buildings.

I've been working a lot on the game recently and I've nearly rebuilt it to the level it was before. Past that maybe, since now I have the beginning of a working combat system and the ability to save and load the game.

Infantry can now occupy a building. It's quite an abstract representation, since they stay at the door and turn invisible. But they can then fire from one of the windows and take damage from shots at the windows too. I think I've set it up well so that when building damage and destruction is working then the system should continue to work.

For combat I tried some new ideas, but they didn't work out that well. It seems that it's important that viewing range should be further than shooting range. Now shooting range is pegged at 18 units of distance, while viewing range can extend out past that.

In the above image one unit has an officer, so has further viewing range. The other can only see as far as they can shoot, a dangerous situation since the en…