Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
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 1786 times)
0 Members and 1 Guest are viewing this topic.
Offline Jacko

Junior Member





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

http://www.d6.com/users/checker/ObjSys.ppt 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!

http://wiki.java.net/bin/view/Games/JeffFAQ
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!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (26 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (14 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (59 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!