I believe the solution is one of a mathematical nature, and to be quite honest, I'm not so good at anything more complicated than multiplication. So all you Mathematicians and Number Manipulation Wizards out there, I need you!

Lets say there's 3 rows of oranges (19 oranges total), and in the first row there are 4 oranges, in the second row there are 6 oranges, and in the third row there are 9 oranges. What is the mathematical formula which will split them in such a manner? And once that is found, how can that formula become alterable so that any amount of oranges can be put in whatever row you want without spilling the oranges from one row into another? Do you see what I'm saying?

I believe that changing the number which it is spread by (or maybe even spreading by a variable ever changeable number) could have something to do with getting it to work, but I have no clue how to get it all working mathematically, let alone implementing it into the code.

I have MSN messenger, for hotmail ... But I'm probably going to need someone who's heavily into math to help me.
Do you know much about mathematics? I vaguely remember something similar to this problem in an Algebra class when I was in school, but I don't know what the term for those kind of problems is or how they were solved.

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

Also take a look at my other Spread Value posts, because they mostly have to do with this problem in my code.
It's a major annoyance, as building levels for a game with the 2.5d coding will take 10x as long if it can't be fixed.
It'll also be easier to messup a level and have to restart making it from scratch because of not knowing where you messed up at.

So, yea ... anyone know of a good Math problem helper site or something?
I'm gonna be googling math sites ... hopefully I can eventually find someone who can help.

GamesterXIII has been trying really hard to help me out, and I am still trying myself, but alas to no avail, as this problem seems to have a fortress of impenetrable, impervious, stone and metal built around it, being mysteriously inscrutable to all in the land, none being capable of gaining entrance to its nearly insurmountable golden bounty of usefulness hiddin within, much resembling Fort Knox and its massive treasure contained therein.

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

or something similar. You'd never get anything over 8 for the first two in the last example, but there are other ways to spread it out. You could put 17 in the first one, for instance, which would mean the other two would each have at least one. It depends on whether you want a limit on how high each one can go.

It can't be random OMC, just variable in the sense that if you put a stack of 1 wall over one platforms shadow to form a higher wall
or tower (if you'd rather think of it that way) until you add the green platform on top ...
Then if you put 2 walls in the next column (shadow and platform pairing), and 3 walls in the third column,
(walls being added in the frame editor, not during runtime), I need a way to make the wall instances line up in the columns no matter their number or order of placement.

Right now, the only way that the walls are not misplaced when stacking them (for the above example in this posting) is if you add a wall to the first column, add a wall to the second column, add a wall to the third column, add a wall offscreen (to keep the steady number balance), add a 2nd wall to the second column, add a 2nd wall to the third column, add another wall offscreen to keep first column numerically balanced with the other columns (3 walls 2 are offscreen), add 3rd wall to second column, and finally add the 3rd wall for the third column.

Is anyone getting this yet? ... and what I really need, is a way to set stacks (of any amount of walls) in any column, and still have everything line up correctly. By correctly I mean if I place 3 walls in the editor in the first column only, (but I have 3 columns) they should remain in the first column instead of getting moved over to the other columns, but I still need the x placement code at start of level because it is used throughout other sections of my code.

Hmm, I think I've just thought of a way without much math ... (if it works without ruining the code already in place that is)
Tell me if you think this would work: measure the x distance between wall placements and the platforms' shadow (the column), and if shadow is closer to wall, than the other shadow instances (columns) are, set wall to that closest shadow..... CRAP! THAT WON'T WORK!
That won't work cause it'll mis-interpret which shadow to pick to consider the distance between it and the wall instance!

This problem is insanity itself! What am I to do?

@OMC, YES, I need a variable limitation on each column.

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

Sorry ... my brain is fried too ... this is so difficult to explain!

But if I could just set position to the location of a specific instance of an object, I'd be able to avoid all this mess.
Is there some way to do that?

If there is, then that'd make life ALOT easier with all my code.
I'd be flying through it then!

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

I'm not sure, but create a hidden counter and increase it every iteration, while setting another counter to the amount of objects and then adding them? Just a thought. If you want something completely different, sorry but I can't understand your explanation...

I'm not sure, but create a hidden counter and increase it every iteration, while setting another counter to the amount of objects and then adding them? Just a thought. If you want something completely different, sorry but I can't understand your explanation...

Lets say there's 3 rows of oranges (19 oranges total), and in the first row there are 4 oranges, in the second row there are 6 oranges, and in the third row there are 9 oranges. What is the mathematical formula which will split them in such a manner?

Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Lets say there's 3 rows of oranges (19 oranges total), and in the first row there are 4 oranges, in the second row there are 6 oranges, and in the third row there are 9 oranges. What is the mathematical formula which will split them in such a manner?

That's completely ridiculous and not even a formula.
This is what your post amounts to: R1 = 4, R2 = 6, R3 = 9
That's just restating the values we already know. And it's not even funny as a joke.

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

What I want to know, is a formula that allows for Variation in Rows, Variation in amount within each seperate row, and Variation in the total of everything ... a balancing act. If one value changes, then they all should change.

Okay, I believe this is the formula for 3 rows: Total = 3(A+B+C) But...
... What is the formula for a variable number of Rows with a variable count of Instances within each Row?
How would I write that mathematically? Is it even possible?

See, if every Instance count within each Row were the same number, then it's easy: Total = RA
But I have no clue what to write for an ever-changing amount of another ever-changing ammount.
Total = R(AV) ??? ..

I think I know the question to ask now ... maybe ..
How can the alterable value of an instance be counted for the amount of instances with that same value?

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

"How can the alterable value of an instance be counted for the amount of instances with that same value?"

pick one of object
+ object value x = 1
+ Object Flag 0 is off
set Flag 0 on
add one to counter/value/whatever (which would be number of objects in that row)

If you need to place objects in rows based on their values (4 6 9) I believe you would have to code that manually.

You would need one more line for EACH row you plan to have.

Start of level Spread 1 into value x of oranges
Value X <= 4
set value X to 1
Value X >4 + Value X <=10
set Value X to 2
Value X >10 + Value X <=19
set Value X to 3

Are you planning on adding "oranges" at runtime?

How many are there going to be total?

It is still kind of vague as to what you are trying to do, so sorry if the answers I have given are inaccurate =s.

n/a

Assault Andy Administrator
I make other people create vaporware

Registered 29/07/2002
Points 5686

9th July, 2009 at 08:18:55 -

MBK - You need to give us an example of what you are actually trying to achieve - What do you want displayed on screen? You're assuming that the answer lies with maths but there are undoubtedly multiple ways of solving the problem. There may be a much simpler way to achieve what you want, not involving any maths, but you need to tell us what it is you actually want to do.

Looking at your first example, I just whipped this up: