Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Coppercube programming...

sulbcon
Registered User
Quote
2022-04-08 05:30:05

Can coppercube run long loops (i.e 1000+) during runtime without hanging?


sulbcon
Registered User
Quote
2022-04-08 11:27:05

And also, does the ccbgetCollisionPointOfLineWithWorld() function calculate collision from inside a collider? I mean does the line collide with the collider it is inside?


Robo
Guest
Quote
2022-04-08 14:21:27

There is no limit to how long the time delay can run. If you mean a for loop with 1,000 objects to iterate over then depends on what you need to check each loop...if simple then yes, if complex then maybe / maybe not...

Collision point doesnt look at the player - anything else will be checked though...


sulbcon
Registered User
Quote
2022-04-08 15:25:52

Thanks. And another thing...
Shader programming is almost impossible to learn. Like I've tried to understand what they are doing but it feels like a different thing entirely from programming... Please if you or anyone knows any good website where I can learn please recommend because if there is anything I gate about coppercube programming it's the shader aspect.


Arcanjo
Guest
Quote
2022-04-09 06:43:06

It depends Ram Memory of the computer.
4gb ram can be. But 8gb ram is better.


Arcanjo
Guest
Quote
2022-04-30 22:50:05




DouweDabbe
Guest
Quote
2022-05-03 15:13:03

you can optimize code so that program performs better:

put var statements with initialization together, like so:
var myInt = 0, myString = "ohLaLa",
myPos = new vector3D(0,0,0);

dont do:
if ( ccbDoSomething(ccbGetSomething() ) === 0) {
}
or
for (var i=0; i<ccbDoSomething(ccbGetSomething() ); i++) {
}

but :
var mGet = ccbGetSomething;
var mDo = ccbDoSomething(myGet);
if ( mDo === 0) {
}
or
for (var i=0; i<mDo; i++) {
}

this reduces the execution calls to ccb and js functions and therefore is more efficient


sulbcon
Registered User
Quote
2022-05-30 22:53:24

Err... Does coppercube support JavaScript Json?


DouweDabbe
Guest
Quote
2022-06-05 05:02:53

wrote:
Err... Does coppercube support JavaScript Json?


In the meantime PLEASE start migrating your JSON-using applications over to Crockford’s json2.js. It is fully compatible with the ECMAScript 5 specification and gracefully degrades if a native (faster!) implementation exists.

There are two primary methods for handling JSON: JSON.parse (which converts a JSON string into a JavaScript object) and JSON.stringify (which convert a JavaScript object into a serialized string).

https://stackoverflow.com/questions/22883743/how-can-i-write-an-array-to-a-file-in-nodejs-and-keep-the-square-brackets


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact