Edit detail for ImplementatioN revision 1 of 1

1
Editor: antont
Time: 2003/11/20 15:37:09 GMT+0
Note:

changed:
-
- Blender was selected as the engine. It is actually a 3d modelling and
animation and rendering tool, which very exceptionally includes a
real-time engine for interactive 3d.

- The target was a high-level event (/Action?) abstraction to bind controls to low-level
actions (what the engine is told to do)

- The Class Library

<h3>The Class Library</h3>

make UMLs of this!:

<pre>
class Event:
    def __init__(self, scene, type)

    def act(self, mover=None):
            
    def start(self):
        self.scene.act_events.append(self)

    def stop(self):
        self.scene.act_events.remove(self)
</pre>

<h3>A setup file</h3>

<pre>
scene.movernames=("Guy", "Snake", "Kenguru", "Gorilla", "Alien",
"808", "K", "Kyperjokki", "tornado")

keybindings = {#keyID, eventname, controltype,
        ZKEY: (zoomOut, WHENPRESSED),
        AKEY: (zoomIn, WHENPRESSED),
        LEFTARROWKEY: (kyperjokki.TurnMover(scene, "left"), WHENPRESSED),
        Rightarrowkey: (kyperjokki.TurnMover(scene, "right"), WHENPRESSED),
        UPARROWKEY: (kyperjokki.TurnMover(scene, "up"), WHENPRESSED),
        DOWNARROWKEY: (kyperjokki.TurnMover(scene, "down"), WHENPRESSED),
        BACKSPACEKEY: (kyperjokki.TurnMover(scene, "slow"), TOGGLE),

</pre>

  • Blender was selected as the engine. It is actually a 3d modelling and animation and rendering tool, which very exceptionally includes a real-time engine for interactive 3d.
  • The target was a high-level event (/Action?) abstraction to bind controls to low-level actions (what the engine is told to do)
  • The Class Library

The Class Library

make UMLs? of this!:

class Event:
    def __init__(self, scene, type)

def act(self, mover=None):

def start(self): self.scene.act_events.append(self)

def stop(self): self.scene.act_events.remove(self)

A setup file

scene.movernames=("Guy", "Snake", "Kenguru", "Gorilla", "Alien",
"808", "K", "Kyperjokki", "tornado")

keybindings = {#keyID, eventname, controltype, ZKEY: (zoomOut, WHENPRESSED), AKEY: (zoomIn, WHENPRESSED), LEFTARROWKEY: (kyperjokki.TurnMover(scene, "left"), WHENPRESSED), Rightarrowkey: (kyperjokki.TurnMover(scene, "right"), WHENPRESSED), UPARROWKEY: (kyperjokki.TurnMover(scene, "up"), WHENPRESSED), DOWNARROWKEY: (kyperjokki.TurnMover(scene, "down"), WHENPRESSED), BACKSPACEKEY: (kyperjokki.TurnMover(scene, "slow"), TOGGLE),