[project1dev] Re: Project1 - SVN Update 43

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: project1dev@xxxxxxxxxxxxx
  • Date: Wed, 22 Apr 2009 18:21:18 -0700

Generally it's functionality first then optomizations second (and only when
you need it) but the more you code the more you see things in advance (or
THINK you do hehe).

After you get something working you should profile it, which times your code
to tell you where all the time is being spent.

When you optomize you want to go after the things that take the most time
first generally since they will give you bigger wins.

And also, generally micro optomizations (ie figuring out a way to do some
math with one less divide) isnt going to give you the biggest wins, the
bigger organizational changes are gonna make things better for you.

For instance, i was storing a lot of things in linked lists but with josh's
dynamic array class i'll be able to convert a lot of code to use that

That should give us some good speed up, or at least keep things from slowing
down in the future when things get more complicated and we have more art in
the game etc (:

but yeah, functionality first, then profile, then optomize based on your
profile results is generally how you do it (:

On Wed, Apr 22, 2009 at 6:05 PM, Kent Petersen <kentkmp@xxxxxxxxx> wrote:

> Thanks! I don't mind throwing down the extra time when I have it.
> Optimization is pretty crazy. Is that something you get better at always
> including with practice or is it something that you do when you are done?
> On Wed, Apr 22, 2009 at 5:37 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
>> err didnt mean for that to be global, but whatever... :P
>> it'll be nice when we have enemies like this that have easily configured
>> complex behavior so that people can place them in the world w/o having to go
>> through all the scripting pain you are Kent (:
>>   On Wed, Apr 22, 2009 at 5:35 PM, Alan Wolfe <alan.wolfe@xxxxxxxxx>wrote:
>>> Pretty awesome (:
>>> when you are done w/ this stuff we'll do an optomization pass too
>>> Like for instance, square root is expensive to calculate and divides are
>>> too (funny enough!) and since you only really need to calculate Length once,
>>> it could just be done the first time Move is called, or done in AZtoBZ
>>> (since its the 3rd and final point they are sending in... hopefully hehe).
>>> Nice work though (:
>>>   On Wed, Apr 22, 2009 at 4:05 PM, Apache User <
>>> dhapache@xxxxxxxxxxxxxxxxxxx> wrote:
>>>> User:korgath
>>>> Message: Uploading my progress so far. The newminer.lua uses
>>>> movement.lua to travel to a single point defined by the map.
>>>> currently still working on setting up a multi point patrol route
>>>> <Files Changed>
>>>> A   Scripts/Enemies/newminer.lua
>>>> A   Scripts/movement.lua

Other related posts: