SFML community forums

General => SFML projects => Topic started by: paupav on August 20, 2014, 07:00:03 pm

Title: Bouncing Thingy v1.9
Post by: paupav on August 20, 2014, 07:00:03 pm
(http://s30.postimg.org/anograni9/screenshot82747794.png)
(http://s30.postimg.org/5av0zfa81/screenshot25658741.png)

(http://s30.postimg.org/87tzzfog1/image.png)
(http://s30.postimg.org/8w2uidn5t/2_2.png)

Fullres images:
http://s27.postimg.org/4b9qd19cx/image.png
http://s9.postimg.org/6upnx7dz1/image.png

Check it out and post feedback!
Source: http://www.mediafire.com/download/pjbedqke837l2hu/BouncingThingysourcev1.9.zip
Linux x64 precompiled: http://www.mediafire.com/download/1m1w6pwpc0v1513/BouncingThingyLinux64v1.9.tar.gz

Changelog:
-Escape shortcut to exit game
-ALt+ Enter to change from fullscreen to windowed and vice versa (options will be saved)
-Main menu added
-Options menu added
-new text that shows current ball speed
-take screenshots with F12

Please comment my coding!
Is my coding stupid, messy?

(click to show/hide)
Title: Re: Bouncing Thingy v1.9
Post by: Gobbles on August 21, 2014, 07:14:33 am
Congrats on getting a working game, it's the first step of many to greatness.

As for your questions, is your code messy? sure, but is it stupid? Nah, I don't believe any functioning code is stupid, maybe less optimal, but never stupid.

Take a look into some proper design and read up on using classes and Object Oriented Programming. I believe proper design is the key to making a great game without wanting to throw your computer out the window. It'll save you hours of frustrations in the future.

best of luck! and also I like your menu text, looks awesome.
Title: Re: Bouncing Thingy v1.9
Post by: achpile on August 21, 2014, 08:19:39 am
Just an advice.

        if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
            optionSelecter++;
        if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
            optionSelecter--;
 

I think it's better to use 'KeyReleased' event to handle situation like this. (to avoid skipping menu entries)