Developement: Quick Question, Quick Answer
Moderator: PPS-Leaders
Developement: Quick Question, Quick Answer
Since I have a quick question that doesn't warrant a thread in its own, I thought I might start this thread to address exactly such question. So whenever you have a question that is quick and you think has a quick and simple answer, you can use this thread to ask it.
Now to my question:
Since the new LevelInfo object we can tag a level with various tags. These tags could then be used to only display a subset of levels you are interested in based on their tags.
At the moment, all valid tags have to be specified and invalid ones are not accepted and throw a warning. I did this to ensure consistency, e.g. so that we don't have the tag "test" in some levels and the tag "Test" in others, which would make classification considerably harder.
Do you think that one should be able to choose the tags freely or are the restrictions that are in place necessary? I'm kind of undecided on the issue...
Now to my question:
Since the new LevelInfo object we can tag a level with various tags. These tags could then be used to only display a subset of levels you are interested in based on their tags.
At the moment, all valid tags have to be specified and invalid ones are not accepted and throw a warning. I did this to ensure consistency, e.g. so that we don't have the tag "test" in some levels and the tag "Test" in others, which would make classification considerably harder.
Do you think that one should be able to choose the tags freely or are the restrictions that are in place necessary? I'm kind of undecided on the issue...
Re: Developement: Quick Question, Quick Answer
I'm not sure if this thread will be used... but let's give it a try.
Also I'm not sure if this is really a quick question
In general I assume that tags are free to choose, but in this case this doesn't make much sense because the tags are not defined by the player, but rather by the level designer. There has to be some sort of a filter in the game (or level list) and since the player doesn't know the possible tags, they have to be known to the system. So it's probably good to define a set of allowed tags.
Another question is how we intend to use these tags. I see some need to hide test levels and to filter levels for specific gametypes. But do we really need tags to achieve this? A boolean flag hidden/visible would be enough to hide test levels, while gametypes are already defined in level files. So what other usages do you see for tags? (I'm not saying I don't like them, I'm just curious how they would be used in the end.)
Also I'm not sure if this is really a quick question
In general I assume that tags are free to choose, but in this case this doesn't make much sense because the tags are not defined by the player, but rather by the level designer. There has to be some sort of a filter in the game (or level list) and since the player doesn't know the possible tags, they have to be known to the system. So it's probably good to define a set of allowed tags.
Another question is how we intend to use these tags. I see some need to hide test levels and to filter levels for specific gametypes. But do we really need tags to achieve this? A boolean flag hidden/visible would be enough to hide test levels, while gametypes are already defined in level files. So what other usages do you see for tags? (I'm not saying I don't like them, I'm just curious how they would be used in the end.)
Fabian 'x3n' Landau, Orxonox developer
Re: Developement: Quick Question, Quick Answer
I see the just as a more generic form of various booleans that Levels could have. One useful example would be the distinction between multi- and singleplayer levels, or maybe there are levels that are both. Hence in the Multiplayer Menu we would only display levels that work with multiple players.
There are probably also many other useful distinctions, e.g. difficulty levels or gametype, although, admittedly, this could be implemented separately as well...
There are probably also many other useful distinctions, e.g. difficulty levels or gametype, although, admittedly, this could be implemented separately as well...
Re: Developement: Quick Question, Quick Answer
Well, we probably need a dedicated gametype for single player levels, so this doesn't necessarily need a separate tag/flag. However you're of course right that there are more possible options, for example some single player levels may also work in coop mode, while others don't.
So to answer the original question, if the tags just replace a bunch of well defined booleans, then the tags should be defined just the same way.
So to answer the original question, if the tags just replace a bunch of well defined booleans, then the tags should be defined just the same way.
Fabian 'x3n' Landau, Orxonox developer
Re: Developement: Quick Question, Quick Answer
i like the idea of this topic and i'm curious if it'll be used ...
i think in this use case fixed tags will be fine esp. if we might need some menu elements or sheets that know all/some tags and select/filter between them
i think in this use case fixed tags will be fine esp. if we might need some menu elements or sheets that know all/some tags and select/filter between them
There are only 10 types of people in the world: Those who understand binary, and those who don't.
Re: Developement: Quick Question, Quick Answer
@quick question
I too like the idea, but not the thread ;(
We have a orxonox-dev mailing list for exactly those things. Every developer will get the message and can reply in a quick and easy manner. So far, we haven't used it at all, but writing emails is much simpler than writing forums posts. That would fit your needs exactly.
@tags
We might want to distinguish between tags that define bhaviour (test levels, unstable levels, multiplayer/singleplayer levels, etc.) and those that define content. What do you think?
I too like the idea, but not the thread ;(
We have a orxonox-dev mailing list for exactly those things. Every developer will get the message and can reply in a quick and easy manner. So far, we haven't used it at all, but writing emails is much simpler than writing forums posts. That would fit your needs exactly.
@tags
We might want to distinguish between tags that define bhaviour (test levels, unstable levels, multiplayer/singleplayer levels, etc.) and those that define content. What do you think?
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.
A webcomic of romance, sarcasm, math, and language.
Re: Developement: Quick Question, Quick Answer
I would be inclined to agree, regarding the use of the dev mailinglist for this purpose. However the archive is currently not working, which makes the forum more suitable.
Regarding the tags: I thing a separation between behavior and content seems reasonable. The content tags could probably also be left unrestricted.
Regarding the tags: I thing a separation between behavior and content seems reasonable. The content tags could probably also be left unrestricted.
Re: Developement: Quick Question, Quick Answer
Wrong include path -> where is the mistake ?
I want to include Rocket.h in AIController.cc so I typed
But this resulted in an compiler error: fatal error: weapons/projectiles/Rocket.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
In spite of several attempts (other path versions) I couldn´t get rid of the error.
I want to include Rocket.h in AIController.cc so I typed
Code: Select all
#include "weapons/projectiles/Rocket.h"
compilation terminated.
In spite of several attempts (other path versions) I couldn´t get rid of the error.
Fail. Fail again. Fail better.
Re: Developement: Quick Question, Quick Answer
Simple solution: Don't do it
Think about the implications on dependencies if you were to do this. Then you will figure out why this is impossible.
No module ever HAS to be loaded...
Think about the implications on dependencies if you were to do this. Then you will figure out why this is impossible.
No module ever HAS to be loaded...
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.
A webcomic of romance, sarcasm, math, and language.
Re: Developement: Quick Question, Quick Answer
Rocket.h is in the weapon module, AIController.cc in the orxonox library.
See the image at the bottom of page 1: http://svn.orxonox.net/webdev/pps/fs10/ ... kuerze.pdf
In the orxonox library you can not use code from a module. Usually classes in modules are children of a base class in the orxonox library, so you can use virtual functions to do what you need. Sometimes we also use interfaces.
In your case the Rocket is a child of ControllableEntity, which is defined in the orxonox library. Try to use this. If it doesn't work out, ask again. Maybe we can find a solution if we know what you want to do
See the image at the bottom of page 1: http://svn.orxonox.net/webdev/pps/fs10/ ... kuerze.pdf
In the orxonox library you can not use code from a module. Usually classes in modules are children of a base class in the orxonox library, so you can use virtual functions to do what you need. Sometimes we also use interfaces.
In your case the Rocket is a child of ControllableEntity, which is defined in the orxonox library. Try to use this. If it doesn't work out, ask again. Maybe we can find a solution if we know what you want to do
Fabian 'x3n' Landau, Orxonox developer
Re: Developement: Quick Question, Quick Answer
How can I search the whole orxonox code base and probably even the code of included engines? I'm looking for the string "Failed to reset camera!", which is displayed, whenever a bot uses boost.
Fail. Fail again. Fail better.
Re: Developement: Quick Question, Quick Answer
For the orxonox code: That depends on your IDE. In MSVC I can easily do it with file search. However I don't get the files from the data folder there.
So I usually open a Bash and use grep (on Windows too):
grep -ri "Failed to reset camera" . | grep -v \.svn
If you want to search all sources leading to the orxonox executable: Download them manually and extract them. Then search the folder with all the extracted archives
As for your particular string: you might want to have a look at SpaceShip.cc at the end of the file...
So I usually open a Bash and use grep (on Windows too):
grep -ri "Failed to reset camera" . | grep -v \.svn
If you want to search all sources leading to the orxonox executable: Download them manually and extract them. Then search the folder with all the extracted archives
As for your particular string: you might want to have a look at SpaceShip.cc at the end of the file...
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.
A webcomic of romance, sarcasm, math, and language.
Re: Developement: Quick Question, Quick Answer
Hi Jo,
As 1337 said, most IDEs (code editors) have a search function. For example, in CodeBlocks Ctrl+F searches within the current file and Ctrl+Shift+F searches in all files of the project. Other IDEs should have similar features. If you don't use an IDE, you should probably choose one. I think on Linux there are KDevelop, CodeBlocks, Eclipse. CMake can generate projectfiles for them - enter "cmake" in the console and look for the list of generators.
Now of course I'm not a meanie, so I'll point you to the file where the string "Failed to reset camera!" is located: SpaceShip.cc
I had a quick look at the code and it looks like the camera is reset everytime the boost stops. This is a problem, because bots don't have a camera. In fact even remote players in network games don't have a camera, only the "local" (i.e. not remote) and "human" (not a bot) player has one.
ControllableEntity (SpaceShip inherits from this class) has two functions which help with this issue:
If this returns true, it's usually save to reset the camera
(Note how these functions are already called in tick() in SpaceShip.cc, but only to decide whether to enable motion blur or not, but not for the camera)
As 1337 said, most IDEs (code editors) have a search function. For example, in CodeBlocks Ctrl+F searches within the current file and Ctrl+Shift+F searches in all files of the project. Other IDEs should have similar features. If you don't use an IDE, you should probably choose one. I think on Linux there are KDevelop, CodeBlocks, Eclipse. CMake can generate projectfiles for them - enter "cmake" in the console and look for the list of generators.
Now of course I'm not a meanie, so I'll point you to the file where the string "Failed to reset camera!" is located: SpaceShip.cc
I had a quick look at the code and it looks like the camera is reset everytime the boost stops. This is a problem, because bots don't have a camera. In fact even remote players in network games don't have a camera, only the "local" (i.e. not remote) and "human" (not a bot) player has one.
ControllableEntity (SpaceShip inherits from this class) has two functions which help with this issue:
Code: Select all
this->hasLocalController() && this->hasHumanController()
(Note how these functions are already called in tick() in SpaceShip.cc, but only to decide whether to enable motion blur or not, but not for the camera)
Fabian 'x3n' Landau, Orxonox developer
Re: Developement: Quick Question, Quick Answer
That almost sounds like I would be mean... (I hope that omitting the line number was not that mean)x3n wrote:Hi Jo,
Now of course I'm not a meanie, so I'll point you to the file where the string "Failed to reset camera!" is located: SpaceShip.cc
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.
A webcomic of romance, sarcasm, math, and language.
Re: Developement: Quick Question, Quick Answer
Haha no, don't worry, I guess you're far from being mean. To be honest I didn't see you named the file already in your post when I read it first, so I thought after talking about IDEs for 5 lines I should give a hint.
Fabian 'x3n' Landau, Orxonox developer
Who is online
Users browsing this forum: No registered users and 1 guest