Jump to content
  • Advertisement
Sign in to follow this  
capn_midnight

3H-GDC m.V: Something Special (winner: BeanDog)

This topic is 4471 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Yay! I made my first C/C++ dll! (It wasn't quite as hard as I thought it would be.) It's a wrapper for the win32 console functions. Calling it from inside C#, I get 128 fps with randomly changing backgrounds in windowed mode; 512 fps in fullscreen. It looks great in fullscreen because 80x50 matches most widescreen resolutions, too. If you're using a 4:3 monitor the characters will appear as 1.2:1, but that's still better than 3:4 or 2:1.

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]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
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 :)

Clicky

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.

Share this post


Link to post
Share on other sites
Quote:
Original post by scgrn
Good luck everyone!!

*brews another pot of coffee*


Good night, everyone else!!

*steals pot of coffee from scgrn* [grin]

Share this post


Link to post
Share on other sites
Post if you're entering!

d000hg is in. And making a blow-by-blow of my development, to be released in about 3hrs 25min!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!