weapon system

Introduce your project and write about your work.

Moderator: PPS-Leaders

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

weapon system

Post by 1337 » Mon Oct 29, 2007 8:55 pm

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]

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

Post by 1337 » Mon Oct 29, 2007 9:16 pm

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...

nicolasc
Baron Vladimir Harkonnen
Posts: 258
Joined: Wed Nov 01, 2006 7:58 pm
Location: your mind
Contact:

Post by nicolasc » Mon Oct 29, 2007 9:59 pm

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
BOFH Excuse #212: Of course is doesn't work. We've performed a software upgrade.

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

Post by 1337 » Tue Oct 30, 2007 7:22 am

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.

User avatar
lieni
Noxonian Reg'metholt
Posts: 56
Joined: Tue Oct 31, 2006 4:35 pm
Location: Hell
Contact:

Post by lieni » Tue Oct 30, 2007 7:27 am

Really? Might I come to that lesson, too? Oops shit... I guess I'm a few 1000 miles too far away :-S

but hf :)
The secret to creativity is knowing how to hide your sources.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Tue Oct 30, 2007 7:29 am

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) ;)
"I'm Commander Shepard and this is my favorite forum on the internet."

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

Post by 1337 » Tue Oct 30, 2007 11:54 am

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.

User avatar
patrick
Baron Vladimir Harkonnen
Posts: 350
Joined: Mon Oct 02, 2006 6:03 pm
Location: Bern

Post by patrick » Tue Oct 30, 2007 2:28 pm

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.

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

Post by 1337 » Sun Nov 04, 2007 11:47 am

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.

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

Post by 1337 » Mon Nov 05, 2007 9:14 pm

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

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Mon Nov 05, 2007 10:00 pm

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..
Last edited by beni on Tue Nov 06, 2007 8:58 am, edited 1 time in total.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
hofzge
Roshliikhh, lower servant to the Deities
Posts: 116
Joined: Mon Oct 23, 2006 12:01 pm

Post by hofzge » Tue Nov 06, 2007 8:12 am

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!
The sky above the port was the color of television, tuned to a dead channel.
-- William Gibson, Neuromancer

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Tue Nov 06, 2007 8:58 am

You're right. I'm truly sorry :cry:
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
hofzge
Roshliikhh, lower servant to the Deities
Posts: 116
Joined: Mon Oct 23, 2006 12:01 pm

Post by hofzge » Tue Nov 06, 2007 11:37 am

No problem now that all has been fixed.
The sky above the port was the color of television, tuned to a dead channel.
-- William Gibson, Neuromancer

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

Post by 1337 » Tue Nov 06, 2007 4:40 pm

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.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests