Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


kaktusas2598

Member Since 25 Mar 2010
Offline Last Active Jun 30 2015 08:02 AM

Posts I've Made

In Topic: Game event loop using ncurses library

09 January 2015 - 06:53 AM

Do you use clear(); to clear the screen?

Yes. Thats why its flashing.


In Topic: Game event loop using ncurses library

09 January 2015 - 06:26 AM

The timeout function can be used to set how long getch will wait for input. timeout(0) will make getch() return immediately, and if there was no input the return value is ERR.

This works. I set 100ms timeout, but still rendering looks awful - it clears screen on every call to render(), So I get this flickering, flashing effect.


In Topic: Game event loop using ncurses library

09 January 2015 - 06:19 AM

You can use "select()" or (preferably) "epoll()" to see if stdin has data on it before calling "getch()" to process it.

 

Firstly, thanks for reply. Just one question - will it work only on linux? I am preffering cross-platform solutions, but it may work for now.


In Topic: Looking for a good way to make games in C/C++ on linux for cross-platform

09 January 2015 - 06:07 AM

I am developing for Linux maybe, but my apps are cross-platform, so my recommendations are:

2D/windowing/events/audio - SDL2;

3D - OpenGL

And a lot of more libraries which a cross-platform(FreeGlut, Box2D, etc...)


In Topic: Noob in need

08 January 2015 - 03:05 AM

I highly recommend you to follow these tutorials: http://lazyfoo.net/tutorials/SDL/index.php . You will learn basic game programming concepts with SDL(You will be using it for windowing, events, sound and graphics) and maybe later on you can start to dig OpenGL and create more sophisticated rendering 2D or 3D.


PARTNERS