![]() |
| | #1 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| nort, yet another tron game ![]() This is nort, "tron" spelled backwards. It's a simple tron game with AI written with the SDL in C++. I used git for version control, and wrote the whole thing in a very short period of time. (I think it was less than 24 hours.) There's no documentation, sorry. :P http://dwks.theprogrammingsite.com/m...ort-1.1.tar.gz -- source with Linux 64-bit executable http://dwks.theprogrammingsite.com/m...rt-1.1-win.zip -- source with Windows executable (you'll need SDL.dll) I used just plain SDL, no other libraries. The Windows executable should run with just SDL.dll (which you can get from my other projects, e.g. sailseas, or the SDL website). Instructions: - Press space to start a new game. All four AIs will battle it out by default; if you want to play, press '2' to disable AI for player 2 (green), and use the arrow keys to control it. - Press '1' to disable AI for player 1 (red), and use asdf to control it. - Press END to speed up the game, or space to abruptly start a new one. - See the README.txt for details. Other features are: - The game area wraps when you hit the edges. It makes it a lot harder. - The AI is very difficult to beat. You can trick it, though, especially if you know how it works. I'll leave it to the reader to discover this from the source. ![]() - The code's reasonably well modularized. You can, for example, add other AIs if you wish. There are a few bugs with the program; I guess the only annoying one is that AIs sometimes crash into each other. ![]() Anyway, I have to run now. Feedback welcome. I'm now working on other projects, of course, but I thought this was interesting anyway. DWK P.S. I was beating one of the AIs once after 63 games. I had won 17 games, (the worst) AI had won 16. ![]() [edit] By the way, I didn't specifically release the code under a license -- maybe with the next version, if there ever is one -- but if anyone wants to change it, you can consider it released under the GPL version 3. [/edit]
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort Last edited by dwks; 05-27-2009 at 12:03 PM. |
| dwks is offline | |
| | #2 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| Just thought I'd post a belated screenshot.
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort |
| dwks is offline | |
| | #3 |
| Woof, woof! Join Date: Mar 2007 Location: Australia
Posts: 3,139
| It's fun, especially when you co-play with the AI. FYI, I had no problem compiling and running on 32-bit Arch Linux. I can see why you stopped using CMake, I don't like it anymore either ;-). I was shocked to see how small your AI code is... Now all you need to do is wack xuni over it ;-). As a library that is, so the rest of us can use it Last edited by zacs7; 06-09-2009 at 03:14 AM. |
| zacs7 is offline | |
| | #4 |
| and the hat of copycat Join Date: Sep 2007
Posts: 393
| fun game. ![]() AIs are too tough though. ![]() I guess the best strategy to progress is to barricade the AIs and immobilize them rather than evade them and avoid getting hit. Good work dude.
__________________ Not everything that can be counted counts, and not everything that counts can be counted - Albert Einstein. |
| stevesmithx is offline | |
| | #5 | |||||
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| Quote:
).Quote:
But I used an ordinary Makefile here because CMake seemed like overkill. Quote:
Quote:
Quote:
Sometimes the best strategy is to hope that the AIs will crash into each other, though. :P Glad you guys liked it. Feel free to add a rand()%50 to make the AIs do stupid things every now and then . . . .
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort | |||||
| dwks is offline | |
| | #6 | |
| The wheel reinvent0^r Join Date: Aug 2008 Location: Србија
Posts: 115
| This is a great game to kill time. Very fun indeed.
__________________ I reinvent the wheel to understand how it works. Platform: Windows XP SP2 Professional Edition Compiler: GCC 4.3.0 Editor: Notepad++ 5.4.2 Notes: Successfully using MSYS, loving my Windows makefiles. Never, ever use Cygwin. --Quotes-- Quote:
| |
| hauzer is offline | |
| | #7 |
| Hail to the king, baby. Join Date: Oct 2008 Location: Faroe Islands
Posts: 713
| omg this game is so awesome ![]() Me and my friend were playing on the same keyboard, like multiplayer, and we literally laughed so much we couldn't breath xD This is not offence, as we didn't laugh AT the game, just AT ourselves and how much retarded stuff we did xP ofc we added some of our own humor to it, as in, saying funny stuff, but still, great game It's simple, it's fun and it's cross-platform, 10/10 from me |
| Akkernight is offline | |
| | #8 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| Glad you guys like it. ![]() I must admit that I agree it's much more fun in multiplayer. It's pretty hilarious. I'm not sure why, but it is. ![]() One of these days I'll have to add in third/fourth multiplayer controls. Though I don't know how well that would work on one keyboard. Anyway, see you later.
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort |
| dwks is offline | |
| | #9 |
| Frequently Quite Prolix Join Date: Apr 2005 Location: Canada
Posts: 7,629
| Since theprogrammingsite is down for a while (I'm sorry . . .), I've attached the nort archives to this post. Just rename them to remove the .txt extension. I really sorry about theprogrammingsite -- I'll try to get it up as soon as possible.
__________________ dwk Seek and ye shall find. quaere et invenies. "Simplicity does not precede complexity, but follows it." -- Alan Perlis "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra "The only real mistake is the one from which we learn nothing." -- John Powell Other boards: DaniWeb, TPS Unofficial Wiki FAQ: cpwiki.sf.net My website: http://dwks.theprogrammingsite.com/ Projects: codeform, xuni, atlantis, etc. New project: nort |
| dwks is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Open Source / Semi Open source game idea. Help needed | CaptainPatent | Projects and Job Recruitment | 10 | 05-16-2007 10:44 AM |
| game engine advice? | stien | Game Programming | 0 | 01-23-2007 03:46 PM |
| how do the game engine and the api interact? | Shadow12345 | Game Programming | 7 | 06-05-2002 10:06 PM |
| My Maze Game --- A Few Questions | TechWins | Game Programming | 18 | 04-24-2002 11:00 PM |