A nice little game I made

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
Massive_Atom
Posts: 4
Joined: July 27th, 2017, 9:46 pm

A nice little game I made

Post by Massive_Atom » August 13th, 2017, 10:55 am

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! :)
Attachments
Game Source.zip
The source :D
(315.85 KiB) Downloaded 151 times
Game.zip
The game :D
(539.2 KiB) Downloaded 182 times

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: A nice little game I made

Post by chili » August 14th, 2017, 1:09 am

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.
Chili

User avatar
Massive_Atom
Posts: 4
Joined: July 27th, 2017, 9:46 pm

Re: A nice little game I made

Post by Massive_Atom » August 19th, 2017, 5:35 am

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!

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: A nice little game I made

Post by chili » August 22nd, 2017, 1:28 am

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

User avatar
Massive_Atom
Posts: 4
Joined: July 27th, 2017, 9:46 pm

Re: A nice little game I made

Post by Massive_Atom » August 24th, 2017, 5:39 am

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:

OrbitalReign
Posts: 19
Joined: July 17th, 2017, 1:24 pm

Re: A nice little game I made

Post by OrbitalReign » August 26th, 2017, 8:07 am

good game mater, not for the impatient but nice and clean.. and I'm "borrowing" your mouse controls.

User avatar
Massive_Atom
Posts: 4
Joined: July 27th, 2017, 9:46 pm

Re: A nice little game I made

Post by Massive_Atom » August 31st, 2017, 5:09 am

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?

Post Reply