New Mini Project
Started a new mini project while waiting for my team to make some maps for my engine......
-edit at 7:34 PM central time-
added another screeny: includes APCs and health bars now
-edit at 10:39 PM central time-
added infantry and APCs can drop infantry units off
at this point the engine supports creating new types of units very easily (working on getting APC's in there right now) Takes full advantage of polymorphism for the unit system.
Each unit has its own AI and targets the closest unit for shooting at. The blue forces get brought in on hovercrafts from the ocean and the green force is the defending force.
The point of the game is for you to buy and manage your army (blue) and you must assault a beach and take it over. Much like WWII and Normandy Beach. I started this project on Monday (from nothing really) and I'm planning on working on it for about another week or two and getting it done hopefully.
all of the art is done by me :) which is quite an accomplishment because I'm a firm believer that most programmers aren't very good artists ;)
I will upload a demo later this week if i feel like it....
it looks really cool.
i assume you are using A* pathfinding? I just reached the pathfinding implementation stage in my own project, and it's crazy....i was overwhelmed last night when i was coding A* into my program...i started thinking about it more today and I think I have come up with an easier and much simpler way to code it, hopefully it will work!
good work on your project so far, and keep it up.
actually, because the units kind of just drive through each other, there isn't really any pathfinding involved. Mainly the AI finds the closest enemy, aims at them taking in to account their velocity somewhat (so that they'll miss sometimes) and then shoot at them. Each unit processes this differently, so where a tank has a turret and can aim independantly of where it is driving, the infantry units have to be looking in the direction that they're shooting in.
If there were obstacles or if the levels were any bigger than the one shown, i would probably implement A* in there for the units. A* is a really fun algorithm to work with, good luck on your project :) and thanks for the feedback
at this point -10:35 PM- I have infantry units implemented that shoot rapid-fire guns. The APCs can drive around and drop off infantry men and when they do, they temporarily slow down and then speed off again. The game's engine is almost complete and I will hopefully have some levels done within the next few days....I would like to get helicopters and rocket soldiers in to the game, and then i'll have all of the units that I want for the game (not like I can't add more if i want to anyway...)
so then are you able to select a unit and tell it to move somewhere? or at the current moment are you just plotting lots of units down on the map and letting them battle each other
I just finished working on my A* code for the night. It was quite fun. I completely deleted all my A* code I worked on last night because it was messy and horrible and hard to understand. I hated it.
So today I split the whole algorithm up into LOTS of smaller functions and it is so much more clear and elegant now. I love it. (I hope it works, haha).
After I finished I wanted to know if my code worked, so I rigged up a simple little function that would call my A* code to calculate the path, and then it would output the resulting path to a file. I then called that function with starting coordinate (5,5) and ending coordinate (10,10) (just to see if my code could find such a simple path with no obstacles), ran the the code, and looked at the file. The file contained the following text:
Coordinate: (10, 10)
I didnt know really what to think about that. In one way it is comforting because by it outputing the coordinate 10,10 it means it actually found its way to the target coordinate! However it is also scary because the rest of the path isnt there in the file! Debugging starts tomorrow morning. :D