3H-GDC m.V: Something Special (winner: BeanDog)
Members - Reputation: 676
Posted 11 February 2006 - 07:29 AM
I learned that you can freely mix the win32 console functions and the .Net console functions; I can use the .Net Write to output text and the win32 wrapper for 'graphics'. I'm currently just using GetAsyncKeyState for input, but I'll see if I can mix it with the .Net console input for events, too.
Here it is; it isn't really all that much code, but I'd say it's pretty useful if you want to use C# but don't want to deal with horrible framerates or win32 console functions. (You still have to deal with input, though. I suggest using Console.KeyAvailable with Console.Read for events and GetAsyncKeyState for stuff like motion.)
Just a warning, in the demo app, you press up to exit cleanly. Sorry; I only added the arrow keys to my Keys enum so far.
Important: I just uploaded a bugfix so it won't crash if you try to read or write outside of the console window! If you got the old one in the first 10 minutes it was up, please get the new version!
[Edited by - nagromo on February 11, 2006 1:29:19 PM]
Crossbones+ - Reputation: 1707
Posted 11 February 2006 - 09:16 AM
Original post by Endurion
Just to be on the safe side. Here's a link to fixed worldtime. I'd like to have a link to this added everytime for a competition.
This makes my questions regarding timezones obsolete :)
No, I specified the time in GMT, it's the contestants responsibility to figure out what that means to them. If they can't figure out their relation to GMT, then they are apparently unable to double click the clock in your task bar.
Members - Reputation: 132
Posted 11 February 2006 - 10:18 AM
Actually I _might_ up the resolution to the maximum allowed... we'll see though, low is always cool :)
(I have a very zany game idea, we'll see if it'll work out at all)
Members - Reputation: 270
Posted 11 February 2006 - 10:35 AM
Unfortunently though, I won't be participating; it took me too long to decide that C#'s Console functions were too slow for animation.