Author Topic: BlockDoc - A Blockland coding wiki (Now hosted on  (Read 669 times)

BlockDoc is a wiki that strives to be a good reference for Blockland-specific coding and modification. There is a lot of content already, but it also isn't really complete either. I'd like to ask the modding community to help me in continuing to build this potentially powerful resource. If you feel like helping, note the list below and jump into any topic you like! Sorted somewhat by importance.

The Essential Functions List needs pages created for the remaining functions which do not have one.
The Datablock List needs the remaining datablocks added to the list. I don't really expect many pages for the datablocks themselves.
The Class List needs some pages for the more important classes and their respective method functions, like TCPObject and fxDtsBrick. The list could also do with a section at the top highlighting the more frequently used classes since the list itself is somewhat daunting and most of these classes don't actually see much direct use.

Current significant contributors (Thanks!):
- Pecon
- Xalos
- Zapk
- Ipqµarx
- TheBlackParrot
- Honno
« Last Edit: March 22, 2017, 01:55:26 PM by Pecon »

Oh stuff this would be loving useful

should be is now an official alias.

« Last Edit: March 26, 2017, 10:03:25 PM by FelipeO_O_ »

strStr might be equivalent to strPos, but I found it's about twice as fast in practice and you should always use it if you don't need a start position.
« Last Edit: March 28, 2017, 08:42:25 AM by Zeblote »

Damn, I don't know how to write on a wiki.  I've never done it before.

But heres some info on static shapes.

Using setScale(# # #)
If you set # to a value smaller than 1, the shape will dissappear before the shape leaves your field of view.  Giving a pop-in pop-out effect at the edges of your screen.
This can be worked around by creating a "bounding cloud" of vertices around the shape when it is first contructed in a model editing program.  The bounding cloud should be larger than the object.  So if you plan to scale the object down to 0.5, the cloud needs to be twice as large as the actual object.  0.2 = 5x, 0.3=3.3333333 etc.
If you set the value to greater than 0.5, vehicles can glitch through the object at high speeds.  In addition, vehicles will tend to "bounce" off of the shape at greater speeds.
If you set the value to smaller than 0.5, vehicles will be able to "push" through the object at slow speeds.  In addition, vehicles will tend to bounce off of the shape to a lesser degree.
Setting the value to 0.5 seems to give perfect collision.
I have never seen this layer do anything other than increase the size of the object's bounding box to contain it.
Blockland does not seem to use it.

Using setTransform(0 0 0 # # # #)
No Ill effects, rotate away.
Rotating the object in any way seems to screw up the way vehicle wheels react to the object.
If you make a loop de loop out of a single object, duplicated and rotated around a single axis, and try to drive through it, the wheels of your vehicle will reverse direction and start pulling you backwards as soon as you hit the vertical point.  Creating a unique static shape for each angle makes the vehicle wheels act as they should.
Does nothing.

When creating a .dts shape, the collision layer should contain a single convex collision mesh.  Convex means "having only interior angles measuring less than 180."  As a basic rule, if you can connect two vertices by going outside of the shape, your object has a concave mesh and should be adjusted.

Concave collision might work with some objects with advanced collision.  The "Player" object tends to work well with almost anything.  But for vehicles it wont work well at all.