Code center > Darwinbots3
DB3 Questions
bacillus:
Maybe something else to think about-this is probably extremely obvious and no doubt already exists, but I should probably mention it anyway.
When handling trig functions, is the angle stored and sin/cos calculated when needed, or are the sin/cos values stored on angle change with the angle having no direct impact on the physics? As I said, pretty obvious, but it has saved me hours of rendering in some of my strange attractor codes.
Numsgil:
--- Quote from: bacillus ---
--- Quote from: Numsgil ---Both. There are specialized muscles and more general muscles. I'll try to balance it so that under certain circumstances lots of general muscle gets built (if you're a generalist), and under other circumstances lots of specialized muscles get built (if you're a specialist).
--- End quote ---
That seems like the best option to go, and the best compromise for multi- and single-bots but wouldn't it be easier to have a general command make equal proportions of all the specialized muscle instead of making a specific type of muscle that adds no unique functionality?
EDIT=>Yay, punctuation's back!
--- End quote ---
I'll have to work it out to figure if we need a hierarchy of generalized to specialized muscles like I was thinking originally, or if we can get away with evenly building across all specialized muscles. But it should be a mostly internal detail I think.
--- Quote from: bacillus ---Maybe something else to think about-this is probably extremely obvious and no doubt already exists, but I should probably mention it anyway.
When handling trig functions, is the angle stored and sin/cos calculated when needed, or are the sin/cos values stored on angle change with the angle having no direct impact on the physics? As I said, pretty obvious, but it has saved me hours of rendering in some of my strange attractor codes.
--- End quote ---
I'll pick a range for sysvars such that it's some multiple of 360, so you can exactly represent angles in degrees (the only sensible integer representation for angles ). Cosine and Sine will be mapped to that same range. So cos,sin will be functions mapping [-360,360]->[-360,360] (assuming the range for sysvars was 360). Angle/distance seems to work better for bots than x/y vectors, so most sysvars will operate with that convention.
bacillus:
--- Quote ---Angle/distance seems to work better for bots than x/y vectors, so most sysvars will operate with that convention.
--- End quote ---
I don't necessarily mean x/y vectors-I'm talking about using polar vector for DNA purposes and such, and having an unseen Cartesian unit vector which only changes on the angle changing, then multiplying by the magnitude of motion. This part will interact with the physics engine, as using cos/sin functions within the physics engine is exactly the same as updating this unit vector every cycle, which is mostly unnecessary.
Numsgil:
Oh, I see. Yeah, the core engine isn't angle based. It's all vectors and matrices.
bacillus:
Quick thought - is it possible to have some substances act as gradients, so that each cell will distribute its concentration to cells bonded to it? It's simple, but could be useful in determining multibot size etc.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version