Gametype and XML parameters

A place to discuss everything about the Orxonox framework.

Moderator: PPS-Leaders

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

Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 9:25 am

Yesterday I discussed the Gametype configuration via level files.
And x3n suggested to use a new class that configures the gametype. It would be written in Level scope of the XML file.

But why not directly making the Gametype an XML class and configure it like that?
I think I see what x3n thought when exactly NOT doing this: A level should not have to modify a gametype, just tell which one to use.
Well, I don't think so ^^ Small modifications should be possible. The use of an additional "GametypeConfiguration" object is merely another way of expressing it.

Am I missing somthing important what the Gametype isn't XML configurable?
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
Mozork
Mogthorgar, the mighty
Posts: 134
Joined: Wed Sep 24, 2008 3:27 pm

Re: Gametype and XML parameters

Post by Mozork » Tue Apr 27, 2010 11:15 am

As a matter of fact, I thought about this, too, yesterday when I was talking to Mathis (he's creating a level). I think it makes sense for gametypes to be (to some degree) configurable, e.g. Deathmatches can have different killcounts to be achieved before the game is over. It also makes sense to be able to do this in XML.

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

Re: Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 11:33 am

The actual question is always whether these parameters actually depend on the Level. And I think the ones we're talking about here really do. For instance the kill count may depend on the map layout or size or the availability of weapons and ammunition.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

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

Re: Gametype and XML parameters

Post by beni » Tue Apr 27, 2010 11:43 am

I'm not sure if it is that easy. I think you should be able to configure a Gametype separately, independent of the level (at least to some extend).

What I'm thinking about is a scenario like this: I start Orxonox, but it's already late and I don't want to play for very long. So I want to start a short multi-player game with bots. Now I don't know exactly how large and time consuming each map is, so I want to configure the number of bots, maybe the way points are counted and the maximum point count. Maybe I want to change friendly fire.
Those parameters shouldn't be all dependent on the level.

A compromise to this idea would be a solution where the level designer decides on a couple of pre-defined parameter sets. Those sets can then later be chosen by the user.
In the scenario I would choose my favorite level, but choose the parameter set with the lowest number of bots and minimal point count.
"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

Re: Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 11:53 am

That's excactly how I see it.
There is already a stub to configure the gametype in the menu, but not yet implemented.

I'm merely thinking about parameters like "startAction" and "participationAllowed".
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
Mozork
Mogthorgar, the mighty
Posts: 134
Joined: Wed Sep 24, 2008 3:27 pm

Re: Gametype and XML parameters

Post by Mozork » Tue Apr 27, 2010 12:14 pm

I think one could also think of some of the parameters as mere suggestions of the level designer, while the user has a higher priority and his settings override those set in the level file.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Gametype and XML parameters

Post by x3n » Tue Apr 27, 2010 12:15 pm

yeah i know, this point is being discussed for over a year now.
here's my point of view:

first lets see how you start a level:
menu -> singleplayer -> chose gametype -> chose level -> configure settings (max time, max score, number of bots, mutators, friendly fire, extra pickups, bot strength, etc) -> start!

so all settings which can be controlled from the menu shouldn't be predefined in the level.

also think about what a "level" really is: it's just a location, a bunch of models and a skybox, a collection of items and objects. think about a level called "zurich" with the gametype "real life" - do you really want all settings of your game to be predefined by the location where you play it? surely not.

---

on the other hand i see the need for suitable default values (remember: the gametype in a level is only a default, we could change it, but most levels are specifically designed for one gametype, so it makes sense to set a recommended gametype in the level). those default values are useful if you start a game without menu - for example if there's a minigame within a level, you want it to be perfectly configured (including all settings which are usually configured in a menu).

but you probably notice the different term: before i was talking about "levels", now i mentioned a mini"game". there's a distinction between a level and a game. a level is just a generic location, while a game has strict rules.

so to end this post, i still don't see the need for predefined settings in a "level", but i see the need for a "game" class. this class would contain attributes for a) the level to load and b) all settings. so players could still chose a level from the menu and play it with their prefered settings, but on the other hand they could play a singleplayer campaign which is just a series of games, where all settings are already predefined by the developers.
Fabian 'x3n' Landau, Orxonox developer

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

Re: Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 12:39 pm

So, we need another layer: Game. I wanted to combine it in Level, but so far it doesn't exactly make a lot of sense.

Actually, all I want to do is create a level/game that automatically starts the game, has a few bots playing in the background, doesn't display any messages (like kill message), has no score board and shows a menu or a video sequence upon starup. Also, no player should in any way be able to participate. ^^
Quite a few requirements I'd say.
Oh, and I don't want to do any hacks (however hack is defined though...).
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Gametype and XML parameters

Post by x3n » Tue Apr 27, 2010 1:27 pm

bots in the background can be defined in a level file itself and a gametype which starts itself but doesn't allow humans to play is possible with only a few lines of code.
Fabian 'x3n' Landau, Orxonox developer

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

Re: Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 1:46 pm

It's rather the rest that concerns me ^^
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

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

Re: Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 4:03 pm

I think I can resolve my issues the same way we handle the Gametype for a normal level: configuration in from the gui and then this information somehow gets to the gametype. Question is just how..
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Gametype and XML parameters

Post by x3n » Tue Apr 27, 2010 8:05 pm

1337 wrote:It's rather the rest that concerns me ^^
which rest?
opening a menu? i guess thats 1 line in the constructor of the gametype, isn't it?
no messages? there aren't any in the default gametype
no scoreboard? well thats currently not possible since the scoreboard is only a hack, but we don't want a scoreboard in the singleplayer campaign either, so it's a separate problem
Fabian 'x3n' Landau, Orxonox developer

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

Re: Gametype and XML parameters

Post by 1337 » Tue Apr 27, 2010 8:43 pm

actually the default Gametype does send messages. Maybe nothing listens, not sure about that.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Gametype and XML parameters

Post by x3n » Tue Apr 27, 2010 11:41 pm

no, there are no messages.

btw, seemingly you can also deactivate the scoreboard by using another template (= no template) :)
Fabian 'x3n' Landau, Orxonox developer

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests