Skip to main content

Posts

Showing posts with the label tanks

Alpha line up.

Right now the line up of tanks and vehicles for the alpha version of the game is being worked on. This version won't have the custom vehicle builder, but will be a chance to get people to play test the basic combat engine and get feedback on tactics and game play improvements that need to be made. The first line up is for Vinland: It's 1936 and military designs are not well advanced. The Vinland line up includes a couple of big tanks, these are not well armored and while robust and fairly reliable for the time, they have under powered guns and engines. Some light tanks are a little better. Their smaller size allows for a little more armor and their small caliber guns have good penetration and rate of fire. For artillery guns, they have a useful 60mm general purpose gun which makes a good antitank gun for the period. Just one of these will make quick work of any enemy tank, but they are heavy and not easily relocated. There is a short barreled 75mm support gun, not real...

Skynet

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 ...

Combat: Cover and flanking system.

This week I've been slogging slowly through the code to integrate combat in to the game. It's different to the way I did it when the game was real-time, but also kind of similar. A command is sent from the turn manager (a sub process of the main environment which has different functions behavior depending on whether it's the player or enemy turn) to an agent to fire its weapon. That weapon then checks if the target is valid and if it is ready to fire, and then it sends a message to the target with some stats so that the target can process the hits. Of course, the messages aren't really sent, they are just dumped in to a list in the main environment, and then agents pull out those relevant to themselves using their unique id. Each stage is separate from each other. Each process can fail without collapsing the whole game loop. For example if you fired a burst of shots at a target and the very first shot killed the target, the others simply won't be processed. Th...

More rockets and tech timeline.

I greatly reduced the rate of fire of the rockets and made them smaller. A single 60mm rocket now takes up the same space as a machine gun. A single vehicle should mount a large number of rockets to take advantage of their power. I also added a delay after a weapon is successfully fired. This means the rockets will fire in a staggered volley instead of all at once. I tried both styles and this looks better and creates less logic spikes. I think it needs more smoke and I'll be adding some rocket trails too. I'm still unsure of where to put the rockets in the tech ladder. In real life the Russians developed their rockets before the German invasion. They were first deployed in 1941. These early rockets were quite small though larger ones were developed later. The Germans designed and tested their first rockets as early as 1940 but they were not deployed until 1941. Larger rockets were introduced later. The rockets weren't mounted on vehicles until 1943, by whi...

Trees again, and tanks.

I've started work adding trees back in to the game. They look nice already with the mipmaps turned off. I think I've got the color match with the ground for summer trees. The trees have a "shadow only" object which helps reduce rasterizer usage and match the shadow with the lamp. I'm not 100% happy with the trees right now, but I hope they will get better as I make more of them and refine the textures a little. I really don't want to waste any more time just fiddling with them. In a few days I'll take another look and see if I can see where the problem is. I think maybe the ground color is too uniformly light. It needs some more dark areas and contrasting sections. I decided to go with the hollow health bars, I like the effect. More than the black bars. I've also finished adding recoil and other physical effects to the vehicles. Even the guns move, with the main gun swiveling to track the enemies. It also tilts for range if it is a suppo...

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 w...

More Health Bars

Something I didn't point out yesterday was that the status icons only display when the specific status is valid. You won't see them most of the time. I decided to go with more transparent health bars in the end, the previous version looked nice and crisp, but it was too obvious, it preoccupied the eye, taking it away from what's really happening on screen. The new version is a little less obtrusive, there will be different color schemes available depending on your faction, or your personal preference. The rectangle with an "X" in it is the state icon. I've chosen 4 icons to show which state / stance (aggressive, sentry, defending, flanking) the unit is set to. I'll have to change the control buttons to match these new icons though otherwise it could be confusing.

Vinland UI

Starting work now on the UI for the game. I need to get on with this as it's going to handle controls for things like changing infantry formations, giving orders to your units, targeting and combat etc... Here's an early version of the UI command buttons: The commands will also be accessible by hotkey. For example the first 4 are A, S, D, F: 1. Attack, 2. Sentry, 3. Defend and 4. Flank. These will set the overall state of the selected units. Attack will make the unit move to the selected destination or enemy, trying to shoot whenever possible. Sentry will go in to observation mode and for infantry they will go prone. Tanks will open their hatches to get a better look around. They won't attack unless first attacked, and will get a better visual range in this mode. You can use the ambush mode as well (second row, number 6), in which case they won't get the visual bonus, but will be harder to spot. Defenders will try to turn automatically to face the nearest...

RTS pathfinding

I spent some time today looking at the possibility of adding A* path-finding to my game. I've used it in the past and I actually got it running pretty fast, even though it's written in python. So I was optimistic about replacing my less than stellar dumb path-finding with A*. However I ran in to some problems. First is the fact that I'm working with quite a fine graph, each infantry man takes up one tile, and tanks and the like take up several (a big tank takes up something like a 12x12 chunk of tiles. When you're working with a graph which might be several hundred tiles square, you get slow performance. When I've used it before I worked with either a pretty course grid, or with navigation nodes. [a* with grid] [a* with nodes] Both these situations give you quite a limited grid and so, good performance. Working outdoors with such a fine and almost unlimited grid makes the algorithm work too hard, especially when you have a lot of agents. Looks...

Scrunchies!

The infantry are coming! You can see a quick video here . Infantry are moving around as expected, it's easy to select them and get them to go where you want. As of yesterday there were still problems with them getting too near to tanks, and not knowing to get out of the way when a vehicle wants to come through. I think I got that covered today though. Here's a first version, you can see something is up right away though if you look carefully. That's right, I forgot the camera is rotated 45 degrees for an isometric style view so the infantry are facing the wrong way when moving. After adding a 45 degree offset to the code for sprite display I got them to face the right way. I also tweaked the code to stop them from walking through each other. Now they won't occupy the same square as a fellow squad member. They also adjust their avoidance radius based on their state. If they are standing still they will move out of the way sooner. But while walking they ar...

Infantry experiements.

Vehicles are working nicely now, and I think the vehicular game-play is coming to a point where I'm pretty happy with it. You can see some of the more recent progress here . Now with tanks churning their way through the mud, I think it's time to start bringing in the PBIs. Poor Bloody Infantry. I need to see how infantry reacts to vehicles, how well (or badly) my pathfinding routine works with large numbers of agents and vehicles. And overall how infantry works out in the game. I think the plan I have is going to work quite well. Infantry move very slowly, so the pathfinding calculations shouldn't happen very often. The pathfinding itself is very rudimentary, just like that I'm using for the vehicles at the moment so the overhead should be small. I've actually got a whole load of infantry building scripts and models left over from an earlier version of the game, but I'd like to start from scratch on that one really. I'm experimenting with qui...