Help making a program :/
Dec 14, 2014 at 1:53am UTC
Hi there! :D
i need help (a lot of help) making a poker program that
-gives out 5 cards to players
Last edited on Dec 14, 2014 at 10:18pm UTC
Dec 14, 2014 at 1:58am UTC
We cannot write your program for you. We only walk you through it.
Dec 14, 2014 at 3:03am UTC
Look into:
Programming syntax.
Arrays/Vectors.
Functions.
Variables.
Pretty much everything that's included in the basics of programming.
Oh, and if you're planning on making your game "graphical", you'll have to look into a Library. I'd highly recommend SFML 2.1, because it's pretty easy.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
void Game::run(void )
{
const auto timesPerFrame = sf::seconds( 1.f / 60.f );
sf::Clock clock;
sf::Time timeSinceLastUpdate = sf::Time::Zero;
while (mWindow.isOpen())
{
processEvents();
timeSinceLastUpdate = clock.restart();
while (timeSinceLastUpdate > timesPerFrame)
{
timeSinceLastUpdate -= timesPerFrame;
processEvents();
update(timesPerFrame);
}
render();
}
}
That's the code that my program runs once per frame to update according to game logic and render all the sprites to the screen.
Topic archived. No new replies allowed.