Little help with tile culling

Little help with tile culling

Postby paul424 » 12 Sep 2015, 23:59

Now I have my brand new shiny tile Culling algorithm , all I need to do is to move the code from culllingTile branch to development one by C&P -- since it seems rebasing would be too complicated for a branch 9 months old. Who could post some advices how should I start doing that ?
User avatar
paul424
OD Moderator
 
Posts: 643
Joined: 24 Jan 2012, 13:54

Re: Little help with tile culling

Postby charlie » 13 Sep 2015, 00:29

Try creating your change as a patch, which should give you a good indication of where the changes are?
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2007
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Little help with tile culling

Postby Akien » 13 Sep 2015, 09:33

Well do I really need to explain to you a third or fourth time how to do a copy paste? Ctrl-C and Ctrl-V are pretty handy for that...

Seriously, just create patches out of you old commits using: git format-patch -X, where X is the number of commits in the recent history that you want to keep as patch files.
It will create files named 000X-blabla.patch for each commit, you can then for example copy them to someplace safe: cp 000*.patch ~

Then checkout the development branch, make sure it's up-to-date, create a new culling branch based on development:
git checkout development
git pull --rebase upstream/development
git branch tileCulling2
git checkout tileCulling2
kate all_the_files_you_need_to_modify_to_reproduce_your_previous_changes &
kate ~/000*.patch &

And then do some copy pasting...
Once you've committed and pushed everything, you can also nuke your old tileCulling branch if you want.
User avatar
Akien
 
Posts: 734
Joined: 22 Feb 2014, 13:14

Re: Little help with tile culling

Postby paul424 » 15 Sep 2015, 16:48

I have a function startTileCulling which starts the tile culling. Could someone tell me where in code I could fire up that thing ? Setting the appropriate bool flag ( what the startTileCUlling does ) from the begginning crashes the program. I have had a hook for console- command which triggered it , but now the console seems too complicated for me ... By the way, Could someone explain what do I need to do to implement my own console command ? The code can be found here :]https://github.com/tomluchowski/OpenDungeons
User avatar
paul424
OD Moderator
 
Posts: 643
Joined: 24 Jan 2012, 13:54

Re: Little help with tile culling

Postby paul424 » 16 Sep 2015, 12:15

OK I implemented the proper command, you can fire up the tile culling with the command startTileCulling .
User avatar
paul424
OD Moderator
 
Posts: 643
Joined: 24 Jan 2012, 13:54

Re: Little help with tile culling

Postby paul424 » 29 Nov 2015, 20:45

https://github.com/OpenDungeons/OpenDungeons/pull/954

"If someone wants to take the time to really understand what the code does and fix the minimap, I won't be against merging."
I am not any algorithm God, the solution I come up with is really simple, I really tried to explain in comments what it does. It's simple interpolation based on the idea that the line formula is y = ax + b .

The problem with minimap is when I started working on culling feature it was 2D pixel based version, so my hiding or unhidding some tiles didn't broke anything. Both minimaps would cause a problem for me to work properly, the other issue being that you seem to be undecided which version should stay for good. The easiest way for me would be to go for 2d pixel verison and ask on ogre3d forum why our code does not work under DirectX, and what to do to make it working, despite me not having Windows installed...

I really put much effort and don't want to get it discarded, I wanted to have position in CV about an open- source game somehow improved by me, however clumsy I am at it tough ....
User avatar
paul424
OD Moderator
 
Posts: 643
Joined: 24 Jan 2012, 13:54

Re: Little help with tile culling

Postby paul424 » 29 Nov 2015, 20:58

Any idea which commit introduced the new camera based minimap and how do I revert to 2D minimap ?

As hwoarangmy mentioned
" Moreover, the old minimap do not work with D3D renderer. I know we only want to support OpenGL officially but as so far, D3D works out of the box, I would think it is a waste to disable it. Moreover, because it doesn't work with D3D, I would guess there is a bug / wrong use of the texture for the old minimap."

Also I do not believe 2D based minmap broke something -- there were at least several builds on Windows with 2d minimap and it was working ? Did you change the DirectX version in the meanwhile ?
User avatar
paul424
OD Moderator
 
Posts: 643
Joined: 24 Jan 2012, 13:54

Who is online

Users browsing this forum: No registered users and 1 guest