ElectricLab Posted November 24, 2016 Share Posted November 24, 2016 (edited) 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 November 24, 2016 by ElectricLab 7 Quote Link to comment Share on other sites More sharing options...
+Schmitzi Posted November 24, 2016 Share Posted November 24, 2016 Hi, when I load/open it in Classic99, I only get menue "1 FOR TI Baisc" Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted November 24, 2016 Share Posted November 24, 2016 (edited) Ralf, try it in js99er.net worked for me i found it very funny nice idea for a game like this + network -playable ! Edited November 24, 2016 by ti99iuc 2 Quote Link to comment Share on other sites More sharing options...
ElectricLab Posted November 24, 2016 Author Share Posted November 24, 2016 I did develop it on a MacBook with CentOS running as a virtual machine, and I did all my testing with js99er.net and I did copy it to an SD card and try it on real iron. My son and I tested it for a while using joysticks and had a few laughs 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted November 24, 2016 Share Posted November 24, 2016 Hi, when I load/open it in Classic99, I only get menue "1 FOR TI Baisc" Put a "c" at the end of the filename, for instance "combattic.bin" and Classic99 will open it fine. Nicely done. 3 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted November 24, 2016 Share Posted November 24, 2016 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@ Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted November 24, 2016 Share Posted November 24, 2016 Aside, one might guess that font is meant to look good saying things like "STAR WARS", and "JEDI" -M@ 1 Quote Link to comment Share on other sites More sharing options...
ElectricLab Posted November 24, 2016 Author Share Posted November 24, 2016 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. Quote Link to comment Share on other sites More sharing options...
ElectricLab Posted November 24, 2016 Author Share Posted November 24, 2016 Aside, one might guess that font is meant to look good saying things like "STAR WARS", and "JEDI" -M@ pure coincidence I'm sure Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted November 24, 2016 Share Posted November 24, 2016 Might this be helpful? Definitive Combat Disassembly 1 Quote Link to comment Share on other sites More sharing options...
+Schmitzi Posted November 24, 2016 Share Posted November 24, 2016 a cool game, tank you:) 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted November 24, 2016 Share Posted November 24, 2016 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 2 Quote Link to comment Share on other sites More sharing options...
ElectricLab Posted November 24, 2016 Author Share Posted November 24, 2016 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! Quote Link to comment Share on other sites More sharing options...
+mizapf Posted November 24, 2016 Share Posted November 24, 2016 Getting beta and beta all the time! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.