New answers tagged

-1

Try compiling it on another computer, or reinstall codeblocks along with gcc. At least that's how it worked for me.


0

Let's go through this: t = 0.0 dt = 0.0 currentTime = 0.0 accumulator = 0.0 Okay, som basic initialization, this is good. However, as Boreal mentioned, dt of 0 will cause problems. And since you are intending to fix your timestep, you should perhaps make dt a const and just set the value to whatever you want up here. Also, your currentTime initialization ...


2

From user744's answer: e.g., .../MainMenu/Loading was different than .../Loading/MainMenu, In the second case, when Loading completes, it will pop MainMenu and, presumably, push GamePlay to replace it. The resulting stack would, then, be Loading/GamePlay. MainMenu has disappeared and the Loading screen never goes away. After Loading completes and ...


1

The Singleton pattern is sometimes(!) by some(!) people considered an anti-pattern because it takes measures to make it impossible for more than one object of the class to exist and also provides access to that object from everywhere turning it into a global variable in disguise. This does not mean that it is bad when you have an object where you usually ...


1

Thinking of something like ROTK series, every scenario has a starting date and would benefit from holding the game time as one of its attributes, considering that many of its methods would need to access it. Also, if you think of saving/loading a game, the time should belong to the scenario on the data file - a scenario would then represent the whole game ...


2

You don't need to follow a game-programming programme to learn how to program games. It helps only on some aspects. Personal experience I've started to learn programming in high-school. We were free to chose the end-of-year project we had to do, and my friend and I decided to do a game. It was in VB6, the language we had learned the whole year. ...


0

If you don't need to process something every single turn/year for every character (though you might do for other reasons) you could just store the birthdate of each character, then when you need to know or display the age, subtract this from the current date. This lets you know the age of every character without having to constantly process and update all of ...


0

Ok so I have //Vertical collision if(!place_meeting(x,y+sign(vsp),obj_wall)) { while(!place_meeting(x,y+sign(vsp),obj_wall)) { y+=sign(vsp); } vsp=0; } y += vsp; but I should have //Vertical collision if(!place_meeting(x,y+sign(vsp),obj_wall)) { while(!place_meeting(x,y+vsp,obj_wall)) { y+=sign(vsp); } ...



Top 50 recent answers are included