Status: Accepted
Owner: [email protected]
Labels: Type-Enhancement Priority-Medium Component-Editor

New issue 32 by [email protected]: 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.


_______________________________________________
pingus-cvs mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/pingus-cvs

Reply via email to