Jump to content

  • Log In with Google      Sign In   
  • Create Account


Musikai

Member Since 09 Apr 2013
Offline Last Active May 25 2013 01:35 PM

Posts I've Made

In Topic: Moving with delta time.

22 May 2013 - 11:03 AM

I never thought about the AI, thats a good point. It just seemed like it was testing the key press boolean only to store it and test it again, but yeah the AI has to know to move somehow.

 

Thanks frob.


In Topic: Game state communication.

06 May 2013 - 04:52 PM

Thanks Juliean. Might be a stupid question but what would an entity manager look like, and how do the states interact with it?

 

Maybe i'm just slow but im really struggling to get this. I'm still very much a begginer, the only game i've written is a 2d game of pong. I just want to get away from the messy switch statements i've been using for game states. It feels like this is the only thing stopping me from writing more complex games, but every time i ask a question, the answer creates ten more questions. Wish i could have a programer sit next to me so i could bore them to tears with my lack of understanding.


In Topic: Game state communication.

06 May 2013 - 10:04 AM

Thanks for the help guys. So if i understand, the data should be stored in, and read from, a "Model". The state then acts as the View/Controller to alter and display the data?

 

So going with ppodsiadly's layout, say i have an Application state "Game" which has three substates. Would the "Game" state class act as the Model and store all the data to be accessed by each substate? Or should the Model be a seperate class entirely?


In Topic: Code Review: Pong

04 May 2013 - 12:53 AM

Thanks for the replies guys.

 

I tried getting the msvcr110 to static link but apparently the only way is to change the code generation options in VS, but this makes it assume all libraries will be staticly linked and conflicts with the other DLL's. It's a shame, i see over 40 people have downloaded it but only the people who happen to have Visual Studio 11.0 runtimes will be able to play it. I wonder what commercial games do, do they just include the DLL with the install? Or do they make people install the VS redistributable.

 

I tried to make code as readable as possible with smart variable names and such, i would try only comment where i though the code wasn't self explanatory, that and laziness.

 

I've seen people declaring all the variables at the start of a function before, I didn't know that was a C programing style. I didn't really like that as it means a variable can be a mile away from where it's used.


In Topic: Code Review: Pong

03 May 2013 - 12:13 AM

Thanks for the feedback  Aliii. Strange, can i ask did it say what DLL's were missing?

 

I'l definately work on the things you mentioned. I spent quite a while reading about hungarian notation, i didn't want to over do it but i can see how prefixing enums, structs and classes would help redability.

 

As for the state machine, i'm gonna need to know how to make one eventually. This is only a simple game of pong with two screens and the switch statemant for game states is already over 230 lines long.


PARTNERS