The Grid... a catch-22... too many rules or too many actors
Photics
Member Posts: 4,172
Imagine you have a grid... 5 boxes by 7 boxes. That's 35 boxes. Right away, you're already making GameSalad angry. The more actors you have on the screen, the more the game slows down.
Now imagine there are circular actors that drop into those boxes... some red... some blue.
How do you get the circular objects to react to one another? I thought about making something like a database, with attributes!
A1 = Red
A2 = Blue
A3 = Empty
A4 = Blue
The problem is that I cannot change an attribute dynamically. I can only use expressions on the right side, not the left.
...actually... I'm just thinking out loud right now... I'm going to check something. Maybe I can edit the files manually to do what I want.
Now imagine there are circular actors that drop into those boxes... some red... some blue.
How do you get the circular objects to react to one another? I thought about making something like a database, with attributes!
A1 = Red
A2 = Blue
A3 = Empty
A4 = Blue
The problem is that I cannot change an attribute dynamically. I can only use expressions on the right side, not the left.
...actually... I'm just thinking out loud right now... I'm going to check something. Maybe I can edit the files manually to do what I want.
Comments
It was this...
game.attributes.id634103
...but that might not make a lot of sense to anyone. So, I'll explain
I went to edit the XML file in order to trick GameSalad into doing what I wanted. Basically I was thinking of making a pseudo-database. In order to optimize the interaction between actors, I was thinking on making 35 attributes so that the data could be more efficiently shared between the actors. But unfortunately, it seems that I'd need A LOT of rules to change the "database" based on actor positions in the grid.
I can't use expressions to change target attributes dynamically, as the XML file lists Game Attributes by ID, not by name.
If this doesn't make sense to anyone, that's cool. Simply put, I'm trying to figure out a workaround to the limitations of GameSalad.
How do you want them to react to one another? What do you want them to do?
Imagine if a red piece touched a blue piece. The blue piece should turn red. But if I did that with collision detection, all the pieces on the board would turn red. So, I have to do it with a certain bit of logic.
I could do it with rules, but then I'd have hundreds of rules and that's not going to play well.
Sometimes I just sit quietly, staring out into space, trying to figure out a way around this issue. The battle wages... back and forth... do I use logic or do I use collision detection? Do I use a combination of both?
I was thinking if I could create a grid, that would help with the problem. But unfortunately, attributes don't update that way. I thought I figured out something cool, but it didn't work. That pretty much ruined the idea that I had for this thread.
You could do it like this:
No physics, no collisions.
1. Keep track of the current color.
2. As soon as you move your piece, spawn a larger "collider" piece in the exact same spot.
3. The collider will be invisible. Just a box that will overlap the adjacent squares. Destroy it in 0.1 seconds.
4. In all of the pieces, have a Rule that says: If I collide with the collider, change my color to the current color.
I might make it an iPad only game. But while the processing power of the iPad is mighty, I don't know if it could handle the spawning of 70-140 "sensor" actors every second.
Heh... so basically I could give up and work on two different game ideas... a Hexxagon clone or a Bejeweled clone... but I'm still thinking of a way to figure out this. I had a new idea this morning. Maybe a minor adjustment to the game play might make things work.