Dev Blog

Hi, this is the Stranded III development blog (see also Forum Thread, Comment Thread).

Overview (114 Entries)

Entry 18 - Extended Definitions & Enhanced Debugging - March 12, 2014

Extended Definitions
Unity3D allows you to have game objects with components (lights or particle emitters for instance) and children (other game objects, models for instance). I wanted to allow this for Stranded III as well. To make that possible I had to extend the very basic definition system to allow some sort of encapsulation.

I'm not fully done with this yet but here's a short example just to give you an idea how it looks like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
abstract object "tree" {
     category=Trees
}

object "palmtree01" extends "tree" {
     name=Palmtree
     model=res:Palm_plant_01_01
     model_size=2,2,2
     collision {
          type=capsule
          radius=0.5
          height=7
          direction=1
          offset=0.2,3,0
     }
}

You can see that the inheritance system (note the abstract and extends keywords) is still present. collision actually creates a new component at the tree. In this case a capsule collider.

I'm planning to extend this so you can do stuff like
1
2
3
4
5
6
7
8
9
object "bla" {
     ...
     child {
          model=...
          child {
               ...
          }
     }
}

This would allow you to create more complex objects consisting of multiple parts which can be accessed and manipulated individually. A windmill with rotating wings for example.

Enhanced Debugging
Debugging definitions and scripts is a crucial task for everyone who modifies them. For that reason I now made it much easier to do so. The new console doesn't only show the file and the line of an error but it also makes it clickable. So you can now just click an error and your text editor will open the file and scroll to the line which caused the problem. This is controlled over a configuration file. You can modify that file and the necessary commandline parameters to use this feature with any text editor you like.

Disqus

blog comments powered by Disqus