Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Powereleven

Pages: 1 2 [3]
31
Graphics / Views
« on: January 27, 2018, 03:26:47 am »
Quick question: on the view topic there is this line:
view.setViewport(sf::FloatRect(0.25f, 0.25, 0.5f, 0.5f));
why didn't the writer use the sufix f in the second parameter and used in the other 3?

32
SFML projects / Re: Flappy-Bird Clone Attempt
« on: January 27, 2018, 02:29:10 am »
1) To be honest I don't know if I should call the app object (of type RenderWindow) on the function or the constructor. I still didn't learn to handle multiple views (intend to read that tutorial in the future, (it wasn't necessary for this project)), but I imagine that if the same object has to be used on two views, I should call it on the draw function so I can specify on which one right? (If that was a terrible assumption, sorry :P)
2) A Game Class is a good idea, but I thought this project was too small to deserve another class   ;D

33
SFML projects / Re: Flappy-Bird Clone Attempt
« on: January 26, 2018, 02:47:28 am »
@Tigre Pablito
I attempted to do what you suggested in the Collision.h file and it worked. I don't know if it is the only way to do it though. It was pretty meach trial and error until I got it right  :P 
Some critique about this second version would be great. By the way, I am also new to GitHub, so just a quick question: is it possible to download the sounds I upload there? Because I click to download them and it's not working lol. Sorry for my stupid questions.

https://github.com/Powereleven/Flappy-Bird---2nd-attempt

34
SFML projects / Re: Flappy-Bird Clone Attempt
« on: January 25, 2018, 03:44:29 am »
@Tigre Pablito thanks for this explanation. But if it isn't asking too much, is it possible to give me a practical example with 2 classes so I can see exactly how it works?

35
SFML projects / Re: Flappy-Bird Clone Attempt
« on: January 25, 2018, 12:23:14 am »
"Since you're doing a classic entity based design, you should put the logic into your entities. For example,
 add the bird controls into the Bird class."

@Mario what if the bird functions depend on objects of another class that are just created in main?
For example in:  if(bird.counter%3==0){current_obstacle_x = first->x; current_obstacle_y = first->y;} , where first is an object of another class which is just created in main and current_obstacle_x and current_obstacle_y are variables created in main.

36
SFML projects / Flappy-Bird Clone Attempt
« on: January 24, 2018, 09:13:55 pm »
Hello forums,
I created my first project using sfml but as an inexperienced programmer some constructive criticism, guidance and tips for my future projects would be good. If you like reading random code. Feel free to check it out :)

https://github.com/Powereleven/Flappy-Bird-Clone

Pages: 1 2 [3]
anything