1 registered members (AndrewAMD),
1,454
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
CubeX Framework
#369996
05/10/11 12:26
05/10/11 12:26
|
|
CubeX Framework
Hey Guys! I want to show you my new project: CubeX FrameworkThis framwork provides functions to create games with the style of Minecraft. If you don't know how to get started, you can do the turorial or look at the examples... You can download it here: http://picshare.masterq32.de/CubeX.zipAlso you can watch a video with german comments: http://www.youtube.com/watch?v=A23Y_wTU4RkPlease post all bugs you can find! I want to improve this! Have fun and create cool things! EDIT: I was just beeing asked for reuploading the Framework. Here you go! It was nice to hear that somebody actually uses it also nowadays.
|
|
|
Re: CubeX Framework
[Re: Redeemer]
#370581
05/14/11 11:00
05/14/11 11:00
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Default sprite mats can be disabled The materials may be disabled, but Gamestudio is still running through a bunch of leftover internal conditional statements for things that really don't need to be done. For a relatively simple project like this, this extra rendering code simply doesn't need to be there. That's why you should access the DirectX API directly and do the rendering step yourself. This shows that you have no clue about performance and profiling. Optimizing is about to get the low hanging fruits, the few if comparisons and switches done internally by gamestudio don't have any great performance impact at all thus its not worth to spend ~10 hours writing and integrating your own renderer just to get 10 ms.
Last edited by JustSid; 05/14/11 11:00.
|
|
|
Re: CubeX Framework
[Re: WretchedSid]
#370583
05/14/11 11:17
05/14/11 11:17
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
The only two things that are worth the effort in my opinion and should really speed things up would be occlusion culling and dynamic batching, which is both possible without touching the rendering itself. Optimizing is about to get the low hanging fruits, the few if comparisons and switches done internally by gamestudio don't have any great performance impact at all thus its not worth to spend ~10 hours writing and integrating your own renderer just to get 10 ms.
This shows that you´ve got no idea how much 10ms are If you want the final game to run at 30fps you´ve got like 33ms for each frame, so 10ms are nearly a third . But the stuff described would probably even slow things down, and will never gain 10ms, so the point is of course still valid, that it is not worth to spend the time into your own rendering. Edit: You should also use texture atlasses. Edit2: I also don´t see how sprites are faster than models, I actually think that it is the other way around.
Last edited by Slin; 05/14/11 11:33.
|
|
|
Re: CubeX Framework
[Re: Slin]
#370584
05/14/11 11:23
05/14/11 11:23
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
I agree that GStudio doesn't spend 10ms with those switches and ifs hidden in the renderer, I would guess in reality its about one ms max. Nonetheless, 10ms are nothing against the really low hanging fruits in this project and those are, like already mentioned multiple times, occlusion culling and sprite instancing. I wouldn't bother to optimize the rendering when I can spend like 3 hours modifying existing occlusion culling functions and get a real performance boost out of it.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: CubeX Framework
[Re: Pappenheimer]
#370596
05/14/11 14:21
05/14/11 14:21
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Its a technique to save texture bindings (which can be pretty expensive in terms of CPU cycles) by just having multiple textures inside one larger texture. You then tell the engine which polygons have to be drawn with which part of the texture.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: CubeX Framework
[Re: WretchedSid]
#370597
05/14/11 14:44
05/14/11 14:44
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
The other advantage is, that it allows to create bigger batches when using dynamic batching, which will save many draw calls and to push basicly all polygons at once to the gpu, which I expect to be the biggest performance hit when doing something in minecraft style. The batching process of course also takes some time, but as you don´t need rotation on the blocks and even have a fixed size, you just have to apply the translation transformation, also you most probably don´t have to update the batch every frame but only if something changed, the trick then is only to find a good size for each batch, which however should be quite doable.
|
|
|
Re: CubeX Framework
[Re: Slin]
#370942
05/16/11 20:27
05/16/11 20:27
|
Joined: Dec 2008
Posts: 1,660 North America
Redeemer
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,660
North America
|
This shows that you have no clue about performance and profiling. Optimizing is about to get the low hanging fruits, the few if comparisons and switches done internally by gamestudio don't have any great performance impact at all thus its not worth to spend ~10 hours writing and integrating your own renderer just to get 10 ms. Well there's a few things to remember here. First, I already did mention implementing a hidden surface removal algorithm, so that base is covered. Second, such a modification as the one I mentioned could actually increase the speed of his project by a substantial amount (although it depends upon the current complexity of the Acknex renderer). I can say this because I've made a few simple software renderers in the past (although admittedly they've never been more complex than the Doom engine), and I can say from experience that unrolling and simplifying these complex loops can indeed have an impact on performance, even if it's just bits at a time. Anyway, he doesn't have to do something like that. But that is what I'd do (after implementing an HSR algorithm), because I tend to not trust machines I have little-to-no control over. For example, I prefer not to hand the keys to the compiler when it comes to building certain critical bits of a renderer; I like to do it myself. But that's just my personal preference. EDIT: Hey JustSid, I just noticed your old avatar is back.
Last edited by Redeemer; 05/16/11 20:28.
|
|
|
Re: CubeX Framework
[Re: Redeemer]
#370962
05/16/11 21:31
05/16/11 21:31
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Okay I see, well thats where we decide different. I usually avoid volatile wherever possible and trust the compiler because imo the compiler can generate mor efficient code than any human (well, probably not the Lite-C compiler, but a "real" compiler ^^) But I can't give any real examples and if this really matters beside my experience with LLVM and GCC. Hey JustSid, I just noticed your old avatar is back. Yup, mostly because the new one is on my server which currently doesn't answer any request -.- The old one is currently hosted by Slin (many thanks bro!)
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: CubeX Framework
[Re: WretchedSid]
#371015
05/17/11 10:43
05/17/11 10:43
|
Joined: Apr 2008
Posts: 2,488
ratchet
Expert
|
Expert
Joined: Apr 2008
Posts: 2,488
|
Another Mincraft clone doing pretty well ! It has some good lillte differences , like for example Cubes with 45° slope than can be usefull to make arches or other things like stairs etc ... I don't know if the code behind is free or not ?? Mythruna Perhaps you could talk with the author ? it could be a better solution for this game type !!
Last edited by ratchet; 05/17/11 10:46.
|
|
|
|