Search found 11 matches
- Sun Oct 04, 2009 5:32 pm
- Forum: Game Development
- Topic: Directx10 Beginning!
- Replies: 21
- Views: 6403
Re: Directx10 Beginning!
#include "resource.h" Since you didn't create "resource.h" and it's shown with quotes, you can probably remove it. I believe their supplied code assumes you are compiling their project complete with resources, or have some default resource file with a header already in your proj...
- Sun Oct 04, 2009 4:43 pm
- Forum: Programming Discussion
- Topic: Keeping Track Of Classes
- Replies: 15
- Views: 1539
Re: Keeping Track Of Classes
dynamic_casting something to its own type would seem the fastest thing in general, and it's still 10x slower. Perhaps I'm misunderstanding what you mean when you say "single-level hierarchy". You mean a class that's not derived from anything else being cast to itself? I would have thought...
- Wed Sep 30, 2009 1:06 am
- Forum: Game Development
- Topic: Directx10 Beginning!
- Replies: 21
- Views: 6403
Re: Directx10 Beginning!
Introduction to 3D Game Programming with DirectX 10 by Frank D. Luna That is a good book to study and get started with. Frank Luna's book on DirectX9 was pretty good, then he came out with the Shader Approach... which was odd because he kept the same material, but made a complete departure from the...
- Tue Sep 29, 2009 6:07 pm
- Forum: Programming Discussion
- Topic: Keeping Track Of Classes
- Replies: 15
- Views: 1539
Re: Keeping Track Of Classes
Seems pretty consistent with what I said, although the tests suggested don't depict a single-level hierarchy (but I wouldn't discount it). One of the tests you illustrated was actually a speed comparison between dynamic_cast<> and static_cast<> for pointer passing where no testing was done, which is...
- Tue Sep 29, 2009 9:50 am
- Forum: Programming Discussion
- Topic: Keeping Track Of Classes
- Replies: 15
- Views: 1539
Re: Keeping Track Of Classes
I do not know where you got your info on the cost of dynamic_cast but its costly. The code i wrote above is 20x faster if you just use the GetType functionality of the virtual call than using dynamic_cast. It has to walk the entire class hierarchy, which includes dealing with crap like virtual tabl...
- Tue Sep 29, 2009 9:13 am
- Forum: Programming Discussion
- Topic: XNA Game Studio / C#
- Replies: 24
- Views: 2739
Re: XNA Game Studio / C#
A co-worker of mine who has been doing graphics programming for the last 15 years, suggested based on tests that the perf loss from writing games in managed code was less than 1% on modern systems. I would like to see the analysis that fathered these results. It seems to me that your argument of ma...
- Mon Sep 28, 2009 3:46 am
- Forum: Art, Music, and Design
- Topic: Producing Artwork - Massive Time Drain?
- Replies: 9
- Views: 2425
Re: Producing Artwork - Massive Time Drain?
... For me, I find that it's easier to work with 3D graphics, even if they're prerendered for a 2D game. The time saving advantages hit when it comes to animation. ... 100% correct. If you're a game developer, you need to learn a 3D modeling program . I can't draw, but I can model and animate. That...
- Mon Sep 28, 2009 3:30 am
- Forum: Game Development
- Topic: Bullet targeting an Enemy
- Replies: 5
- Views: 1031
Re: Bullet targeting an Enemy
That's an interesting approach. Personally I would have most likely done it K-Bal's way, but only because I would've never thought of your idea. ;) I think the answer involves what happens to this entity that is destroyed. If it is going to be deleted, you don't want any pointers to it hanging arou...
- Mon Sep 28, 2009 2:23 am
- Forum: Programming Discussion
- Topic: Keeping Track Of Classes
- Replies: 15
- Views: 1539
Re: Keeping Track Of Classes
I think if you can avoid using the dynamic_cast then you should do so, I mean if you can either keep the info around in a sep container and not lose any type info or add the virtual function if it makes sense then do so. I would only use the dynamic_cast when its really needed. the project I am cur...
- Mon Sep 28, 2009 1:55 am
- Forum: Programming Discussion
- Topic: Where would you use linked lists in a game?
- Replies: 7
- Views: 643
Re: Where would you use linked lists in a game?
I don't know they just seem kind of useless to me. Most objects in a typical game will be in a linked list when the number of that type of object is not fixed or limited. When the number of those objects changes often, or there's no fixed limit to how many would be generated, you may not want to us...
- Mon Sep 28, 2009 1:27 am
- Forum: Programming Discussion
- Topic: XNA Game Studio / C#
- Replies: 24
- Views: 2739
Re: XNA Game Studio / C#
XNA is unfortunately a framework that has forgotten the reason why the best games are written in C++: performance. But it takes some serious work to become skilled in the language without having it maul you from behind. Some people don't want the language to manage their memory usage, especially in ...