Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (671)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Game Objects?  (Read 2131 times)
0 Members and 1 Guest are viewing this topic.
Offline Jacko

Junior Devvie

« Posted 2003-12-17 23:42:29 »

Just wondering how other people deal with in game objects in their projects, and what their thoughts were about it.  I've always done mine with straight inheritance and composition, but I've just started to find out about active object frameworks, where you basically write your own object framework. is a description of what i'm talking about.

Most of what I've seen is in big studio production, with a very clear divide between programmers and designers. But I just like the look of this kind of thing from the flexibility you could get from it, along the lines of (assuming you were playing a MUD) (and talking about orcs coz im going to see ROTK tomorrow  Grin)

>light torch
>throw oil at orc
> throw torch at orc

The torch oil would set the flammable property of the orc, and the torch throw would set fire to the mofo.

Anyway, active objects(meta data, component framworks, call em what you want) have got me interested, what do you lot do?
Offline Jeff

JGO Coder

Got any cats?

« Reply #1 - Posted 2003-12-18 00:34:22 »

My older brother came up with a system for MUDS years ago he called DOOR  (Door Object Or Room.)

EVERYTHING in the MUD is a DOOR.  DOORS have two properties:
(1)  They can contain other DOORs
(2) They can contain regexp commmands that run scripts.

I added one concept which was two regexp lists, an "inner" command list and an "outer" command list.  

You throw strings at objects as commands.  The match order AIR was follows:

(1) OUTER commands of my children
(2) INNER commands of my Parent
(3) OUTER commands of myself.

This simple structure allowed for virtually EVERY action necessary in a MUD. If you want some examples, describe a few scenarios at me and I'll show you how it decomposes into DOORs Smiley

A simple example is a lighting example.

Outer command "look" on the character is a script that prints my parent's description.

A dark room has an inner command "look" that prints "The room is dark."  This has precedence (see above).

A torch has an outer command "look" that prints the description of my  parent's parent.  So this overrides the dark room when placed in the inventory of the character.

While one *could* simply look for a torch object in the player's inventory in the room "look" command, this would mean that the room would have to have apriori knowledge of all light sources.  By using the DOOR paradigm the torch can be created after the fact and the dark room need know nothing about it.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Offline Jeff

JGO Coder

Got any cats?

« Reply #2 - Posted 2003-12-18 00:35:26 »

The moral of the DOOR story is that you really can't ask "how should you architect a game" in abstract.  There are specific architectures that lend themselves well to certain types of games.  DOOR is great for a text adventure.  It would suck for an FPS.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

IanParcs (38 views)
2016-04-18 14:18:53

KaiHH (38 views)
2016-04-18 08:35:41

KaiHH (69 views)
2016-04-15 12:43:58

theagentd (71 views)
2016-04-14 02:16:17

theagentd (79 views)
2016-04-14 02:15:43

IanParcs (95 views)
2016-04-12 03:51:16

IanParcs (39 views)
2016-04-12 03:50:03

IanParcs (35 views)
2016-04-12 03:49:54

IanParcs (32 views)
2016-04-12 03:49:52

IanParcs (40 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!