increasing the spawning frequency of "randomly" spawned actors

preface: imagine some kind of bastard, mutant clone of fruit ninja where there's two dudes throwing fruit and bombs at you at the same time. the object obviously being grab the fruit, skip the bombs. each dude can only throw one object at a time but considering there's two of them they could both be throwing something at you simultaneously or they could take turns... kind of a series of randomly true booleans i guess.
how would one preserve the randomness of the spawning projectiles coming from two directions while increasing the frequency gradually over time?
so far my experiments have been too predictable and either too infrequent or too frequent.
any help, whether it's advice or links to resources/information that may be useful would be greatly appreciated.
thanks.
-mrHiggins
how would one preserve the randomness of the spawning projectiles coming from two directions while increasing the frequency gradually over time?
so far my experiments have been too predictable and either too infrequent or too frequent.
any help, whether it's advice or links to resources/information that may be useful would be greatly appreciated.
thanks.
-mrHiggins
Answers
i'll let you know how it goes.
www.gshelper.com or his YouTube channel
my PSA for the day:
unknowingly following sarcastic advice on how to fix computer problems when you're new to the platform is a bad idea, kids. leave it to the professionals like me.
so my initial thought was something like:
-have an actor spawning my "fruit" every [variable]. maybe 3 seconds at first and have a table that would update the variable based on how long you've been playing. ie, every minute of play (give or take) would reduce the variable by .5 seconds. this would also allow me to have a plateau so the game wouldn't become unreasonably fast.
-have a second table that has all the actor names i'd like to be able to spawn. this way i could not only spawn "bombs" at random but vary the "fruit" as well.
-the expression value for what to spawn would be something like...
tablecellvalue(table 1, 1, random(1, tablerowcount))
-rather than have a single cell be dedicated to one variable projectile, have an array of them. for example, have cells 1-50 be an apple, 51-100 an orange, etc.
-also have an array of cells dedicated to a null value so that the frequency of spawned projectiles is seemingly random. it seems like it might be easier to spawn something that's not there than it would be to tell it not to spawn at certain times... if that makes sense. maybe have the range for this be double the range for the individual fruit; like 101-200 (give or take).
-do the same with the "bombs" as with the "fruit" but have a smaller range so "fruit" is more frequent. maybe even have the bomb range be at the beginning so that the likelihood of them spawning also gradually gets more frequent by altering the above proposed code to start with a variable (lets say it starts at 50) and it gradually gets lower thus expanding the range of the usable table data.
ie
tablecellvalue(table 1, 1, random(var, tablerowcount))
would this work? if so, do you think i would be wasting too many resources by throwing away cycles on null values in my table? am i over simplifying this?
sorry for the novella.
-mrHiggins
their beauty is in their conservation of resources!
so null values in tables are very efficient
and, though you can put all you want to store in Attributes
… tables give you a faster, smoother, and smaller byteSize project!