[QUOTE=Darwin226;25783103]Also, my graphics card doesn't seem to like that "render as fast as you can" think. It starts heating up and the fan spins like crazy when I run it. Would it be a good idea to cap it to something like 250FPS?[/QUOTE]
Well, "render as fast as you can" will pull out every resource your card has to offer. As such it is to be expected.
You could cap it to a variable value and read that from a config file, and 0 means rendering as fast as possible. Additionally you should have an option to enable VSync, which is available as extension (WGL_EXT_swap_control, GLX_EXT_swap_control).
[QUOTE=bean_xp;25783991]I think you should be including the time spent updating when measuring how much time has passed between updates, as currently you only measure render time. For example if render time took 50ms and updating took 30ms, the next time it comes around to update you are recording that 50ms has passed, when 80ms has passed between each update.
Also if you are not interpolating positions when rendering, there wont be much point in rendering more often than you update, because you will render the same frame each time.
[B]Another thing you might want to consider is processing updates upto a maximum step, so in this example if your time elapsed is greater than 16ms, divide the step into updates of max size 16ms, then process the remainder as a smaller update step. This will allow you to process updates more frequently when the game is running faster than 16ms/frame, while avoiding the problems with large timesteps.[/B][/QUOTE]
What?
As for your first point "I think you should be including the time spent updating when measuring how much time has passed between updates" I agree.
[QUOTE=Darwin226;25783103]Ok, kinda spamming now but I'm currently trying to implement frametime interdependency or what ever you call it.
I've got this:
[cpp] Stopwatch timer = new Stopwatch();
double overtime = 0;
while ( true ) {
timer.Start();
ProcessEvents( true );
HandleConsole();
Render();
timer.Stop();
overtime += timer.ElapsedTicks / (double)Stopwatch.Frequency * 1000;
timer.Reset();
while ( overtime > 16 ) {
overtime -= 16;
Update();
}
if ( Kill ) {
Close();
return;
}
}[/cpp]
Does that seem right? (I'm mainly asking Jallen)
Also, my graphics card doesn't seem to like that "render as fast as you can" think. It starts heating up and the fan spins like crazy when I run it. Would it be a good idea to cap it to something like 250FPS?[/QUOTE]
Looks all good, the only thing I'd change is that you need to include the update time too. I'd change it to something like...
[cpp]Stopwatch timer = new Stopwatch();
double overtime = 0;
// ADDED TIMER START HERE
timer.Start();
while ( true ) {
// REMOVED TIMER START FROM HERE
ProcessEvents( true );
HandleConsole();
Render();
timer.Stop();
overtime += timer.ElapsedTicks / (double)Stopwatch.Frequency * 1000;
timer.Reset();
// ADDED TIMER START HERE
timer.Start();
while ( overtime > 16 ) {
overtime -= 16;
Update();
}
if ( Kill ) {
Close();
return;
}
}[/cpp]
Not tested but you get the idea.
[editline]1st November 2010[/editline]
Also I'd cap the framerate at something under 1000, 250 seems reasonable. Source caps it to 300 by default.
[QUOTE=Jallen;25785373]What?[/QUOTE]
As in the section titled "Semi-Fixed Timestep" in the article you [URL="http://gafferongames.com/game-physics/fix-your-timestep/"]linked[/URL]. If the renderer does not interpolate between update steps (see "The final touch" in the same article), there's no reason to re-render the same frame twice, so the semi-fixed timestep approach may produce something smoother.
[QUOTE=bean_xp;25785768]As in the section titled "Semi-Fixed Timestep" in the article you [URL="http://gafferongames.com/game-physics/fix-your-timestep/"]linked[/URL]. If the renderer does not interpolate between update steps (see "The final touch" in the same article), there's no reason to re-render the same frame twice, so the semi-fixed timestep approach may produce something smoother.[/QUOTE]
It would be better just to interpolate, but I sort of see your point.
Is there a site with a question/answer database about random stuff that I could use for a college project?
[QUOTE=high;25789143]Is there a site with a question/answer database about random stuff that I could use for a college project?[/QUOTE]
[url=http://stackexchange.com/]StackExchange[/url] is Creative Commons.
Why can I not do this in C#:
[code]
class player_base
{
public void KillPlayer()
{
Console.cPrintLn("base kill");
}
}
class player_ai : player_base
{
}
class player_real : player_base
{
new public void KillPlayer() //override
{
Console.cPrintLn("real kill");
}
}
//some method:
players.Add(new player_real());
player_base pl = players[0];
pl.KillPlayer(); //why doesn't this use player_real's kill method
[/code]
I thought polymorphism meant I didn't have to cast it to a player_real
[QUOTE=NovembrDobby;25789390]Why can I not do this in C#:
[code]
class player_base
{
public void KillPlayer()
{
Console.cPrintLn("base kill");
}
}
class player_ai : player_base
{
}
class player_real : player_base
{
new public void KillPlayer() //override
{
Console.cPrintLn("real kill");
}
}
//some method:
players.Add(new player_real());
player_base pl = players[0];
pl.KillPlayer(); //why doesn't this use player_real's kill method
[/code]
I thought polymorphism meant I didn't have to cast it to a player_real[/QUOTE]
Iirc, i think it has something to do with KillPlayer not being a virtual method.
I'm not sure though, so don't trust me on this. :v:
That's right, your function that can be replaced needs to be virtual, and instead of 'new' just put 'public override etc...
I fried my PSU and I have no comp that can help me backup my code or even program
argh
[QUOTE=NovembrDobby;25789390]Why can I not do this in C#:
[code]
class player_base
{
public void KillPlayer()
{
Console.cPrintLn("base kill");
}
}
class player_ai : player_base
{
}
class player_real : player_base
{
new public void KillPlayer() //override
{
Console.cPrintLn("real kill");
}
}
//some method:
players.Add(new player_real());
player_base pl = players[0];
pl.KillPlayer(); //why doesn't this use player_real's kill method
[/code]
I thought polymorphism meant I didn't have to cast it to a player_real[/QUOTE]
Along with Dj-J3's idea, change the override to [i]public override void[/i], without the [i]new[/i].
Sorted, thanks guys
Anyone know what happened to that 2D game this one guy was making where you was like a dot and you had to get inside these rings to pop them or something? It looked really nice and I'm wondering if it was ever released..
Actually, it's rotion. And the guy who was making it posted right before you XD
Which he could release on XBL Arcade and make millions.
[editline]0[/editline]
Vote Tick if you wish to join the uprising and demand Rotion is finally unleashed.
[QUOTE=CarlBooth;25790041]Which he could release on XBL Arcade and make millions.[/QUOTE]
And should.
But release it for free on PC
[QUOTE=Richy19;25790132]But release it for free on PC[/QUOTE]
Also this. :v:
Edit: But it is the kind of indie game I like to see on Steam...
The performance of your app isn't really relevant when you're only rendering a model; the performance drops actually get less severe over time, it's not a perfectly linear relationship between polygon/texel and framerate.
[QUOTE=Downsider;25790258]The performance of your app isn't really relevant when you're only rendering a model; [b]the performance drops actually get less severe over time[/b], it's not a perfectly linear relationship between polygon/texel and framerate.[/QUOTE]
What, really? Why is that?
Been working on a lobby server lately. It uses JSON for serializing server data (amount of players, ip address, and whatnot).
[img]http://i51.tinypic.com/2q05xyx.png[/img]
I should probably explain what is going on :v:
The first three "true" are confirmations that three servers were registered, the next is some server information which isn't quite done yet. The next is the list of all the servers and the last is the same, but with the filter "generic*" applied.
Oh nevermind. I didn't see the "NEXT PAGE" button :/
FUCK! Graphics card exploded...
[QUOTE=CarlBooth;25790041]Which he could release on XBL Arcade and make millions.
[editline]0[/editline]
Vote Tick if you wish to join the uprising and demand Rotion is finally unleashed.[/QUOTE]
I still need to apply for Steamworks but I just don't have enough time to get it ready :ohdear:
I want to release it as much as you want to play it but I am only one man :eng99:
[QUOTE=NovembrDobby;25791497]I still need to apply for Steamworks but I just don't have enough time to get it ready :ohdear:
I want to release it as much as you want to play it but I am only one man :eng99:[/QUOTE]
Releasing over XBLIG isn't the best way to go. I've found that even the most successful games haven't made that much money.
I've been thinking about how i should get the distance between two points.
Would this be a good way? (and most importantly, would it work?)
[img_thumb]http://i52.tinypic.com/33eq2cz.png[/img_thumb]
Haven't done math in a while. :v:
[editline]1st November 2010[/editline]
Or, this?
c² = a² + b² (found on google)
[QUOTE=Dj-J3;25792000]I've been thinking about how i should get the distance between two points.
Would this be a good way? (and most importantly, would it work?)
[img_thumb]http://i52.tinypic.com/33eq2cz.png[/img_thumb]
Haven't done math in a while. :v:
[editline]1st November 2010[/editline]
Or, this?
c² = a² + b² (found on google)[/QUOTE]
It's pretty much sqrt((x2-x1)^2+(y2-y1)^2)
You do delta y/delta x if you want to find out the slope of a line.
[QUOTE=Dj-J3;25792000]I've been thinking about how i should get the distance between two points.
Would this be a good way? (and most importantly, would it work?)
[img_thumb]http://i52.tinypic.com/33eq2cz.png[/img_thumb]
Haven't done math in a while. :v:
[editline]1st November 2010[/editline]
Or, this?
c² = a² + b² (found on google)[/QUOTE]
Yes, and pretty much the only way. That's how everyone does it.
[QUOTE=pebkac;25792307]It's pretty much sqrt((x2-x1)^2+(y2-y1)^2)
You do delta y/delta x if you want to find out the slope of a line.[/QUOTE]
Oh, i knew i had something wrong. :v:
[QUOTE=Dj-J3;25792000]I've been thinking about how i should get the distance between two points.
Would this be a good way? (and most importantly, would it work?)
[img_thumb]http://i52.tinypic.com/33eq2cz.png[/img_thumb]
Haven't done math in a while. :v:
[editline]1st November 2010[/editline]
Or, this?
c² = a² + b² (found on google)[/QUOTE]
The trig leads to a very simple equation in the case of two vectors. The vector between a and b is b - a. From that it's easy enough to derive the vector's magnitude (length) with [url]http://en.wikipedia.org/wiki/Norm_(mathematics)#Euclidean_norm[/url]
Sorry, you need to Log In to post a reply to this thread.