A nice little game I made
- Massive_Atom
- Posts: 4
- Joined: July 27th, 2017, 9:46 pm
A nice little game I made
So I did this with what little knowledge I acquired from Chili's beginner C++ tutorials up until right before the snake game. Source and game included in post!
The box(player) is controlled only by the mouse. The player's goal is to dodge all the balls except the ball that is glowing. Currently the goal is 5. So you only have to collect the target ball 5 times to win. There are 10 other balls that you need to dodge.
If you wish to increase the goal and "bad balls" you can do so in the source
As far as I know, the progress bar is completely dynamic to the goal number you set. I have tested with the goal being as high as 100 and as low as 1. The game should end properly when goal is reached. Also, you shouldn't be able to win before the bar reaches the edge of the screen nor should it ever extend passed the screen width. Not to mention that the progress bar is linked to the window width. so adjusting the screen size shouldn't be an issue
Small note: you have a short moment of invincibility when the game starts. This is to prevent panic and immediate collision if a ball happens to randomly spawn at the start point. Have fun! tweak that fucker a little! I'd love to see variations from other beginners!
The box(player) is controlled only by the mouse. The player's goal is to dodge all the balls except the ball that is glowing. Currently the goal is 5. So you only have to collect the target ball 5 times to win. There are 10 other balls that you need to dodge.
If you wish to increase the goal and "bad balls" you can do so in the source
As far as I know, the progress bar is completely dynamic to the goal number you set. I have tested with the goal being as high as 100 and as low as 1. The game should end properly when goal is reached. Also, you shouldn't be able to win before the bar reaches the edge of the screen nor should it ever extend passed the screen width. Not to mention that the progress bar is linked to the window width. so adjusting the screen size shouldn't be an issue
Small note: you have a short moment of invincibility when the game starts. This is to prevent panic and immediate collision if a ball happens to randomly spawn at the start point. Have fun! tweak that fucker a little! I'd love to see variations from other beginners!
- Attachments
-
- Game Source.zip
- The source :D
- (315.85 KiB) Downloaded 195 times
-
- Game.zip
- The game :D
- (539.2 KiB) Downloaded 225 times
Re: A nice little game I made
Hey atom, welcome to the forum! Game looks pretty sweet, thanks for sharing. I'll try and show this off next time I do an update video.
Will also take a peek at the code later and give you some feedback if you're interested.
Will also take a peek at the code later and give you some feedback if you're interested.
Chili
- Massive_Atom
- Posts: 4
- Joined: July 27th, 2017, 9:46 pm
Re: A nice little game I made
Thank you and I would absolutely love some feedback!chili wrote:Hey atom, welcome to the forum! Game looks pretty sweet, thanks for sharing. I'll try and show this off next time I do an update video.
Will also take a peek at the code later and give you some feedback if you're interested.
Re: A nice little game I made
Overall, good organization on the code I think. Some advice would be, a) mind the const correctness on your pass-by-reference params (for example, Ball::IsColliding), and for the box drawing routine, a loop would have been a much better choice than a sequence of putpixel calls.
Chili
- Massive_Atom
- Posts: 4
- Joined: July 27th, 2017, 9:46 pm
Re: A nice little game I made
Thanks! Will be sure to keep the const correctness in mind.chili wrote:Overall, good organization on the code I think. Some advice would be, a) mind the const correctness on your pass-by-reference params (for example, Ball::IsColliding), and for the box drawing routine, a loop would have been a much better choice than a sequence of putpixel calls.
-
- Posts: 19
- Joined: July 17th, 2017, 1:24 pm
Re: A nice little game I made
good game mater, not for the impatient but nice and clean.. and I'm "borrowing" your mouse controls.
- Massive_Atom
- Posts: 4
- Joined: July 27th, 2017, 9:46 pm
Re: A nice little game I made
"...I'm 'borrowing' your mouse controls..."OrbitalReign wrote:good game mater, not for the impatient but nice and clean.. and I'm "borrowing" your mouse controls.
Haha Go ahead and use them!
what do you mean by "...not for the impatient..."
No restart capability?