Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


learned c++, now what?


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 Mink   Members   -  Reputation: 169

Like
0Likes
Like

Posted 02 July 2013 - 11:39 PM

So recently I learned c++ pretty well, I wouldn't say I am proficient in it, but I think that will come with experience. I then tried unsuccessfully to install SDL and eventually just forgot about it because I was busy with school. but now it is summer so I have time to work on the game I want to make ( a simple 2D jumping on endless platforms kinda thing ). where should I start? and if anyone could point me in the direction of some resource that would be great! thanks :)



Sponsor:

#2 Chad Smith   Members   -  Reputation: 1139

Like
8Likes
Like

Posted 03 July 2013 - 12:17 AM

If you still interested in learning SDL then I would highly suggest the Lazyfoo SDL Tutorials.  These will get you started with SDL on your way.

 

On creating your game, the best way would be to just start learning/studying the API of your choice (seems to be SDL that you're interested in) then just start thinking about "ok, how can I get this happen?"  Then try designing and programming it.  Start from the most basic step of just getting a window up, then learn how to draw something to that window.  Learn how to get input, move it, animate it.  One step at a time.  Just keep building on it.

 

Also with you just starting here is what I suggest: at the starting point don't focus too much on perfect code or the best designed code.  I will go ahead and tell you something, that you might not want to hear.  Your code to your first game will look like crap.  Everyones code to their first game looks like crap.  Don't focus on trying to make it look good, professional, or 100% proper.  Just focus on getting your game made.  You will learn how to write well designed code in time and with experience.  Too many first games are never completed because they get refactored so many times with people trying to make the code "perfect."  Just write it and finish it.  When you do finish it you could even post the code and ask here for a code review.  Their are some very good programmers here that don't mind at all to do a quick code review and will give you some very good pointers.  One thing these programmers will always say though before they even start the code review is "congrats on finishing the game!"

 

So the LazyFoo SDL Tutorials: http://lazyfoo.net/

Also keep the SDL Documenation near you so you can study up on SDL that way also.  Then just program and try stuff out.  Start the most basic thing then move forward one step at a time.  Don't try to write the entire time right from the start.  One step at a time.

 

Also, if you are not too sure about SDL or are interested in trying something else out, I will throw out the suggestion of SFML.  I myself like the design of it better than SDL.

http://www.sfml-dev.org/

 

If you have any questions don't hesitate to ask.  99% of the time we will be very happy to assist you, as long as you have shown you have put some thought and work into it yourself.  As in we won't just write your game for you or anything like that.  lol.



#3 Mink   Members   -  Reputation: 169

Like
0Likes
Like

Posted 03 July 2013 - 12:20 AM

thanks for the response and the link I will definitely check it out. Also I am well aware that my code will look like crap, I wrote a text-based rpg combat type of thing and it is very buggy and all over the place, but I learned a lot from it :)



#4 Ludus   Members   -  Reputation: 970

Like
2Likes
Like

Posted 03 July 2013 - 01:04 AM

You may also want to look at Tim Jones' tutorials at www.sdltutorials.com.

The "SDL Game Framework Series" will take you through some of the basics of using SDL, and then to the creation of a simple game of Tic-Tac-Toe. After that, the tutorials focus on creating the minimal elements needed to create a 2D platformer, which seems to be what you're after.



#5 Konrad Jablonski   Members   -  Reputation: 483

Like
1Likes
Like

Posted 03 July 2013 - 05:23 AM

LazyFoo is great like mentioned before.

 

I would also watch few parts of these tutorials. That's at least how I started with SDL smile.png

http://www.youtube.com/watch?v=E4RqHtEAAds

 

Note* those tutorials are for SDL1.2. New SDL2.0 has a little bit different functionality, but nothing to drastic. I would still stick with SDL1.2 because it has more tutorials/support online at this moment.

 

good luck smile.png


Edited by iLoveGameProgramming, 03 July 2013 - 05:27 AM.


#6 makuto   Members   -  Reputation: 855

Like
0Likes
Like

Posted 04 July 2013 - 12:50 PM

I'd actually recommend SFML over SDL. When I was beginning 2D games I tried starting with SDL but eventually started using SFML as it is a lot simpler and modern. The coolest thing is that if you have any questions, the lead developer (Laurent Gomila) is always on the forum and answers them very quickly! SFML is absolutely fantastic and has a very intuitive interface.

 

Also, I'd recommend abstracting your multimedia libraries from your game so that you can always switch out the lib (you can check out my simple one here). You might want to start with SFML and a simple abstraction layer, then add SDL support if you ever want to get more platform availability (SFML is working on getting OpenGL ES for mobiles, so the support will extend to mobile platforms soon).

 

More advanced C++ game programming concepts that aren't obvious at first can be learned from Game Coding Complete (v4). That'll teach you how there is a lot more to C++ than you probably know. Also, the authors are quick to answer your questions on the forums.

 

As to improving your code, study a computer science textbook (CODE is fantastic) as well as a little compiler design (Game Scripting Mastery). It's important to know how to combat "Undefined Reference", "Already Defined", circular dependencies, using new libraries, and header-source file code organization. Most of the difficult compiler/linker errors you get involve understanding how the linker works.

 

At a higher level, finish all of the games you start, and don't make clones! Consider joining One Game a Month; it's worked wonders for my productivity. Watch for competitions or indie dev meetups. Both will give you more insight on where you are at and how you can improve. Remember that prototypes are the only way to truly see the potential of an idea, so code a quick (>1 day) prototype before you dive into game design documents (or not use them at all)

 

Also, as you are new to the forums, try to be nice. There are a lot of users here who are elitist jerks, so just try not to be like them.


Edited by makuto, 04 July 2013 - 01:07 PM.

Want to get to know my work and I better? See my website: Au 79 Games

I wrote General Tips on the Process of Solo Game Development


#7 markr   Crossbones+   -  Reputation: 1653

Like
0Likes
Like

Posted 04 July 2013 - 03:15 PM

I really can't agree with the "I've learned C++" idea.

 

The notion that anyone can learn C++ is highly dubious to me, I have been a professional programmer (including C++) for many years, and I have yet met only one person who I suspect may have actually "learned C++".

 

The problem is that there are so damn many ways of using the thing, so many obscure features, and so many patterns which are used in strange ways by particular libraries or developers, I'm not sure anyone has ever learned C++.

 

Maybe C++ is like the universe, if anyone ever understands it completely, it is instantly replaced by something even more bizarre and inexplicable (See "The restaurant at the end of the universe", Douglas Adams). Another theory is that this has already happened. Perhaps more than once.

 

Mark



#8 SnakeMaster   Members   -  Reputation: 192

Like
0Likes
Like

Posted 04 July 2013 - 05:38 PM

So recently I learned c++ pretty well, I wouldn't say I am proficient in it, but I think that will come with experience. I then tried unsuccessfully to install SDL and eventually just forgot about it because I was busy with school. but now it is summer so I have time to work on the game I want to make ( a simple 2D jumping on endless platforms kinda thing ). where should I start? and if anyone could point me in the direction of some resource that would be great! thanks smile.png

Now you start small. You start learning to use C++ with different Frameworks. Like i seen from a earlier comment, SDL or Alegro. Just for the start don't pass your limits and think you can link a multiplayer ability to the game that easy :-) im talking out of experience.

 

I tried it myself thinking it was easy and had to retry it over 15 Times till it worked properly. So just start small like i said. Make a Winodws, draw a image or even text. Try moving a sprite or make some collissions. Look at how a Game Loop exactly Works.

 

If you need a start help i got a great articel from the gamedev.net

http://www.gamedev.net/page/resources/_/technical/game-programming/game-programming-snake-r3133

 

From own experience, this was the first game i made with SDL and to be honest im proud this articel was here to teach me, and im thankfull for the owner aswell.

 

So check it out :) and i hope i could help you






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