- Viewing Profile: Reputation: Promit
About Me
Community Stats
- Group Moderators
- Active Posts 14,687
- Profile Views 14,543
- Member Title Moderator - Graphics Programming and Theory | Baron von Bacon Po
- Age 26 years old
- Birthday March 30, 1987
-
Gender
Male
-
Location
Baltimore, MD
Awards
-
Awards
Expert Community Member
User Tools
#4966046 Can my other company fund my game company?
Posted by Promit
on 03 August 2012 - 10:43 PM
#4966027 Can my other company fund my game company?
Posted by Promit
on 03 August 2012 - 09:31 PM
#4959614 One-Step vs Two-Step Initialization (C++)
Posted by Promit
on 16 July 2012 - 09:14 AM
The existence of exceptions at all demands a sane exception handling strategy AND exception safe code. Exceptions are supposed to represent "exceptional" conditions and it turns out that in games, most of those conditions are common in day-to-day development. Since you're not going to crash the game just because an artist mis-named a file, the handling code typically degrades the exception to a return code anyway, swallowing it internally and taking some action like injecting a placeholder. Stack unwind isn't useful here either, since it's invariably caught by the immediate parent. All you've done at this point is blow a bunch of cycles on an internal error condition.
Then there's the practical problems with exceptions in C++ in particular, and the very fact that the term "exception-safe code" exists should be a giant red flag. There are code size consequences to enabling exceptions, and the way the standard or boost libraries reacts to the setting can mess with things too. There's also the question of whether it will interact cleanly with threads. (Checked iterators are globally re-entrant incompatible, for example. Think about that for a bit.) Let's not forget the problems with C++ constructors being shitty, either. Virtual dispatch won't work, chaining won't work, etc.
Last, it's helpful to be able to re-initialize objects and although you can do it with the explicit destructor call plus placement new, doing that just feels weird. Combined with the fact that other languages like C# won't support in-place reinitialization anyway, and explicit init and teardown functions just look that much more appealing.
I just like two-step better.
#4953744 Wasn't c++ support announced for XNA
Posted by Promit
on 28 June 2012 - 01:39 PM
#4952698 Seperating game logic from game loop?
Posted by Promit
on 25 June 2012 - 10:35 AM
#4949724 Particles with DOF
Posted by Promit
on 16 June 2012 - 12:51 AM
#4949565 Numerical integration methods
Posted by Promit
on 15 June 2012 - 10:00 AM
#4949558 Numerical integration methods
Posted by Promit
on 15 June 2012 - 09:41 AM
Yeah, that should be right.So, for semi-implicit Euler update velocity first, and then use that to update position?
inline void proceed_SemiImplicit_Euler(body &b, const double &dt) { b.velocity += acceleration(b.position, b.velocity)*dt; b.position += b.velocity*dt; }
The key is that semi-implicit Euler sacrifices some accuracy for dramatically improved stability and better energy conservation (well, bounded energy fluctuation actually). RK4 systems will tend to explode or slow down very easily because of the energy instability. This isn't noticeable for simple motions, but becomes very evident in springs for example.For the tennis, it looks like semi-implicit Euler handles things almost as well as RK4 (and obviously much faster), and a bit better than Euler. The differences are small to begin with.
This is also called sympletectic Euler at times, and there are many other classes of symplectic integrators as h4tt3n pointed out. All of them are much preferable to the Verlet or Runge-Kutta type approaches. But the semi-implicit Euler is dead simple and very good for how easy and cheap it is.
#4949420 Numerical integration methods
Posted by Promit
on 14 June 2012 - 10:05 PM
#4949187 Singleton pattern abuse
Posted by Promit
on 14 June 2012 - 10:21 AM
#4949011 C++ - do you use STL in your game?
Posted by Promit
on 13 June 2012 - 07:47 PM
One caveat that I do feel is worth mentioning: STL containers like std::vector are extremely efficient in optimized builds. The design of these classes relies heavily on several categories of C++ optimizations. There are good reasons for this, but at the end of the day it means that heavy container usage will show an unexpectedly high impact in "debug" builds. What's more, mixing debug and release compilations (selective optimization) of these containers can be extremely dangerous. So a lot of the home-rolled crowd like the fact that the jump in performance from debug to release is not so extreme.
That said, all halfway decent games become unplayable in debug mode about halfway through development anyway
#4948666 Singleton pattern abuse
Posted by Promit
on 12 June 2012 - 05:12 PM
There exists no legitimate use for the singleton pattern, anywhere.
If you want to use a global, fine, but don't use a singleton for it. All you're doing in that case is taking a global and slathering it in stupidity.
#4948654 Epic Optimization for Particles
Posted by Promit
on 12 June 2012 - 04:48 PM
#4946611 I must be doing something wrong (slow development)
Posted by Promit
on 05 June 2012 - 07:04 PM
There's your mistake. No framework is required. Some developers use existing frameworks (Unity, Allegro, whatever) and some just plain freeform it. The key to coding fast is to throw architecture to the winds. This is a healthy skill to have, though whether you should make a habit of of it is another matter entirely.By comparison, I see people on these forums throwing together prototypes on a matter of days (I don't even understand how you can prototype a game, with all of the underlying framework that is required). People participate in the Ludum Dare competition, creating full games in under 48 hours. And full released games on Steam, like Terraria, which were developed in only 6 months.
Rapid prototyping is a valuable way to build out the basics of a game, make sure it's worth building at all, and catch early design mistakes. I would suggest that it's vastly more useful than the idiotic design documents everyone thinks they need. Sit down and write a full, playable game in a week. It will force you to think very hard about what is actually machinery for the game, and what is your own toying around with code. Eventually you'll learn to do this in a way that doesn't defy expansion into well engineered code later.
#4939972 The state of Direct3D and OpenGL in 2012?
Posted by Promit
on 13 May 2012 - 11:35 PM
- Home
- Viewing Profile: Reputation: Promit