Page 1 of 1

A nice little game I made

Posted: August 13th, 2017, 10:55 am
by Massive_Atom
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 :D
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! :)

Re: A nice little game I made

Posted: August 14th, 2017, 1:09 am
by chili
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

Posted: August 19th, 2017, 5:35 am
by Massive_Atom
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.
Thank you and I would absolutely love some feedback!

Re: A nice little game I made

Posted: August 22nd, 2017, 1:28 am
by chili
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.

Re: A nice little game I made

Posted: August 24th, 2017, 5:39 am
by Massive_Atom
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.
Thanks! Will be sure to keep the const correctness in mind. :oops:

Re: A nice little game I made

Posted: August 26th, 2017, 8:07 am
by OrbitalReign
good game mater, not for the impatient but nice and clean.. and I'm "borrowing" your mouse controls.

Re: A nice little game I made

Posted: August 31st, 2017, 5:09 am
by Massive_Atom
OrbitalReign wrote:good game mater, not for the impatient but nice and clean.. and I'm "borrowing" your mouse controls.
"...I'm 'borrowing' your mouse controls..."
Haha Go ahead and use them!

what do you mean by "...not for the impatient..."
No restart capability?