GrumbelsTrashbin / pingus.old-auto-export

Automatically exported from code.google.com/p/pingus
GNU General Public License v3.0
0 stars 0 forks source link

Level editor and game should support prefab objects #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by grum...@gmail.com on 8 Sep 2011 at 1:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 3551e820f8e5.

Original comment by grum...@gmail.com on 11 Sep 2011 at 11:18