[OT] Previously: DMD - Windows -> C# in gamedev
Froglegs
lugtug at gmail.com
Sat Jan 7 16:12:59 PST 2012
> Indeed. And this is usually just to mitigate the fact that C++
> is so crap
> at this sort of code. Maybe D will be tolerable, and this
> breaking out to
> script won't be necessary? (though I'm dubious)
Yeah C++ is a migraine for that type of code:( I think D would
be nicer than C++ for gameplay code, but another reason for
scripts is the ability to modify the script while the game is
running, and just the general lack of compilation time which is
soo nice.
Perhaps if D gets ported to mono? Though even then I think I'd
prefer Lua, since it is quite good at acting as both a language
and data description.
> I don't typically find C/C++ intolerable, or even particularly
> unpleasant
> for engine level code as it is, it's the higher level code I'm
> keen to
> escape.
Yes I agree!
I tend to think of the code I work with as having three levels
1) low level - high performance, optimal memory layout/access,
alignment concerns, intrinsic, not much
abstraction(unfortunately..). C++ works pretty well here(though
any improvements are welcome..), certainly I'm not aware of
anything else that is better
2) mid level - good performance, fairly optimal memory, no
intrinsics, fairly abstract. C++ works OK here, but I think D
could be better at this
3) high level - moderate/low performance, GC memory, JIT'd if you
are lucky, but possibly interpreted, can reload scripts while
program is executing. Neither D nor C++ work here.
#1 isn't actually that much code, but the program probably spends
the majority of its time executing it, so it is pretty important
Also in reply to Walter-- for me the problem with pausing the GC,
and then running it at certain times, is that there is actual no
time when it is alright for the GC to take any significant amount
of time to collect( a couple milliseconds might be acceptable,
but can that be guaranteed?). Some games don't have load
screens, or levels, but just an endless streaming world.
More information about the Digitalmars-d
mailing list