Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

johnmarinelli

Member Since 29 Nov 2012
Offline Last Active Apr 16 2013 12:36 AM
-----

#5038788 Finally finished a project; now how do I get it out?

Posted by johnmarinelli on 03 March 2013 - 12:35 PM

Hi everyone,

 

So I've finally finished something that I'm willing to let into the wild.  I've built it using SDL & VS2010.  The problem is, I have <i>no</i> experience distributing apps.  I tried to run it in release mode, and I get errors like

 

c:\users\john marinelli\desktop\~\programming $hit\c++ sources\killstuff\killstuff\c_Entity.h(2): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
 

so, I assume that I have to re-link the libraries or something, but before I go and do that and potentially mess things up I'd like to know exactly what to do.

 

 




#5038786 Need help with C++

Posted by johnmarinelli on 03 March 2013 - 12:29 PM

lazy-foo.net is the standard SDL tutorial.  Although if you have very little programming experience and are only doing this for a class, I would really recommend looking for any way out of it.




#5029182 Rule of Three, and const-correctness questions

Posted by johnmarinelli on 05 February 2013 - 03:37 PM

Hi guys,

 

I was recently told that my code is missing the Rule Of Three concept, and that my timer isn't const-correct.

 

I know of these terms; but google and searching the forums didn't help much.

 

I think what would help, however, would be an example of each concept (Rule of Three, Const-correctness) related to Game Programming.  I know what the Rule Of Three is for (creating copy ctor, assignment ctor, and dtor), but I don't completely understand why.  Also, I know that RAII/smart pointers take care of all that altogether, but I'd like to understand the Rule of Three.

 

As far as const-correctness, I think that it means that when you pass a variable by reference to a function, you should pass it as a const so that you're assuring it doesn't get changed.  does this mean that in my game loop, the Update(int &deltaTicks) function should be Update( const int &deltaTicks )?




#5009463 Game Component Architecture

Posted by johnmarinelli on 11 December 2012 - 11:34 AM

Hi all,

I plan on making a simple game using C++ and SDL.  The premise is very simple; you have a character that runs around and kills zombies.  However, I want to make different kinds of zombies, and I was reading about the Game Component system and it piqued my interest.

Where I usually do the basic Entity->Player/Zombie/whatever system, I realized that creating a bunch of different types zombies may be tedious.  So my biggest question is, how could I implement the game component system with making multiple kinds of zombies?  They will all share a few attributes (x and y coordinates, animation, health); but I want to make some be more difficult than others.

My current idea of the component system is that I create a base Component class, then make an AI Component class - from there I could make an "easy" AI component, "medium" AI component, etc - and give each respective zombie class a type of component. However, I've read about this thing called a "subsystem" - I'm not entirely sure what the subsystem is supposed to do, and the article I've been reading hasn't mentioned it where others have (the article I'm reading is http://gameprogrammingpatterns.com/component.html ).

So, I'd like to know if and how to use a subsystem with components, and how exactly I would implement say, an "AIComponent" with a cZombie class.

Thanks!


PARTNERS