Jump to content

Recommended Posts

A few weeks ago when discussing auras, Stan´ meantioned https://github.com/0ad/0ad/blob/e68daa4f75488bdbdd9b0f58979430ce5e9898fc/source/simulation2/components/CCmpRangeManager.cpp

I noticed that file contained a lot of divisions, mainly of the form Z / LOS_TILE_SIZE

Now my suggestion is to introduce a dummy variable INV_LOS_TILE_SIZE=1/ LOS_TILE_SIZE. That way, we can do a multiplication instead of a division and the lines would read

Z*INV_LOS_TILE_SIZE, which is cheaper if you need to do a lot of divisions. Wraitii suggested that I would make a differential to test if it makes the game faster.

I made an account on phabricator to try to make a differential, but I did not know how to make a differential. Can anyone explain which steps would be needed to be done to publish such a simple differential? I do unsterstand some C# code, but I don´t know what steps are next. Do I have to download/upload something or can it be done in the browser?


Link to post
Share on other sites

Those pages are very helpful:





So basically:

Download TortoiseSVN.

Clone the official repo.

Change some code.

Test if it works.

Save the change as a patch.

Upload it manually to phabricator.


You can also use command line to do that but it's more complicated to setup.


And I'm sure @Stan` or other people at the irc channel will help you get ready to make a patch (although a good time may be after the feature freeze and important bug fixing that is done after that :))


Edited by maroder
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...