I don't have any ideas to program

Started by
10 comments, last by skulldrudgery 17 years, 7 months ago
Hey again. I've been reading "Accelerated Cpp" for a while now(up to chapter 8, if anyone has it too) and the exercises from the book aren't that much fun anymore. Don't get me wrong, I think the book explains Cpp really well, but the "change-one-function-in-the-program-we-made-in-this-chapter exercises" don't really fulfill my needs to program fun stuff. So it's time to make some fun stuff. And nothing's more fun than making games, right? The problem is that I can't think of anything to make... Of course I have some ideas in the back of my head for when I master Cpp and sdl/opengl/direct3d, but for the moment I'll have to make do with the console. I've already looked into some threads and found one idea that would be possible to make: a simple battleship clone. A text-based rpg is also an option, but that would probably include using classes and I'd rather avoid that, because I haven't worked through classes in the book. Now, my question is: Do any of you have one or more game ideas for the console? I do like a challenge so the really simple stuff is not really an option. I've already done Guess the number, tictactoe and some other really simple stuff. Also keep in mind that I'd rather not touch too much stuff explained in the later chapters of my book (roughly: templates, classes, inheritance and memory management). I already know a bit about those concepts, but I'd rather exclude them until I've worked through them in the book. On the other hand, I'm always open for discussion, so if you think I _should_ use classes, polymorphism and whatnot right now, please say so too. Well, this became a longer story than I had in mind... Oh well. [edit] It has come to mind that everyone here has always been helpful and I haven't really contributed much to the forums. So,if anyone has a nice idea, I'd be happy to keep a record of the development of the game for fellow newbies(maybe for some discussion, idea sharing, or just so you can laugh at my progskills ;). That is, if anyone is interested. [Edited by - @root on October 17, 2006 4:42:23 PM]
Advertisement
Conway's Game of Life?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Now, that looks like a fun idea to work out. Thanks alot!

It appears, however, that the time has come to create a system for console drawing(the continuus stream of chararrays rolling down the console won't do this time).
I remember gametutorials had some stuff on this subject, but since they've gone all commercial and are asking money for the tuts now, that's a no go. What I did find was this. Would anyone consider this a decent way to do console graphics?

Also, if anyone has some more ideas on games, please let me know.
The complete details of Microsoft's Character-Mode Application interface can be found here. If you ask capn_midnight nicely, he might be able to unearth a link to the library they developed for his 4h console mode game contest.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
You could also take a look at the Windows Console tutorial by benryves, he provides a pretty good introduction to drawing in the console.

- Jason Astle-Adams

I DO recommend using ben's tutorial. I also recommend this one. It is not as sexy as benryves', but it goes over important things. They both helped me a lot when I wanted to do character mode games. I DO NOT like the tutorial you posted. Mainly because it is dated, uses horrid programming style, uses a 2D array of CHAR_INFOs instead of the proper 1D array. I'm pretty sure you can do it entirely (and much more quickly) without using any arrays at all, because the windows console supports multiple buffers. It also uses a fairly stupid method for writing a string to certain coordinates when there are much, much better ways.

A quick note: If you want your game to be played fullscreen, then you must leave the dimensions at the defualt of 80x25 OR you can change it 80x50.

If you want to see an old absolutely horrible text based pong clone from my glory days of n00b-dom, here is the link. It was my first version of text pong before I ever learned anything about the Win32 console (except the gotoxy function which I knicked from another webpage). And I am quite embarrassed and ashamed by it. It compiled fine in Dev-C++, and it flickers like hell.

EDIT: Fixed the link. Oh and BTW, if you are an advanced n00b, consider libcaca.

EDIT2: Actually, forget pong. Look at what the mighty garyfletcher accomplished. Damn it. The link to the source code has been taken down. It was an awesome tetris clone. You can try asking him for the code.

[Edited by - skulldrudgery on October 18, 2006 2:51:27 AM]
skulldrudgery--A tricky bit of toil
Ok, for anyone with interest in coding, try this one -

There is a simple land called Hedonia. The people of Hedionia speak the language Hedonian, which is as simple as its people. The Grammer of Hedonian goes this way

1. any letter from p-z is a sentence.
2. N followed by a sentence is a sentence.
3. C followed by two sentences is a sentence.

Can you write a program to validate a sentence in Hedonian?
never confuse the two T's - tools and truth
Quote:Original post by ammorphius
Can you write a program to validate a sentence in Hedonian?


Yuck. Sounds like Theory of Computation homework. :)
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Well you can make almost any game (well mostly turn based games) in console.

Go for poker, lights out, the tower of hanoi, checkers, Mastermind. Heck if you wana get complicated you would write a 2 player chess (the AI would be ridiculous to try at this point)

Just don’t let yourself be stuck on graphics. Sure when you think of a knight from chess you think of the horse head shaped piece but using the letter K works just as well from a game play standpoint.
I thank you all for the replies.

Just a couple of responses from my side:

@Fruny and others: The guides that were mentioned aren't "direct hits". They give some curious errors and the ascii chart seems to be limited to '?', as opposed to the 'A' that the guide presents. But I guess I should look into it somewhat better. The read it through and ctrl-c ctrl-v method might not be the best. The 3h competition has been interesting to look into to, though. I'm convinced I'll find some usefull information there.

@Joystickgenie: I agree. I never had the intention to make great looking ASCII graphics. I'm just looking to make/get something to make simple character manipulation easy to implement in my games. Even for semi-static games like chess, being able to draw characters(the 8x8 grid with the K's and Q's P's etc on it) without having to draw one board under another is just so much cleaner. Again, I'm not going for pretty, I'm only going for functional(at least, for now).

This topic is closed to new replies.

Advertisement