Perlin noise
by Jonathan Arsenault · in Torque 2D Beginner · 05/31/2013 (10:24 am) · 4 replies
I made a Perlin noise implementation for Torque2d, sharing it here for people that might need it. The toy and torque script binding are not quite done and i did not have time to test everything yet, but the bulk of the functionality is there for people who want to experiment with it.
https://github.com/jonharson/Torque2D/tree/feature/Procedural
Random nitpick that i found while making this thing; mPow has no integral implementation, reserve is a protected member of Vector and has no usable implementation for Vector2d, a direct constructor is available tho and a resize(), this is inconsistent. Vector::size are signed. No support in script for unsigned data type?
Do i need to register the _ScriptBinding.h somewhere to have them available to TS?
https://github.com/jonharson/Torque2D/tree/feature/Procedural
Random nitpick that i found while making this thing; mPow has no integral implementation, reserve is a protected member of Vector and has no usable implementation for Vector2d, a direct constructor is available tho and a resize(), this is inconsistent. Vector::size are signed. No support in script for unsigned data type?
Do i need to register the _ScriptBinding.h somewhere to have them available to TS?
About the author
Made a small foray in the gaming industry working at Citeremis, worked and offered consultation in many other sector since, passing through casino management, the wood transformation industry and the transportation sector. Eat code for breakfast.
#2
05/31/2013 (10:52 am)
*facepalm* yeah including it somewhere is gonna help ^^
#3
05/31/2013 (4:51 pm)
Cool stuff!
#4
Historical note: the Vector template class in all Torque engines appears to be a homebrew and is not very friendly or complete. You will find things like it throughout the older parts of the engine code. I feel your pain....
05/31/2013 (5:01 pm)
Very nice!Historical note: the Vector template class in all Torque engines appears to be a homebrew and is not very friendly or complete. You will find things like it throughout the older parts of the engine code. I feel your pain....
Community Manager Michael Perry
ZombieShortbus
You can follow the example of the other source files. You just need to add it to the project, then include it in a related source file. For example, Sprite_ScriptBinding.h is included in Sprite.cc.