| SuperSi (2) | |
|
Hi Guys Desperately need help. I'm currently attempting to get Win32 Console Application to draw a line in the window...and for the life of me I cannot get it to work. I've poured over forums and websites galore but to no afail. Can anyone lend a hand or does someone have an example of the code which will cause the line to be drawn in the appilcation window? All i want is help understanding How i get the code to create it. I'm not worried about colours or funky shapes, I'd even settle for a box outline which I can place stuff into. This is all building up to a tetris clone I'm going to be working on but i'm trying to get the basics out of the way and Win32 seems like an important thing to have knowledge in. | |
|
Last edited on
|
|
| andywestken (1950) | ||||
|
Are you talking about a console-based Tetris clone? The console does not support any graphics, so there is no way to draw an actual line like the ones which a GUI app can display. (Also see PS) You can draw boxes using chars, but then you've got to make sure the right code page is being used (if using Ansi chars) or deal with Unicode. (This code assumes code page 437.)
Andy PS It is possible to make it look like a console can draw an image, etc. But than involves the use of a regular windows in front of the console. Getting this to work smoothly is prob. more trouble than coding a regular GUI app. | ||||
|
Last edited on
|
||||
| SuperSi (2) | |
|
Hi Andy thanks for the help! That has actually cleared alot up and does make sense! As a novice then what would you recommend using if I wanted to start out in 2d graphics? what would be the easiest GUI to get to grips with? I guess I want to be able to create solid blocks as well but as you point out above this is not something you can do in a console app. http://www.youtube.com/watch?v=oSgj7VkZkQk&feature=relmfu the link above is essentially what i want to achieve or atleast similar. Its the blocks that confuse me :S but I'm abit stubborn when it comes to asking. I apprecaite your help and anyone else who wants to jump in with advice :) | |
|
|
|
| andywestken (1950) | |
|
Also from YouTube.com Console Tetris http://www.youtube.com/watch?v=5-6GRyuQzbc C# Console Tetris Game http://www.youtube.com/watch?v=AyMer7UEhII I think I'm far too tainted, from working with assorted Windows technologies, to have a valid opinion on the best 2d graphics library for a novice programmer. But the name I see recommended the most often on this site is Allegro. Allegro - A game programming library http://alleg.sourceforge.net/ And this thread from Sept might be of interest: Game Programming | What library should I use? http://v2.cplusplus.com/forum/beginner/78297/ Andy | |
|
Last edited on
|
|