HUDNavigation

Get help with programming issues.

Moderator: PPS-Leaders

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Re: HUDNavigation

Post by 1337 » Tue May 18, 2010 3:35 pm

I have cleaned up HUDNavigation. You should make an svn up next you work on it or you will get lots of conflicts.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Re: HUDNavigation

Post by greenman » Thu May 20, 2010 6:35 pm

i merged your branch into the presentation3 branch (which is a merger branch for the presentation)
you will probably get a new branch soon, but if you want to commit something before you get the hudelements2 branch do the following before commiting:
- go into the directory where your local working copy is (i.e. .../orxonox/hudelements)
- do svn switch https://svn.orxonox.net/game/code/branc ... sentation3
- go into the build folder and do a make -j4
- test whether everything still works

then you can commit
There are only 10 types of people in the world: Those who understand binary, and those who don't.

sfluecki
Human Space Navy Sergeant
Posts: 11
Joined: Tue Mar 02, 2010 2:49 pm

Re: HUDNavigation

Post by sfluecki » Sun May 23, 2010 8:36 pm

hi again,

thx @ all for your efforts! i was away for a few days and am now back with working spirit ;-)
going to take a look at all your changes & cleanUps so i know where we stand atm.

first thing i notice in my hurry is that i cant compile:

Code: Select all

Revision: 6964
cc1plus: error: OverlaysPrecompiledHeaders.h: No such file or directory
but i think this is something on my end - gonna try again tomorrow and then post an update here.

thanks again.
sebastian

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Re: HUDNavigation

Post by greenman » Sun May 23, 2010 8:55 pm

hm... actually this file should be located at src/modules/overlays/OverlaysPrecompiledHeaders.h ?!
There are only 10 types of people in the world: Those who understand binary, and those who don't.

sfluecki
Human Space Navy Sergeant
Posts: 11
Joined: Tue Mar 02, 2010 2:49 pm

Re: HUDNavigation

Post by sfluecki » Sun May 23, 2010 8:56 pm

just got it compiling. great work! a thousand thanks! going to figure out what exactly you changed tomorrow.
cheers sebastian

sfluecki
Human Space Navy Sergeant
Posts: 11
Joined: Tue Mar 02, 2010 2:49 pm

Re: HUDNavigation

Post by sfluecki » Thu May 27, 2010 11:10 am

some thoughts:

Code: Select all

    void HUDNavigation::changedOwner()
    {
 c316:       // TODO: Delete old objects?
what do you mean with old objects? changedOwner is called when you respawn,
so i guess you are talking about the objects that was indexed (in our map) during the
last sessino of playing just before the respawn? since when you die the destructor gets
called those objects already are deleted i guess.

idea to limit the markers.

in addOBject(): .

Code: Select all

	if (activeObjectList_.size() >= 5)           /
  return;    
to not ignore already dead objects a control line in the tick::

Code: Select all

	if((this->getOwner()->getScene()->getRadar()->getRadarObjects()).size() > activeObjectList_.size()){
	  
	  for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end();)
                removeObject((it++)->first);
	  changedOwner();
	}
so i compare the activeObjectList_ with the actual amount of objects.

the problem occurs when the game tries to erase (killBot X) a bot that is not in the
activeObjectList (was already full when adding it), out comes the following:

Code: Select all

        else
            COUT(2) << "Warning, HUDNavigation: Attempting to remove non-existent object" << std::endl;
from removeObject.

any tips?
for security reasons im not going to commit but just ask =)

sfluecki
Human Space Navy Sergeant
Posts: 11
Joined: Tue Mar 02, 2010 2:49 pm

Re: HUDNavigation

Post by sfluecki » Thu May 27, 2010 6:31 pm

works. done. 8)

the limit can be set in HUDNavigation.h ' static const unsigned int markerLimit_'.

if possible it would be nice to set this via console ingame ?

solex
Noxonian Grollknom
Posts: 8
Joined: Sun Mar 07, 2010 4:27 pm

Re: HUDNavigation

Post by solex » Sat May 29, 2010 2:33 pm

sfluecki wrote: if possible it would be nice to set this via console ingame ?
Setting it via console is really easily and fast done.
Here is how to do it: http://www.orxonox.net/wiki/ConsoleCommand

User avatar
greenman
Baron Vladimir Harkonnen
Posts: 360
Joined: Wed Oct 03, 2007 2:53 pm
Contact:

Re: HUDNavigation

Post by greenman » Sat May 29, 2010 4:49 pm

or instead use config values (they can also be set via the console): http://www.orxonox.net/wiki/howto/ConfigValue

they have also been used in the tutorial, if you need more examples
There are only 10 types of people in the world: Those who understand binary, and those who don't.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest