OK. I will leave it as it is for now, and probably do some final changes tomorrow.
lifelike/4kgeneral
Turn-based strategy game made originally for the 2012 Java 4k competition. - lifelike/4kgeneral
OK. I will leave it as it is for now, and probably do some final changes tomorrow.
Managed to reach the bonus scenario. Several almost losses on the way.
I won bonus scenario on third attempt only to notice a bug that makes the scenario counter just update rather than saying that campaign was won. Fixing tomorrow. Not likely that too many will notice it before that anyway.
I will probably remove the bonus-thing, just keep scenario 11 as it is, and then add a few more (and more difficult) scenarios at the end.
So I assume owning a SU-85b tank where my enemy hold RPG ;D
You just have to assume that the tank units are of the approximate size and quality to be about as strong as infantry units of a certain size and quality. If SU-85b vs RPGs work for you, that’s fine.
There was one thing that bothered me a lot beyond the gameplay… But it has been taken care of (not uploaded yet though). 8)
http://dl.dropbox.com/u/11540578/java4k-120228.png
(Some anti-alias would have been nice.)
Updated! Final version (or I hope so, but please let me know if there is some really bad bug that needs last minute fixing…).
Just completed your final version, and I didn’t find any bug in it. Many nice improvements. I won the 12th scenario by luck on my first try. In my final strike, engineers and both their special qualities were directly involved on the frontline and helped me a lot.
I appreciate a lot classic wargames, and I would like more of them to be as easy to use as yours. Good job !
Hexes, yay! Now it looks like a proper wargame
Just tried it - very classic wargame elements. Gotta love the hex. My only wish was for something to tell me where a unit had been destroyed. Maybe keep dead units on map, but grayed out (and able to move over). When the battle is over, then you get to review the carnage, too.
Thanks guys! Not sure what I was thinking trying to get away without making the hexes hexes, but I thought it would require a lot more code than it did. It was very simple to add too. :
Showing eliminated units is a great idea, but I have only 2 free bytes and no obvious ways to free more without doing some big changes, and the deadline is a bit too close for that.
And finally I managed to win the last scenario too. Phew.
Last one in 5 turns, did take some luck though
What a funny game, is it possible to see the source? Just curious how the AI is working
What a funny game, is it possible to see the source? Just curious how the AI is working
Thanks! Yes, I intend to post the source code.
The code is a mess btw. Almost everything is built around the same flood-fill-algorithm that I just set up with different offsets into the map data array and configure for different purposes. The AI use that too, to spread out influence of different units, and from cities, then the results are added/subtracted to get a score for each hex, and find the hex with highest score. A very simple influence mapping algorithm. It can probably be made a bit better by just tweaking some constants.
I run the code through cpp (the c pre-processor) to #include bitmap data. I need to allocate some time to put together a nice® pre-processed version that I can post on the java4k site.
The game can also be compiled in debug-mode, which adds some debug-graphics (and printing), and also adds keyboard shortcuts to edit maps and various cheat-codes (and it runs as a stand-alone Java application, not applet). Can post that version to github if anyone is interested.
Source code posted:
http://java4k.com/index.php?action=games&method=view&gid=400#source
It is preprocessed so it looks even weirder than the original file. For one thing all comments are missing. It was my first java4k game and many things are probably very stupid. I think I should have let proguard optimize more things instead of trying to do so much manually.
Looking at my old java4k files and scripts and just created a stub for a new game.
^ I hope it will help others to join java4k
I could not find the time or inspiration to join java4k 2013 unfortunately, but at least I took a few minutes just now to upload the full source code (with Makefile and helper scripts) of this little game from 2012: Turn-based strategy game made originally for the 2012 Java 4k competition. - lifelike/4kgeneral
lifelike/4kgeneral
Playing with the “scenario designer” might be more fun than actually playing the game, but other than that there is probably not much to see in there (yet?).
Too bad you can’t join. Your problem might be idea rather time, because we have one year : And while someone ran out idea, Apo submitted more than 10 entries :
Ah, yes, mostly idea. It is difficult to make a game when you do not yet know what it is. :