No, it's not wrong.  It's just the best way of avoiding GC runs in your code.

A game is not like most software out there.  A lot of the time modern
design patterns have to be thrown out the window just for performance
and usability.

Sure it would be nice if the GC were faster and more efficient (and I
guess it is after 1.5).  In the end, you'll end up with the same tips
and tricks he gave you.
Also, it really isn't THAT hard.  Google does it in just about every
app they have and every class they have also has a buffered version.


On Tue, Oct 19, 2010 at 11:43 PM, Peter Webb <r.peter.w...@gmail.com> wrote:
>>  The first thing I recommend watching is this google 
>> presentation:http://www.google.com/events/io/2009/sessions/WritingRealTimeGamesAnd...
>
> I think the advice given in this video is basically wrong.
>
> It is a presentation done by a C++ programmer who has just written his
> first Java program. His idea of managing GC lag is to not instantiate
> any classes at all in real-time sections of the code. He spends a
> great deal of time explaining how difficult that is.
>
> This flies in the face of modern software design, which says build it
> right then build it fast. He basically says throw away most of the
> benefits of using auto-GC languages such as Java by writing your code
> in a very artifical way which avoids allocating memory.
>
> It is a pity because he could have told us some things we (or at least
> I) don't know, such as how the GC is triggered, whether it is device
> dependent, whather there are calls to suspend repacking the heap,
> practical stuff about how to best use a GC language for real-time
> apps. Trying to avoid anything at all which might cause GC to happen
> is throwing the baby out with the bathwater.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://developingthedream.blogspot.com/,
http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to