Tank Fu

Use this forum to share and discuss Uzebox games and demos.
User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Tank Fu

Post by L4rry » Thu Nov 19, 2015 4:41 pm

Here's another build with a 40% increase in AI tank speed and shot speed (It also includes the changes mentioned above). It's certainly a bit tougher
to play against, although somewhat artificially. Hey, Pacman did it! :D Let me know how this feels. (Sorry for the attachment spam)
TankFu.hex
(168.25 KiB) Downloaded 163 times
TankFu.uze
(60.31 KiB) Downloaded 140 times

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tank Fu

Post by D3thAdd3r » Fri Nov 20, 2015 3:06 am

I think it is better now and I wouldn't worry about it being "unfair". I think the biggest exploit I take advantage of after many play throughs is "camping" for around the corner shots or long straight on shots I know he wont dodge but I will. The only way to counter that is to always be calculating where player projectiles will be(or atleast which rows/columns projectiles are in and where my barrel currently is) which sounds like a cycle eater. It is definitely enough AI where you can play against it and have fun. I played through lots of times already so it is one of the better titles for the system IMO. Past this you have to start doing compression on everything to save flash for more code space. That gets to be more and more work for less and less fun. And hey, I am selfish and would like to see another title of this quality on Uzebox in the near future :ugeek:

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Tank Fu

Post by Jubatian » Mon Nov 23, 2015 7:52 am

Will check this out at home, now writing from the office (where I have a damn net access...).

You mentioned this in response to me:
L4rry wrote:The issue with my approach is that, depending on how you tweak it, it either turns out overly simple or overly hard to play against.
What was about that? I mean the "overly hard" part?

Don't you still have some 196 bytes until hitting the boot loader by the way? :) (I wish we had that much once at work, when we had to add features to a convoluted assembly + PL/M mess taking 65505 bytes on a 8051).

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Tank Fu

Post by L4rry » Mon Nov 23, 2015 1:54 pm

To elaborate, because of the simple path finding AI that I've implemented, the only thing I can really tweak, without
changing the algorithm entirely is the speed of the AI and shot or how often the AI adjust it's goal. (The goal is simply
finding where the opponent is and moving towards that spot).

If I make the speed too fast, it's like trying to catch a fly with chop sticks. If I make the goal adjustment window too small, the AI
resembles a homing missile (And also causes the demo mode to adopt undesirable behavior. Tanks quickly get into a rhythm where they
go back and forth in one spot)

In hind sight, I would (like D3athAdd3r suggested) have put some effort into adding some form of defensive strategy where the AI makes evasive
maneuvers. I played around with it a bit, but quickly ran out of flash space. I'll need to do a refactor of code and tiles first to optimize my storage.
In any case, it's a lesson I plan on taking forward where this kind of AI is required again. That and utilizing proper machine learning where possible.
A project in itself!

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Tank Fu

Post by Jubatian » Mon Nov 23, 2015 8:28 pm

Checked it out: Yep, it got harder! I could almost finish it still, the boss however now really became a worthy boss! That now seems to be really difficult. The canal was I think the map on which the AI struggled the most, it was just driving and shooting around. It is easy to find a safe place and blast it into oblivion. The reflections map is also one where it seems struggling somewhat, but the map is tricky enough to shoot yourself in the boot, making it interesting.

By the way what is the biggest culprit on flash usage? I doubt its code or that would be some epic amount of code. Neither it looks like there is too much tile data, though by appearance maybe the boss makes up for half the space on this term. Unless done already the maps would pack nicely with RLE.

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Tank Fu

Post by L4rry » Tue Nov 24, 2015 6:10 am

The boss tiles certainly have the biggest storage impact in terms of graphics yes. I'm sure I could get the tile count down by some adjustments
to the design if I put some effort into it. Then of course there is the PCM audio which also eats up a big chunk of space by it's nature. Patches would
have been way more efficient but not half as fun to make. Did my sound effects using Audacity, my macbook's built-in mic, my mouth, half a glass of beer and a teaspoon :mrgreen:

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tank Fu

Post by D3thAdd3r » Wed Nov 25, 2015 1:32 am

L4rry wrote:Did my sound effects using Audacity, my macbook's built-in mic, my mouth, half a glass of beer and a teaspoon
:ugeek: very cool!

User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tank Fu

Post by uze6666 » Wed Nov 25, 2015 4:30 am

D3thAdd3r wrote:
L4rry wrote:Did my sound effects using Audacity, my macbook's built-in mic, my mouth, half a glass of beer and a teaspoon
:ugeek: very cool!
Lol, I second! :lol:

Indeed, PCM, will eat up flash rather quickly. Patches could come close to most effects I think.

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tank Fu

Post by D3thAdd3r » Fri Nov 27, 2015 5:17 am

Just had a very enjoyable experience playing multiplayer Atari 2600 games with the brothers...naturally Combat came up and it was a blast! Obviously these are 2 different games, but it made me wish I had brought the Uzebox with to play this one instead!

If you are still psyched about your game and not burned out like I always get, I'd say the patch suggestion is the biggest thing you can do. I don't know the frequency of those, but perhaps you have as much as 10k in PCM? I am not saying copy some NES sound effects, but it never hurts to look at effects you like to see why things sound the way things do and learn from that to make your own. Just like learning anything else by example. The game "Iron Tank" is probably a good example of those kinds of things. Noise channel effects for explosions are the only things not really down to a science.

CunningFellow's SD library could probably save you at least the title screen map/tile data(use vram and ram tiles loaded from SD, not flash) and also levels could cost you no space then.

User avatar
L4rry
Posts: 239
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Tank Fu

Post by L4rry » Mon Nov 30, 2015 5:39 pm

I recorded the effects at 8 KHZ. The size is about 7-8 KB in total I believe if I review the '.raw' files in the audio directory of the source. Yeah I'm a little bit burnt out and have already moved on to another Uzebox project :) That doesn't mean I'm just going to leave Tank Fu behind though. I just need some distance from it for a bit. Of course this is all open source and I welcome anybody who wants to have a stab at tweaks and improvements to the game. If you're keen, I'll add you as a collaborator on the Github repo.

My next project will most likely feature patch sound effects as it's definitely something I want to learn more of. Not too much insight into the workings of it all at the moment.

PS. I never had the good fortune to play on the Atari 2600, but Tank Fu was heavily influenced by my memories of 'Tank 1990' for the NES. The multiplayer aspect of it was always something that was a thrill and fairly unique for the platform. I have fond memories competing with my neighbors and my brother at the time. :)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests