Collision detection and response from the good people at Metanet ( Made N ).
[url]http://www.metanetsoftware.com/technique/tutorialA.html[/url]
[url]http://www.metanetsoftware.com/technique/tutorialB.html[/url]
About a week overdue, tiles can now be loaded into the game.
[media]http://img41.imageshack.us/img41/1295/omgtiles.png[/media]
And due to some mucking around with catdaemon's lighting code, they work with lights too. Also before you ask, these tiles are temporary.
[QUOTE=spacerat;16454464]About a week overdue, tiles can now be loaded into the game.
And due to some mucking around with catdaemon's lighting code, they work with lights too. Also before you ask, these tiles are temporary.[/QUOTE]
Nice.
[media]http://www.youtube.com/watch?v=Y81bn0Ctznc[/media]
I've been a lazy as hell.
[QUOTE=efeX;16445856](Not Responding)[/QUOTE]
That is because it was in an infinite loop of doing nothing (dont ask why).
[b]Edit:[/b]
Thanks to all those who helped with my question. I'll try some stuff out.
[QUOTE=iPope;16459051]That is because it was in an infinite loop of doing nothing (dont ask why).[/QUOTE]
I think a Sleep(1); will fix that (windows.h)
I could be wrong.
[QUOTE=Jallen;16459855]I think a Sleep(1); will fix that (windows.h)
I could be wrong.[/QUOTE]
Great, but I am using python :P But I see your point.
Or perhaps a proper game loop.
[QUOTE=jmanmc;16460951]Or perhaps a proper game loop.[/QUOTE]
No. "Proper" game loops use 100% CPU.
[QUOTE=nullsquared;16461626]No. "Proper" game loops use 100% CPU.[/QUOTE]
thank you captain obvious.
Proper in the sense of practicality.
[QUOTE=jmanmc;16462004]Proper in the sense of practicality.[/QUOTE]
Practical game loops still use 100% CPU.
Application loops usually use Sleep(0), however, to leave most of the CPU time to other processes.
Then why wouldn't he want that if he was developing a game?
[QUOTE=jmanmc;16462437]Then why wouldn't he want that if he was developing a game?[/QUOTE]
Games are meant to be played (and thus take up all the CPU), while applications are usually in idle state.
[QUOTE=Kat of Night;16425456]It would execute the contents.
until (false) is the same as while (!false). And the negation of false is true, so it's the same as while (true). :downs:[/QUOTE]
Ah damn, I read it as "while(false)". So I was right for what I was thinking :).
[QUOTE=nullsquared;16462500]Games are meant to be played (and thus take up all the CPU), while applications are usually in idle state.[/QUOTE]
He's developing a game using an incorrect loop. I suggested he use a proper loop to fix the not responding problem.
[QUOTE=nullsquared;16462500]Games are meant to be played (and thus take up all the CPU), while applications are usually in idle state.[/QUOTE]
[url=http://www.facepunch.com/showpost.php?p=16436660&postcount=682]Captain Reality Check to the rescue.[/url]
Unless you mean 2d games do not work the same? I'm genuinely interested in the reason if that's the case.
[QUOTE=nullsquared;16462500]Games are meant to be played (and thus take up all the CPU), while applications are usually in idle state.[/QUOTE]
are you speaking solely 3D here?
Um. I was reading the directxtutorial.com tutorials, when I found out that it supposedly doesn't teach proper practices. However I'm a huge chunk through it. Would you guys recommend staying with those tutorials or dropping from it? :/
What would you say would be the best way to create a "game loop", which does not take 99% CPU usage?
proper practices? It doesn't go very in-depth but it's a good starting point.
[QUOTE=bigdoggie;16464870]What would you say would be the best way to create a "game loop", which does not take 99% CPU usage?[/QUOTE]
By not creating stress on the CPU? Try limiting the frame rate, or as jallen suggested, a sleep.
[QUOTE=ZomBuster;16464892]proper practices? It doesn't go very in-depth but it's a good starting point.[/QUOTE]
According to this:
[url]http://www.gamedev.net/community/forums/topic.asp?topic_id=533946[/url]
I might stick with it though and then pick a book for the parts the tutorial misses.
[QUOTE=efeX;16465171]By not creating stress on the CPU? Try limiting the frame rate, or as jallen suggested, a sleep.[/QUOTE]
It's not about "stressing" the CPU, it's about telling the OS to give cycles to other programs (via Sleep(0)). Any game should not have to do this (unless it's idle most of the time).
What if it's windowed? A lot of games use a dynamic sleep pattern based on frame time that maintains a set update rate.
[QUOTE=nullsquared;16465417]It's not about "stressing" the CPU, it's about telling the OS to give cycles to other programs (via Sleep(0)). Any game should not have to do this (unless it's idle most of the time).[/QUOTE]
Aye, game engines should just run code as fast as they can - sequences of events (e.g. moving objects) are synchronized with the current CPU time (or some other timer?), so something moving sideways at 1000fps will move sideways at the same speed at 10fps. A game engine which isn't processing things as fast as it can usually isn't doing its job, unless it's a puzzle game or something. You usually want the lowest latency/response-time available - you don't see FPSes capped to 30fps by using sleep().
Have I got this right?
That being said, I've noticed it can be a bitch to juggle around audio streams + updating graphics, at least in a single thread with returning functions (as opposed to non-returning).
[QUOTE=TehDoomCat;16467053]Aye, game engines should just run code as fast as they can - sequences of events (e.g. moving objects) are synchronized with the current CPU time (or some other timer?), so something moving sideways at 1000fps will move sideways at the same speed at 10fps.[/QUOTE]
True, but unrelated.
[QUOTE=TehDoomCat;16467053]A game engine which isn't processing things as fast as it can usually isn't doing its job, unless it's a puzzle game or something. You usually want the lowest latency/response-time available - you don't see FPSes capped to 30fps by using sleep().
Have I got this right?
[/QUOTE]
To some extent, there is no reason for your game engine to run at 1000fps, it's worthless. And you do see FPSes capped, although usually to 60fps. See: XNA
[QUOTE=TehDoomCat;16467053]
That being said, I've noticed it can be a bitch to juggle around audio streams + updating graphics, at least in a single thread with returning functions (as opposed to non-returning).[/QUOTE]
Also unrelated.
[QUOTE=nullsquared;16468047]See: VSync :downs:[/QUOTE]
I'm not talking about VSync.
game.IsFixedTimeStep
and there's another one to set the desired timestep too I believe.
[b]Edit:[/b]
[url]http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.isfixedtimestep.aspx[/url]
[img]http://i26.tinypic.com/5p25mt.png[/img]
The blue thing is a button that you hold and the platform will slide across.
Need to work on the tree and showing more of the player behind it (You climb up into the tree to get on the movey platform). Thinking of a bit transparency or something.
I also need some idea of how the platform will look. Like some kind of cart or whatever.
Sorry, you need to Log In to post a reply to this thread.