Jump to content
IGNORED

My first arcade game attempt using gcc:


ElectricLab

Recommended Posts

After getting some help from the forums on AtariAge and some guidance from JediMatt, I have hacked together a simple game that is similar to the old Combat game on Atari, at least as I remember it (I haven't played it for years). My goal was to figure out how to use Tursi's libti99 and to mess around with sprites, etc in C. I used to try to make arcade games in XB 30 years ago, but with the speed of a compiled C program, it's a whole new game (pun definitely intended). Anyway I have attached the game in .bin format, since that was the easiest way for me to build and test it. I'm still learning how to do things but having a great time doing so.

 

This game is far from perfect, but kind of playable :) the "AI" is a rudimentary and the enemy tank does occasionally get stuck in a pattern, but will try to navigate towards you. sometimes. If you move around, it should break free since it does randomly try to come after you. I put together a pseudo random number generator since there was no rand() yet, and while useful, it could use more entropy. I use the old trick of seeding the algorithm by counting clock cycles while sitting at the "PRESS SPACEBAR TO PROCEED" screen. It has some known bugs such as when playing single player, the enemy tank will get stuck in a wall. I definitely want to learn how to do better collision detection.

 

Anyway I thought some of you might find it amusing, and feedback is certainly welcomed! I am having a blast with writing C code for the TI!

I wanted to thank JediMatt for providing me some started code and for his cool font that he made :) I wouldn't have been able to dive into this stuff were it not for being able to search this forum for pointers.

 

If anyone is interested in the source, I'll be glad to post it too. I'm refactoring some things and doing some cleanup, improving the "AI", and trying to squash a couple more bugs. My goal is to see about making a network-playable version eventually.

 

Cheers,

Corey/ElectricLab

 

 

combatti.bin

Edited by ElectricLab
  • Like 7
Link to comment
Share on other sites

That's pretty awesome! It works pretty well... your bounding box collision system seems to work pretty well... You should be able to prevent the AI from getting caught up, by checking if the location is legal after the move, and sending it back a pixel if it isn't. I seem to remember combat on the 2600 behaved in that bouncy sort of way.... :) Unless what is happening is indecision... for that you might force it to go a minimum number of turns in the same direction before changing direction... and maybe veto it turning 180 degrees twice in a row.

 

I also recall diagonals in the 2600 game.... And if you want to get to stretch goals, I really enjoyed the original combat's bouncing shots. But, your goal of network playable would understandably override any worries of combat feature parity... :)

 

Pretty cool!

 

-M@

Link to comment
Share on other sites

That's pretty awesome! It works pretty well... your bounding box collision system seems to work pretty well... You should be able to prevent the AI from getting caught up, by checking if the location is legal after the move, and sending it back a pixel if it isn't. I seem to remember combat on the 2600 behaved in that bouncy sort of way.... :) Unless what is happening is indecision... for that you might force it to go a minimum number of turns in the same direction before changing direction... and maybe veto it turning 180 degrees twice in a row.

 

I also recall diagonals in the 2600 game.... And if you want to get to stretch goals, I really enjoyed the original combat's bouncing shots. But, your goal of network playable would understandably override any worries of combat feature parity... :)

 

Pretty cool!

 

-M@

 

 

The way it works is that if the enemy collides with anything, it will try to turn and go a different direction. It will also move for a random amount of time in a straight line and stop, then will randomly either move towards you, or move in a random direction. All it really keeps track of is whether it needs to go a different way because of a collision, and move for a pre-set random amount of time. I literally hacked the AI together in 2 hours this afternoon and already have lots of ideas. I like the idea of forcing the thing back out of an illegal location. And diagonal should actually be easy, as well as ricocheting projectiles! I don't think I can detect two key presses at the same time or not with js99er anyway. I noticed that I can't drive and shoot at the same time but of course it works on the TI console.

 

As for network play, I think this is a perfect game to test out some theories I have about how to do it. There's not a lot of information to exchange so I'm hoping I can make it fast enough to still be playable.

Link to comment
Share on other sites

Version for MAME using RPK. If you unzip the RPK file you see a simple layout.xml that can be used for all such programs; just change the filename in the layout file, create a ZIP file with the ROM dump and the layout file inside, and rename it to something.rpk.

 

I don't hear sound - is that OK?

combatti.rpk

  • Like 2
Link to comment
Share on other sites

Version for MAME using RPK. If you unzip the RPK file you see a simple layout.xml that can be used for all such programs; just change the filename in the layout file, create a ZIP file with the ROM dump and the layout file inside, and rename it to something.rpk.

 

I don't hear sound - is that OK?

 

Nope, no sound yet. Still very beta!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...