Search found 12 matches

by wacko
Mon Sep 28, 2009 10:10 am
Forum: Programming Discussion
Topic: XNA Game Studio / C#
Replies: 24
Views: 2756

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. 20 years ago I would have agreed but your telling me that a 3 core PPC system c...
by wacko
Mon Sep 28, 2009 9:47 am
Forum: Programming Discussion
Topic: Keeping Track Of Classes
Replies: 15
Views: 1559

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 table...
by wacko
Sun Sep 27, 2009 10:23 pm
Forum: Programming Discussion
Topic: Where would you use linked lists in a game?
Replies: 7
Views: 653

Re: Where would you use linked lists in a game?

No offense, but if a linked list seems useless then you have a looooot to learn, child. I do not know how often its really needed, I think there are specific cases where order matters and it should be used. Also I would like to comment that the STL Vector is not a linked list. It internally uses an...
by wacko
Sun Sep 27, 2009 10:19 pm
Forum: Programming Discussion
Topic: Keeping Track Of Classes
Replies: 15
Views: 1559

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 curr...
by wacko
Sun Sep 27, 2009 7:05 pm
Forum: Programming Discussion
Topic: Where would you use linked lists in a game?
Replies: 7
Views: 653

Re: Where would you use linked lists in a game?

So I think everything said so far is valid in some cases but overall I think the argument for and against a linked list really depends on its use. if your going to index into your list a lot then I would not use a linked list its slower than a normal array, a lot of Vector Impl actually use arrays b...
by wacko
Sun Sep 27, 2009 6:22 pm
Forum: Programming Discussion
Topic: Keeping Track Of Classes
Replies: 15
Views: 1559

Re: Keeping Track Of Classes

So I think RTTI should only be used when needed, there was a reason why it was not in the lang to begin with and thats because people use it incorrectly. I think the solution I provided above works and does allow for any of the RTTI badness to happen. Also if they really wanted to they could hold ea...
by wacko
Sun Sep 27, 2009 4:31 pm
Forum: Programming Discussion
Topic: Keeping Track Of Classes
Replies: 15
Views: 1559

Re: Keeping Track Of Classes

Run that program and it works - it prints "8" to the screen. :) Next challenge is to distinguish between classes. Perhaps a constant enum identifier variable? So there is a couple ways to solve this issue one way which I think works alright is... enum ObjectType { e_objectUnknown = -1, e_...
by wacko
Sun Sep 27, 2009 3:33 pm
Forum: Programming Discussion
Topic: XNA Game Studio / C#
Replies: 24
Views: 2756

Re: XNA Game Studio / C#

I'm not interested. Not because of anything against C# or XNA, but because I find myself extremely attracted to the computer science and engineering part of game development. I want to work at a low level, I want to write my own collision algorithms, I want to learn physics to write my own physics ...
by wacko
Sun Jun 28, 2009 7:37 pm
Forum: Programming Discussion
Topic: SFML Network Package
Replies: 11
Views: 1076

Re: SFML Network Package

well I would just use MySQL C api or the C++ wrapper as it will provide you what your looking for if you app needs to connect to MySQL.

http://dev.mysql.com/doc/refman/5.0/en/ ... splus.html
by wacko
Sun Jun 28, 2009 7:34 pm
Forum: Programming Discussion
Topic: [Solved] Classes, structs and unions
Replies: 7
Views: 585

Re: Classes, structs and unions

I think the big thing to remember about unions is they are as big as their largest member, and all members start at same memory location. So they can be useful: union uColor { struct sColor { unsigned char a, b, g, r; }; unsigned int color; }; { uColor clr; fread(&clr.color, sizeof(unsigned int)...
by wacko
Sat Feb 21, 2009 10:28 pm
Forum: Programming Discussion
Topic: Post Mortem: The Maw - Lua & LuaBind
Replies: 5
Views: 862

Re: Post Mortem: The Maw - Lua & LuaBind

I do think having a new allocation of the lua VM for each entity was the wrong thing to do... as it generally does not work well that way, but pushing the GC out to another xbox thread is not unreasonable. Most games do not even use all the threads available to them so why not, does not affect the m...
by wacko
Sat Oct 25, 2008 1:44 am
Forum: Programming Discussion
Topic: Lua Bind
Replies: 18
Views: 3111

Re: Lua Bind

Yeah... I understand. I'm just not really sure yet. I've read so much about how much less game programmers make when they work even harder. If I stayed on my current career path and worked as a government engineer, I'd be making fairly decent money. Whereas I'm sure being a game developer would pro...