Jump to content

  • Log In with Google      Sign In   
  • Create Account

Open source projects?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Crusable   Members   -  Reputation: 594

Like
0Likes
Like

Posted 12 January 2013 - 02:31 AM

Hello, does anyone know where i can find some simple open source c++ and sfml games. Simple games that i can play around with and see how it works. Games like pong, snake, or tetris would be nice. Thanks.



Sponsor:

#2 Roots   Members   -  Reputation: 728

Like
4Likes
Like

Posted 12 January 2013 - 09:55 AM

I don't know of any simple games unfortunately. Try looking through The Linux Games Database or The Linux Game Tome (unfortunately this site is down at the moment).

 

 

My project, Hero of Allacrost, is an open source 2D RPG written in C++. Unfortunately however, it is not simple (over 200,000 lines of code), but it is one of the best organized, commented, and documented code bases out there as far as open source projects go. We get compliments regularly on the quality of our code, which gives me happy nerd feelings. :) If you're interested in taking a look, you can find the code here and we have a lot of documentation up on our wiki here. I recommend browsing through the wiki documentation first (especially the Quick Start Guide) to get an overview of how the code is organized and what it is capable of, then dive in to the header files and read the comments in there that describe the APIs. You can also run doxygen on the codebase to generate automated documentation if you desire.


Hero of Allacrost --- http://www.allacrost.org
A free, open-source 2D RPG in development.

Latest release Oct. 10th, 2010.

#3 Khatharr   Crossbones+   -  Reputation: 3040

Like
-8Likes
Like

Posted 13 January 2013 - 03:08 AM

http://www.google.com
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#4 jbadams   Senior Staff   -  Reputation: 19379

Like
4Likes
Like

Posted 13 January 2013 - 05:04 AM

In addition to Hero of Allacrost you might also take a look at Secret Maryo Chronicles and Battle For Wesnoth.  Again, neither of them is really simple, and neither uses SFML, but you might find them valuable.  You could try looking through the "SFML projects" forum in the official SFML development community for anything open sourced.

 

 

I do have some advice on learning from sourcecode however:  remember that you're seeing an end product rather than the process that went along with it.  When you're looking at sourcecode you can (usually) figure out the how but not the why.  You don't know if the programmer used a particular technique because they thought it was best, because they were simply unaware of alternatives, because they had to meet specific requirements that you might have, etc.  I never go so far as to tell someone they shouldn't bother reading source-code from completed games, but be sure you take what you see with a healthy grain of salt.  Just because it worked for them doesn't necessarily make it a good choice for you.



#5 Crusable   Members   -  Reputation: 594

Like
0Likes
Like

Posted 13 January 2013 - 06:43 PM

http://www.google.com

I tried that, and couldn't find anything

 

In addition to Hero of Allacrost you might also take a look at Secret Maryo Chronicles and Battle For Wesnoth.  Again, neither of them is really simple, and neither uses SFML, but you might find them valuable.  You could try looking through the "SFML projects" forum in the official SFML development community for anything open sourced.

 

 

I do have some advice on learning from sourcecode however:  remember that you're seeing an end product rather than the process that went along with it.  When you're looking at sourcecode you can (usually) figure out the how but not the why.  You don't know if the programmer used a particular technique because they thought it was best, because they were simply unaware of alternatives, because they had to meet specific requirements that you might have, etc.  I never go so far as to tell someone they shouldn't bother reading source-code from completed games, but be sure you take what you see with a healthy grain of salt.  Just because it worked for them doesn't necessarily make it a good choice for you.

 

Thanks, the problem i am really having is how people would set up their OO designs. I have tried a few, but most of them failed, i thought that if i had some examples that It would help me to better understand it,



#6 Roots   Members   -  Reputation: 728

Like
2Likes
Like

Posted 13 January 2013 - 10:34 PM

It took us a long time and a lot of trial and error before our OO design felt like it was done well. How did your previous designs fail, and why? When I'm designing a  new component to our code base, the way I go about doing the design is as follows:

 

1) Think about it for a day or two, just in the back of your mind, about what classes you would need and what their relationship to each other will be

2) Once I have a first concept of the design, I share my design proposal with my team and get feedback, adjusting it as they point out flaws or possible ways to improve it

3) Implement my design and get all of the essential components working. Use the component and make any improvements so that it works as well in practice as it does in theory.

4) Add on more advanced features as required. If I find the design is not accommodating new features well, adjust and refactor as appropriate.

5) Repeat #4

 

This is what I have found works for me, but YMMV. Also it's important to keep in mind what your goal for your code is. Do you want to just get it up and running ASAP, or do you want to invest the time to produce a robust and more maintainable architecture? Creating designs that are more focused on long term goals will cost you more time up front to build, but they will (hopefully) save you time in the long haul. There's nothing wrong with slapping together some sloppy code as a proof of concept, or just to get some ideas about what a proper design "should" do. Just use it in moderation, as no one likes sloppy code. :)


Hero of Allacrost --- http://www.allacrost.org
A free, open-source 2D RPG in development.

Latest release Oct. 10th, 2010.

#7 wintertime   Members   -  Reputation: 1878

Like
0Likes
Like

Posted 14 January 2013 - 07:49 AM

I think you can not glean on some sourcecode to find out how to do OOD. It would be better to read about SOLID: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod

And yes I know these are old, but still very helpful.



#8 BeerNutts   Crossbones+   -  Reputation: 3000

Like
0Likes
Like

Posted 14 January 2013 - 09:51 AM

FWIW, my Old Blog (Linked in my signature below) details the steps I take to make a fairly simple C++ game (a top-down shooter-type game).  The source code is included.

 

Also Serapth has steps he takes to make a Tetris game using SFML; that's a good one to follow. Click here.


My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS