pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] Issue 32 in pingus: Level editor and game should support pr


From: pingus
Subject: [Pingus-CVS] Issue 32 in pingus: Level editor and game should support prefab objects
Date: Thu, 08 Sep 2011 13:17:51 +0000

Status: Accepted
Owner: address@hidden
Labels: Type-Enhancement Priority-Medium Component-Editor

New issue 32 by address@hidden: Level editor and game should support prefab objects
http://code.google.com/p/pingus/issues/detail?id=32

Oftentimes levels use repeating group of objects build out of smaller objects, such as say a snowman build out of snowball objects. Currently there is no good way to do that aside from manually coping and pasting objects around.

Proposed solution might look like this:

$ cat waterthing.prefab
(pingus-prefab
  (name "Water thing")
  (objects
    (liquid
      (surface
        (image "liquids/water2")
        (modifier "ROT0"))
      (position -20 1124 -50)
      (speed 55)
      (repeat 31))
    (hotspot
      (surface
        (image "entrances/snow_back")
        (modifier "ROT0"))
      (position 411.668 535.283 -50)
      (speed -1)
      (parallax 1))))

$ cat waterthing-level.pingus
(pingus-level
  ....
  (prefab
     (file "prefabs/waterthings/waterthing")
     (position 100 100 100))
  ...))

The prefab object reference would expand to the content of the .prefab file and be available in the editor as a single object that can be moved around without falling apart. Levels could thus share common constructions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]