System that manages the using of game objects

Got something on your mind about the project? This is the correct place for that.


Forum rules

This forum is for feature requests, content changes additions, anything not a Bug in the software.
Please report all bugs on the Support Forums

Post Reply
Argh
Peon
Peon
Posts: 29
Joined: 08 Feb 2005, 15:11
Location: Germany, near Berlin
Contact:

System that manages the using of game objects

Post by Argh »

Hi!

With the permission of Kyokai I put my description of a system that describes how the usage of game objects is managed in The Mana World into the wiki:
http://themanaworld.sf.net/wiki?ObjectUsage

Please discuss this approach here.
User avatar
ElvenProgrammer
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Post by ElvenProgrammer »

Great work, I found it detailed and clear. Still need improvements anyway
I see you used store in a generic way, what if I use store a sword in my left hand? It will equipped (ready to be used) or just held in the hand?

What about dropping an item? Should I throw_entity_at(entity, ground)?

About the 3rd example: baking bread means deep interaction with world objects, still to be discussed if we can add it.

Keep on with the good work :D
User avatar
Talaroc
Warrior
Warrior
Posts: 429
Joined: 10 Feb 2005, 04:23
Location: The Frozen North

Post by Talaroc »

It looks pretty good. I agree that there needs to be a "drop" action, but this looks like examples to show concepts anyway, rather than an all-encompassing list.

I really hope we can incorporate deep world object interaction. Bring a lot of life to the world, you know?
Argh
Peon
Peon
Posts: 29
Joined: 08 Feb 2005, 15:11
Location: Germany, near Berlin
Contact:

Post by Argh »

Dropping item would be nothing more than

Code: Select all

player->store_entity(player->inventory->object_to_drop, world)
...the Problem:
How are game object and their relation to the world currently managed?
I think of something like that:
We've got a world-object, which is - among other things - a container for a list of all the tiles. Every tile is - among other things - a container for a list of entities that are liying there.

If the player wants do drop i.e. an apple, we would use the following:

Code: Select all

player->store_entity(player->inventory->apple, world->get_tile_from_coordinates(player->get_position()))
Internally, the store_entity()-function would call some kind of tile->store_entity(entity) for the tile given to him and the entity to be stored.

btw: this "code" upthere is still simplified - I never would declare i.e. inventory as public and it looks "apple" would be member variable of the creature class - so in the end this all would look more complicated:

Code: Select all

player->store_entity(player->get_inventory()->get_object(/*ID or name or whatever the apple is identified by*/), world->get_tile_from_coordinates(player->get_position()))
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

Note that it is still not clear wether locations will be tile-based, we would still like to work towards a more SoM like moving style so we'll probably be positiong both beings (you seem to call those actors) and objects (which you call entities) on pixel coordinates.

I read it and I'm there is not that much I'm agreeing with at first sight, but with more understanding it should get somewhere, it still looks like a good start. I think what mainly worries me is that there is so much focus on implementation already, and I'm not sure if I agree with implementing it like this. I think focus should first be on the human interaction with the system, not the programming background of it.
Argh
Peon
Peon
Posts: 29
Joined: 08 Feb 2005, 15:11
Location: Germany, near Berlin
Contact:

Post by Argh »

This is completly right, but I personally don't see a problem for the user - I mean, you can hide as much as possible from the user, so he doesn't has to manage all the comlex interiors.
Could you give me an example for the problem arousing from my ideas with the human interaction?

btw: If we don't use tiles this stuff above can be easiliy converted, I think.
User avatar
Kyokai
Warrior
Warrior
Posts: 323
Joined: 15 Feb 2005, 02:55
Location: USA, North Carolina
Contact:

Post by Kyokai »

It should be ok as you propose it, Argh. I think it has alot of promise for creating a vast, interactive world. I know that's your vision for TMW, and it's mine too. :D

That system gets really explicit though, since we have to define a list of cases for each entity. I'd like you to come up with a complete list of the possible cases that outline every possible action an entity can perform on another. (15 or less would be a good number to shoot for). This would make it easier on programmers.

Also, try to be as generic as possible.
- Drink and Eat can be combined.
- Push and Pull can be combined (with a negative value passed to push)
- Store and drop are the same (you're just storing the object in the world)
- Bite -> Attack (all actors can attack, we only need one function for it)
- Fire Up, and similar actions can become -> Activate
- Fire Down, and similar actions can become -> Deactivate

You need to come up with more classes. Now you have Actors, but we'll also need:
- Stationary Objects - Items that can be used, but not stored. (barrels, oven, etc.)
- Tools - Items that can only be used or stored, and have no storage themselves (potions, rope, meal).

Also, I have to say I'm against using push and pull too much. Players may be able to rearrange objects in their own homes via the Player Estate System, but they shouldn't be able to move other people's stuff around, especially the scenery in towns. Maybe if he has special permission or such... but that ties more into the political system...

I would actually suggest excluding items that fall into "tools" from the system altogether. Only use this object system for items that don't go into the player's inventory, the ones that he interacts with on the world map. It's pointless to have 15 acting functions for an item that can only be used or stored.

This system also provides a valid basis for the NPCs to be derived from, since they are just objects with talk scripts attached.
The Mana World System Coordinator.
View the Systems
So what does the systems coordinator actually do? My job is to take your ideas for TMW and build them into working aspects of gameplay that can be implemented by the artists and programmers. If there's anything you think we can do better or differently, let me know.
User avatar
Bjørn
Manasource
Manasource
Posts: 1438
Joined: 09 Dec 2004, 18:50
Location: North Rhine-Westphalia, Germany
Contact:

Post by Bjørn »

Hmm have you read docs/server.txt? Our plans were to integrate montsers, players and NPCs into a single Being class. And to integrate items laying on the floor and things statically standing around, possibly animated or ready for interaction, into a single Object class. (Now Being is could be a subclass of Object or maybe they're both subclasses of something that implements shared properties, but that part is left until it'd actually be implemented.)

This is just to point out the little detail that NPCs are not meant to be simply objects with a talk script added, but full beings with all the freedom that beings have, with a talk script added.

About how the player will work with this system. I see that as the most important part and while you can think about implementation in this stage, it's much more important to first agree on how we want these things to be handled in the game, what we want all to be possible, what is feasable to do, etc. It will ultimately determine what is needed for implementation. Not to mention it is actually the hardest part in my opinion. When solved, actual design and implementation of the system should be quite a bit easier.
Argh
Peon
Peon
Posts: 29
Joined: 08 Feb 2005, 15:11
Location: Germany, near Berlin
Contact:

Post by Argh »

Ah, sorry guys, I think now I see my problem :roll:.
I will try to overwork everything and get a distance to the implementation.

edit: okay, I started adding a overworked system to the bottom of http://themanaworld.sf.net/wiki?ObjectUsage
User avatar
Kyokai
Warrior
Warrior
Posts: 323
Joined: 15 Feb 2005, 02:55
Location: USA, North Carolina
Contact:

Post by Kyokai »

Argh's Page wrote:Actor abilities: ingest objects(eating an apple)
I think the intended message here is "use item (eating an apple)". Just to clear up some terminology confusion (interactive world objects won't be ingested, I think). Other than that, I think it's come together pretty nicely.

Try to come up with an exahaustive list of objects that will exist for player interaction and put them on a separate page in your Wiki post. Write a short paragraph describing what each one does and doesn't do.

I've come up with one to start you off:
Apple Tree - This immobile object generates an apple item every 30 minutes or so and stores it in its personal inventory. Players can take any number of apples from the tree freely.
The Mana World System Coordinator.
View the Systems
So what does the systems coordinator actually do? My job is to take your ideas for TMW and build them into working aspects of gameplay that can be implemented by the artists and programmers. If there's anything you think we can do better or differently, let me know.
Post Reply