Sign in to follow this  

A project to get back into the groove

This topic is 2038 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Recently I've been relearning C++ to better prepare myself for moving into some extremely minor game dev. So I've come here to ask, [b]What kind of project / assignment would cover most everything in C++?[/b] I don't mean, EVERY SINGLE KEYWORD but almost every subject. Classes, Polymorphism, vectors, templates and the list goes on. I can make small project with each single subject or a few subjects in one, but too have a project where I can see all of them working as one I believe, would give me a better understanding of the big picture

EDIT: Maybe I should have put this in "General Programming" But the title here is "For Beginners" so. Edited by Inuyashakagome16

Share this post


Link to post
Share on other sites
When I got back into C++ a few months ago I programmed a blackjack game. There's plenty to get your teeth into - loops, classes, vectors - you can make it as complicated as you want and there's plenty of ways of "extending" it (adding computer players, making the AI better, graphics, betting etc etc).

Share this post


Link to post
Share on other sites
[quote name='sednihp' timestamp='1336770048' post='4939409']
When I got back into C++ a few months ago I programmed a blackjack game. There's plenty to get your teeth into - loops, classes, vectors - you can make it as complicated as you want and there's plenty of ways of "extending" it (adding computer players, making the AI better, graphics, betting etc etc).
[/quote]

That wouldn't be too bad actually. O.o More or less, I'm trying to figure out what would go where you know? Because I'd end up making it with simple stuff and said its done lmao. Btw, how would you use vectors in a blackjack game? to store the random numbers?

Share this post


Link to post
Share on other sites
Each player's cards can be stored in a vector - they start with 2 but can hold as many as they want until they go broke or stand.

Start off simple - create a way to model a card, then create a vector of them, then find a way of shuffling the pack, then dealing out a certain number etc etc. Start small, work up in steps. Having something small that works along the way is a lot more exciting and likely to keep you interested then going for broke in one step and flaming out with nothing to show for it.

Blackjack can almost literally cover everything - I learnt basic C++, SDL, game loops, state machines, AI and probably a whole hell of a load of other stuff from coding blackjack. You can do as much with it as you want to really.

Share this post


Link to post
Share on other sites
Realistically I think that any player-vs-computer game can cover a wide range of programming topics. For almost any given problem in game programming you can solve it a simple way that uses relatively few keywords and features, or a complex way that uses everything. The complex programming solutions tend to appear when you try to re-use the maximum amount of code possible. That's when you need templates, polymorphism, etc.

Share this post


Link to post
Share on other sites
Run [url="http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx"]through this tutorial.[/url] Its a 10 part tutorial on creating a pong game in C++ using SFML, but it ticks just about every category you just described. ( classes, inheritance, STL, etc... )

Share this post


Link to post
Share on other sites
[quote name='sednihp' timestamp='1336781359' post='4939463']
Each player's cards can be stored in a vector - they start with 2 but can hold as many as they want until they go broke or stand.

Start off simple - create a way to model a card, then create a vector of them, then find a way of shuffling the pack, then dealing out a certain number etc etc. Start small, work up in steps. Having something small that works along the way is a lot more exciting and likely to keep you interested then going for broke in one step and flaming out with nothing to show for it.

Blackjack can almost literally cover everything - I learnt basic C++, SDL, game loops, state machines, AI and probably a whole hell of a load of other stuff from coding blackjack. You can do as much with it as you want to really.
[/quote]
I will look into that for sure. o.o sounds like it'll be what i want.

[quote name='jefferytitan' timestamp='1336791003' post='4939484']
Realistically I think that any player-vs-computer game can cover a wide range of programming topics. For almost any given problem in game programming you can solve it a simple way that uses relatively few keywords and features, or a complex way that uses everything. The complex programming solutions tend to appear when you try to re-use the maximum amount of code possible. That's when you need templates, polymorphism, etc.
[/quote]
Very true. Honestly my issue is trying to find where the more advanced topics or subjects in C++ are used in programs. Some i can look at and tell for sure but others not so much.

[quote name='Serapth' timestamp='1336846218' post='4939604']
Run [url="http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx"]through this tutorial.[/url] Its a 10 part tutorial on creating a pong game in C++ using SFML, but it ticks just about every category you just described. ( classes, inheritance, STL, etc... )
[/quote]
lmao the pure irony here. I was actually trying to find a project to go through before I started your tutorial. :P That website is pretty much my homepage right now. I wanted to be up to speed a bit more before I touched it honestly.

Share this post


Link to post
Share on other sites

This topic is 2038 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this