Page 2 of 3

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 11:29 am
by thejahooli
I agree with everything dandymcgee has said. A project like this will help you learn how to structure a game well and will also give you a better impression of how to code more like a games programmer. Even if this project does not get very far, it will be a good learning experience regardless and will likely make you a better programmer in the long run.

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 11:50 am
by dandymcgee
Van-B wrote:Yeah, before long you'll know if your game needs more visual stuff or if it can get by with just the console interface. String handling can be a pain in C++, so sticking with the console during development makes sense. I guess what I'm thinking of is a replacement for the console, like your own custom console with retro quirks like amber screens, smooth fonts, scanlines etc - mainly because I think people would be more likely to play that, than something with a plain console window.
I think you're sending this guy some very confusing mixed signals right now. First you tell him an RPG is much too complicated and he should strive for something simpler, then proceed to tell him a console game is too simple and boring and he should add a bunch of aesthetically pleasing graphics to make it look better. His question was regarding Lua and simple console text attributes, he's already said numerous times that he plans to create a console-based text adventure style game.

Kaktusas2598: I have done a little with it mostly using various online resources as needed. If you plan to implement Lua you'll want to first research C++ wrapper such as LuaBind and toLua++. Deciding how exactly you want to wrap scripts into the engine will be the hardest part, as once that's implemented creating Lua scripts is simple.

Also, yes windows.h does have a SetConsoleTextAttribute() function which includes the ability to set the color of the text. This is obviously Windows specific, and will not allow your code to be compiled on other operating systems. Not necessarily a bad thing, just something to take note of.

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 12:31 pm
by Van-B
P.S. Other way of doing it - I can also implement simple graphics in console just to represent map, highlight player choise, show stats, show this in different colors, for this i would create some sort of drawing engine, does windows have capability of doing this? I heard what <windows.h> have all needed function... Have any ideas about it, it would really nice to avoid just white text on black screen....
I suggested that he try smaller projects because I didn't realise he had experience already. I know it's shallow as hell, but I just wouldn't play a console game with white text - even the ZX Spectrum tended to have custom fonts. I thought that maybe he was opting for a console window because he just wasn't sure how to get started with 2D engines, but I know I should read posts more carefully :).

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 1:19 pm
by kaktusas2598
1. I completely agree with you that it will be boost in my programming career and experience EVEN it is just console game but it could have all game specific things like game loop and etc.
2. What do you mean by C++ wrapper for Lua. It id\s some sort of library for easier use and implement scripting into your engine or what? What I'm thinking I can learn Lua first (I will need all basics and learning it will be pretty easy and quick job cause I already have programming experience), when learn how to implement Lua into my engine and then writing script... Am I thinking right?

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 1:22 pm
by kaktusas2598
One more little question, as I first try to create it, I think it will use text commands and of course for storing them i will use char* or std::string... What you think of each of these and what you are recommending? I am familiar with both ways.

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 1:57 pm
by thejahooli
I like std::string, but that is probably because my C++ book only ever used those. There is no functionality that a char* has which a std::string doesn't, as far as I know (feel free to correct me if I'm wrong).

In terms of Lua, I wouldn't start thinking about that until you truly need it.

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 4:02 pm
by dandymcgee
There should be no problem using std::string for commands.
thejahooli wrote: In terms of Lua, I wouldn't start thinking about that until you truly need it.
I disagree. Adding it halfway through your project is going to be MUCH harder than designing your engine with Lua in mind from the start.

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 4:43 pm
by Falco Girgis
Whether an application is running in a "command-terminal" or as a GUI application has nothing to do with its complexity.

Some of the most hardcore programs that I have written have been black-box console applications to either test a theory, algorithm, or design. Lots of the times, when I'm developing something to be modular, I start with a fresh project anyway.

In general, displaying something with a GUI is more difficult than printing something to the terminal window with the C/++ standard library, but the actual task of "rendering" is usually not even a tenth of the complexity that is really happening in a modern graphical application...

Re: What u think about coming back to console for one project?

Posted: Wed Mar 09, 2011 4:47 pm
by thejahooli
dandymcgee wrote:
thejahooli wrote: In terms of Lua, I wouldn't start thinking about that until you truly need it.
I disagree. Adding it halfway through your project is going to be MUCH harder than designing your engine with Lua in mind from the start.
I'm only saying this because he might not need Lua at all through this project. If absolutely necessary then it would be better added from the start as you said, but it might not be needed at all.

Re: What u think about coming back to console for one project?

Posted: Thu Mar 10, 2011 1:11 am
by kaktusas2598
Well for RPG type game, scripting would be needed, with Lua implemented game code would be cleaned...
SO thanks, I think I will start designing it after I will finish SDL Pong clone.

Re: What u think about coming back to console for one project?

Posted: Thu Mar 10, 2011 1:13 am
by kaktusas2598
GyroVorbis wrote:Whether an application is running in a "command-terminal" or as a GUI application has nothing to do with its complexity.
Thanks for this Idea. I thought same way.

Re: What u think about coming back to console for one project?

Posted: Thu Mar 10, 2011 1:40 am
by MadPumpkin
Alright, so first of all. This sounds great, and honestly I would be happy to help with anything you might need. Because I love text based games. (I still play them)
But here's the thing, I agree with... I don't know who's post, that you should not use a console, make your own console with SDL. If you need help, I can help you out. Not with the SDL part, I use OpenGL it's been too long since I used SDL. However, I could help explain the theories, and I'm sure no one else would mind helping. But what this gives you is that you have the ability at your finger tips to alter anything from color, typeface, size of font, text decoration (bold, italic, underline, cross out).

USE LUA, especially if you do what I suggested above, it will help a lot with the changing typefaces and crap. But the best part is what I did with an old one that I made with OpenGL, I used LUA so that with typing into the window, I could reload an external LUA file, and I pretty much sat down for about 2-3 hours and just made quests in real time. So in a way it was like a level editor, but for a text based game.

Re: What u think about coming back to console for one project?

Posted: Thu Mar 10, 2011 2:11 am
by Aleios
For this you could simply use SDL and make texture of ascii which would also allow for the users to make graphical sets. Also this would allow cross platform development, and would be alot simpler than going and using the cmd window which is a bitch to clear and redraw. Or you could render using the freetype library. If you have ever heard of Dwarf Fortress, its basically a rogue-like and uses SDL along with the texture idea. Its an rpg style game when playing adventurer. You could even use the curses library, which is great for text based games, or at least i like it...

Re: What u think about coming back to console for one project?

Posted: Thu Mar 10, 2011 6:20 am
by superLED
I would suggest to use SDL or any other graphical library. Not to make a 2D game or anything - still text based.
It would be more appealing for the eyes, and you can play with the font, colors, add some music and sounds.. yeah, a lot more than the console can handle (on the quality side, at least).

Good luck!

Re: What u think about coming back to console for one project?

Posted: Thu Mar 10, 2011 6:58 am
by kaktusas2598
Thanks guys, your Idea is awesome :D I will use SDL, maybe later I can make it even cooler and add graphics, I think I will create several SDL_Surface pointers ro represent text.. I can't wait to get my hands dirty :D Along side i will learn Lua and implement it in engine, but one thing I need first is storyline...