Page 1 of 2

weapon system

Posted: Mon Oct 29, 2007 8:55 pm
by 1337
This thread is about how the weapon system is developed and integrated in Orxonox.

Weapon System

Basics: a weapon shoots. There is not much more to know for the time beeing.

The big probem I was confronted with was the fact that I have absolutely no idea about programming a game (specific code!).
So I decided to read some Ogre tutorials (which are quite useful!) and then start with developing my own little engine.
The goal was to control ogre and not beeing totally conrolled BY ogre.
Problem is: I have no clue whether I have produced anything useful.
Anyway: I have learned a lot within a week and more concrete ideas about the weapon system have populated my grey cells.

When I figure out how to create a new trunk/branch (still don't know the difference), I will contribute all my work. My hopes are that this is going to happen in the next hour, so considering the physics and SigSys series, it's not going to be that late today...[/url]

Posted: Mon Oct 29, 2007 9:16 pm
by 1337
Yeah, svn works great.

I have created a new branch called "main_reto" with my version of the orxonox core.
main_reto
Infortunately I haven't had any time to thouroughly comment the source (like most programmers ;)). Maybe tomorrow after SigSys I might have time.

But in order to understand it, I guess I need to give some oral explanations anyway on wednesday.

A remark: I'm currently using Visual Studio 2005 as my IDE of choice. I'm quite familiar with it, and I'm not yet planning on installing Ubuntu just for Orxonox or Code::Blocks with MinGW.
This means that the code might not be working under linux or mac OS X (for instance I'm obviously not using make to build the project). The code itself should be cross platform compatible, but not the project.

Anyway: At least looking at the code should work...

Posted: Mon Oct 29, 2007 9:59 pm
by nicolasc
I had a little look at it...
We need to talk about naming files (.cc, not .cpp, minuscule names), and including need stuff in svn (read .h files), while leaving out the unimportant one (read vs-personal-files)

Keep up the good work!
nico

Posted: Tue Oct 30, 2007 7:22 am
by 1337
What do you mean with "need stuff"? Do you mean the other include-files of Ogre? My h-files are in the svn..

Oh, and don't get me wrong. This is just a suggestion by me.

And as far as I heard, we're having a lesson about code design tomorrow by patrick.

Posted: Tue Oct 30, 2007 7:27 am
by lieni
Really? Might I come to that lesson, too? Oops shit... I guess I'm a few 1000 miles too far away :-S

but hf :)

Posted: Tue Oct 30, 2007 7:29 am
by beni
Who cares about code design that much. I don't really care when there are white spaces when I wouldn't do them and when brackets are not on my favorite position. As long as it's human readable I don't mind. All, everybody in the world of computer programming, should become more flexible and open to minor design question. Who cares when the * of a pointer is at the variable name or the class name?

Besides that. I will browse through your code and see what changes you applied. I went through all the tutorials, but I'm not really pleased with what I've learned. Mostly it's kinda basic stuff. It's good though to have been able to see how it works with Ogre.

Okay, I looked at your code and it's more or less not bad I guess. You never start the render loop of Ogre but instead you loop yourself and let Ogre render just one frame. I guess that's the main thing about your framework. I look forward to hear from you what you were thinking, writing this code. I'm not sure, if we need the OgreControl like it is right now and some code pieces look a bit.. positioned randomly. But anyways: Good work ;)!

And yes, Patrick will be there (at least he said that) ;)

Posted: Tue Oct 30, 2007 11:54 am
by 1337
Yeah, right now it is a little bit of a patch work.
Wherever new code is be inserted (like ships, enemies, etc. in RunManager) there is a mess. Simply something that shows anything but a black screen.

Right now we're having physics lecture and I'm working on how to implement a simple ship (I'm gonna use the ninja.mesh ;) ), that can be steered along with the camera (as in the example frame work).
Maybe I can figure something out..

About the OgreControl:
I know. It once was much larger, but with a bad concept. A simple method, that does the same in Orxonox.cc would do just fine I guess.

Posted: Tue Oct 30, 2007 2:28 pm
by patrick
Yes, I will give a very short introduction to a possible Orxonox code style.

A good, readable code style makes it much easier for people that are not familiar with your code to read and understand it. Therefore it's the second most important thing for open source projects after the Doxygen documentation.

Particularly big source code files are much easier to understand if the code has a certain style that lets the eye separate logical code blocks and functions from each other.

Posted: Sun Nov 04, 2007 11:47 am
by 1337
I have had a look at CMake.
But I don't think hacking something together in order to make my project work under Windows is a good idea.
It probably wouldn't even be such a big deal since the cmake structure from the trunk should work under Windows, too.
But without really understanding what cmake does, it's a bad idea. Of course, I tried, using the CMakeSetup for windows and adjusting the paths, but it didn't work. Probably just a minor issue.

Anyway, I'm waiting for Wednesday.

Posted: Mon Nov 05, 2007 9:14 pm
by 1337
No, I'm not. Today I tried to make things work on a tardis box. Well, after a few instrucitons by beni and Nicolas it all worked.
I edited the CMakeList.txt and pasted all my files in the src folder.
Since there's already a branch in the svn for that purpose, I simply updated that one. It should work (I could test cmake . over SSH, however make failed (maybe wrong tardis box))

SVN branch

Posted: Mon Nov 05, 2007 10:00 pm
by beni
Check it using the right tardisses ;)

ssh yourname@tardis-cXX.ee.ethz.ch

replace XX with a number corresponding with your favorite tardis. If this ain't working try d instead of c..

Posted: Tue Nov 06, 2007 8:12 am
by hofzge
Please do not post any names resembling real mail addresses. I know that some have a name which is similar to their login name, but the choice of name resides with the person carrying it, while posting other persons logins may not be in to their liking.

So: Do not post other peoples login names or mail addresses, please!

Posted: Tue Nov 06, 2007 8:58 am
by beni
You're right. I'm truly sorry :cry:

Posted: Tue Nov 06, 2007 11:37 am
by hofzge
No problem now that all has been fixed.

Posted: Tue Nov 06, 2007 4:40 pm
by 1337
Damn, I tried a lot of things. First one was tardis-a3.ee.ethz.ch. Obviously I forgot the dot. Might be a half a year ago since I last used tardis computing power...

Anyway: tardis-d05 was my choice. I had to delete CMakeCache.txt first in order to make cmake work (took me quite long to figure that out).
And I think it should work. Of course Ogre can't display anything via ssh, so there was an exception, but the same files worked yesterday when I was sitting right in front of a tardis.