| bio | website | bartnett.com |
|---|---|---|
| location | Brooklyn, NY | |
| age | 23 | |
| visits | member for | 2 years, 5 months |
| seen | 8 hours ago | |
| stats | profile views | 351 |
Programmer/Sound Guy/Game Chef at Eppy Games
|
Jan 5 |
revised |
Making character's skills and abilities as commands, good practice? added 49 characters in body |
|
Jan 5 |
revised |
Making character's skills and abilities as commands, good practice? apology for long-ass answer |
|
Jan 5 |
answered | Making character's skills and abilities as commands, good practice? |
|
Dec 25 |
awarded | Nice Answer |
|
Dec 22 |
comment |
Why would typeof(T) kill performance? This is probably more of a Stackoverflow question. In fact, I found an answer for it here: stackoverflow.com/questions/6417763/… and dotnerperls also has a bit to say on it: dotnetperls.com/typeof How many of these comparisons are you doing per frame? |
|
Dec 21 |
answered | is ECS a kind of (or vs) OOP? |
|
Dec 8 |
comment |
Question on the implementation of my Entity System @miguel.martin Nick Wiggill's answer recommends you set up/keep an existing event system. I agree. It seemed like there was one part of your question unaddressed: whether to make the EntityManager part of this list of listeners or not. I think you should keep it separate since you know the EntityManager is important in the lifecycle management of an entity. Whether you go about this by having some sort of IEventListener pure abstract class pattern or by a more specific IEntityLifeCycleListener pure abstract class, or use functors is not that interesting. How bout static function pointers? |
|
Dec 8 |
comment |
Question on the implementation of my Entity System @miguel.martin I'm not really sure how what you're proposing is different. Which classes are implementing these pure virtual functions? And the idea that loops in a program are bad is a very shallow way to think about writing efficient code. How many times are you looping over each object? Are you using the same regions of memory in batches? Are you running a lot of the same code all at once to make optimal use of your instruction cache? |
|
Dec 7 |
revised |
Question on the implementation of my Entity System added 75 characters in body |
|
Dec 7 |
comment |
Question on the implementation of my Entity System C# delegates don't imply an internal loop unless you count traversing the invocation list as part of that. It's important to differentiate between a message-pump type of dispatcher and an immediate dispatcher that's just keeping lists of function pointers. If you go with the message pump approach, you may always have to be working around the fact that on each update you're probably going to lose a lot of state. EDIT Not counting Windows Forms of course, but it's implied that the form classes have internal native loops listening for win32 messages. |
|
Dec 7 |
answered | Question on the implementation of my Entity System |
|
Dec 2 |
comment |
Per-Frame Function Calls versus Event Driven Messaging in Game Design In C++, function pointers can't be bound to objects (since it's just a feature inherited from C). So member function pointers cause a lot of grief and headaches, so people end up implementing some sort of IEventListener abstract class that just has an HandleMessage(IEvent evt) pure virtual function. (similar to ActionListener in Java). Functors can help, but still cause problems since you have to make them friends of your class if you want to access private members. |
|
Dec 2 |
comment |
Per-Frame Function Calls versus Event Driven Messaging in Game Design @jhocking The "function pointers for some reason" bit was referencing using them in C++ (I made that assumption since that's what Game Coding Complete assumes). I'm not a true C++ guru, but I've only seen them useful for global callbacks. If you're writing in AS3, Python, Javascript, Lua, Ruby, Scala, Clojure, a .NET language, etc. then function pointers are the way to go (thank god for delegates in .NET). |
|
Nov 29 |
awarded | Yearling |
|
Nov 27 |
comment |
Point[] and Tri not “could not be found” OpenTK does not have a Tri type according to their docs: opentk.com/files/doc/annotated.html What other libraries or helper code might the example from the forum have been using? |
|
Nov 24 |
answered | Where do I place XNA content pipeline references? |
|
Nov 22 |
comment |
Ruby Vs. C# - Better for Game Programming Define some specific technical requirements, then ask if specific languages and tools meet those specific requirements. There's also some questions about ruby on this site, use the search feature. |
|
Nov 17 |
comment |
Unity scaling instantiated GameObject at Start() doesn't “keep” I'd put ten bucks on some other script being naughty. Can you throw together a test scene so we can verify? |
|
Nov 1 |
comment |
Is learning OpenGL 2.1 useless today? "GL3.3+ has introduced much nicer (and more performant) ways of handling many things" - How does 3.2 fare in comparison? Mac users don't get 3.3 yet. I've been assuming it's almost the same, but don't want to assume too much. |
|
Oct 29 |
awarded | Talkative |