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

Posts I've Made

In Topic: How to implement gamestates

13 March 2013 - 05:26 PM

Have you looked at Lazy Foo's article on State Machines? It's uses enums and a case/switch function, and is relatively simple to understand.

Basically, you have a base GameState class that is abstract.  It has three virtual functions - handleInput(), logic(), and draw().

Then, your other states - in this case, the Menu and the actual Pong state - will inherit from this base class.  They'll inherit the three vital functions, and then you can put what you want in each respective state (e.g; a c_Player in the Pong state, or a c_Button in the Menu state).

The states are switched first by preparing the change with a set_next_state() function, then calling change_state() to actually change states.

I'd recommend going through the article, it really simplifies the whole state machine topic (at least it did for me tongue.png)

 

http://lazyfoo.net/articles/article06/index.php

 

You can even apply the same guidelines for an AI state machine too, which is pretty neat.


In Topic: Game is crashing when running the .exe

06 March 2013 - 01:31 PM

Nooo! I've recorded an example using vmware and a little project i've made.

Basically, you have to do it the other way around.

 

And if you want the dlls, they're here, but you should check this post instead.

 

You only need to upload the exe + game assets, ex textures, models ect

 

Hope that help.

 

Awesome!  I'll check this as soon as I get home.  Thanks a lot!


In Topic: Game is crashing when running the .exe

06 March 2013 - 11:42 AM

interesting - I just copied my whole project folder into the release folder and it worked.  I'm not sure if this is the *best* way to do it, but at least it works.  Now if I wanted to host this on a website for other computers to download, I just upload my release folder?  What if the other computer doesn't have VS2010?


In Topic: Game is crashing when running the .exe

05 March 2013 - 02:45 PM

When you launch a project from the ide, the default path used is the project directory, so simply copy the .exe in this directory and it should work, instead of the other way around. But since we don't see how you load your files (relative path, full path, ect), i cannot be sure for certain.

So I copy the .exe from the project directory into the Release folder?
I'm not sure what 'relative path' and 'full path' mean; however I didn't do anything fancy so I'm sure I'm loading my files the "default" way (if there is such a thing).


In Topic: Finally finished a project; now how do I get it out?

03 March 2013 - 03:08 PM

So I basically do everything the same for release mode as I did in debug mode?  As in, going into the properties menu and editing the libraries to link to, etc...

 

After that, will the solution be saved in its own file?  Then do I put all the dlls in that file?


PARTNERS