Happy Holidays Gift -- Free AutoSpawing Table Cell Reader
RThurman
Member, Sous Chef, PRO Posts: 2,880
Hope everyone enjoys the season!
I'm not sure how to describe this little gift -- except its free.
It automatically spawns tiles in a grid formation. You can specify the width and height of the tiles. And you can tell it how many rows and columns to create. It then uses a recursive spawning process to create the grid/array/tiles.
Each tile reads and writes to its corresponding cell on a table. That is, a tile at 3,4 reads/writes to the table at row 3 column 4.
It can be used to set up your own table-based games (like bejeweled, tetris, freeflow, minesweeper, etc,).
http://www.mediafire.com/download.php?ddksabn4a1yj1ra
Happy Holidays!
RThurman
I'm not sure how to describe this little gift -- except its free.
It automatically spawns tiles in a grid formation. You can specify the width and height of the tiles. And you can tell it how many rows and columns to create. It then uses a recursive spawning process to create the grid/array/tiles.
Each tile reads and writes to its corresponding cell on a table. That is, a tile at 3,4 reads/writes to the table at row 3 column 4.
It can be used to set up your own table-based games (like bejeweled, tetris, freeflow, minesweeper, etc,).
http://www.mediafire.com/download.php?ddksabn4a1yj1ra
Happy Holidays!
RThurman
Comments
Nice of you to offer this up. I was just thinking about making a somewhat similar demo. You saved me the trouble!
What I don't get is why it appears to complete the spawning before any other actors run their rules (see demo below). Or at least any other typical loop functions (based on a timer). If I set the grid to 300 cells and then check the game.time before and after, they both report 0.0 seconds. How?
What kind of magician are you, @RThurman?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Glad you are enjoying this Holiday trinket. I hope it holds something intriguing for all skill levels (from novices to grizzled old GS veterans).
Happy Holidays!
RThurman
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Yes -- I thought of the same kind of thing. Originally, I wanted to use GS to create a paint program. I think it would be fun to do flood-fills and such. I want it to work at the individual pixel level.
Unfortunately, there is a lot more memory overhead for an actor than there is for a pixel (even if the actor might be represented by only one pixel on the scene).
-----------------
I hope that those newer to GS will find other fun little tricks in this project.
Its just a little freebee that's packed with examples of how to do things. Like GameSalad, it is provided for free -- but it is up to you to figure out what you would do with it. And like GameSalad, I'd be careful about discounting it simply because it is free. Nevertheless, here are some suggestions:
If it is absolutely unintelligible, then I'd suggest just trashing it. In this case, it's just a waste of bits. We've all received gifts that were unwanted. (I certainly have.) If this is the case for you then I completely understand if you simply delete it.
If it is completely transparent, and you already know how to do all that stuff, then I'd suggest just trashing it. In this case, it's just a waste of bits. We've all patiently (and kindly) waited while someone who thinks they know it all shows/tells us something we already know how to do. It's probably polite to say thank you and then ignore it all -- since you already know what to do.
If it is something that prompts a question like, "How does that work?" Then, I'd suggest it might be a cool thing to study it out and see "How does that work!" It this case, it might be a waste of bits, but you won't know unless you study it for a little while.
If it's interesting but you can't see how it is useful (yet), then I'd suggest just looking it over, and noting what/why/how it does certain things. It might be a waste of bits now, but perhaps in the future there might come a time when you will need something that this little project gives a hint on.
Like any gift, what you would do with it is completely up to you!
I guess what I really meant was, being new to GameSalad you see all kinds of neat templates and when you see something like this, which is obviously above my skill level, it makes you wonder what it is used for.
How would an experienced GS user put this to use? An answer to that question would be much more helpful than, well, saying something like "its up to you to figure it out."
I hope this doesn't come off as sounding harsh which wasn't my intention either, I was just hoping for a better explanation.
Thanks again.
@finalcutbob is really just asking for examples as to how this can be applied in the real world in a useful way so he can better understand what it's doing when looking through the project file.
Thank you DSM. Thats exactly what I was trying to say only you put it much more eloquently.
I wasn't offended at all! I think that your question was a very fair one. And I gave an answer in a good faith effort.
Perhaps my reply sounded too philosophical? The intent was to let you off the hook if you didn't see any use for it right now. But, I also meant to imply that you might want to study it over and see how things work before it goes into the trash. (Or if you are like me these just go into a what-not folder since I can't seem to throw out anything that might have some potential some day.)
It seems that most people concentrated on the way to spawn things recursively -- and how much faster that is than any looping method to spawn things. I didn't think that would be the big deal. (Although it was kind of fun to discover that.)
For me the fun part was seeing how to get a bunch of actors to individually tie into a bunch of table cells. It would save a lot of effort.
The next most important thing (to me) was that this makes it much easier to get started with table-based games such as tetris, bejeweled, minesweeper and such. For example, many think that tetris is done with jointed tiles to make the shapes. But it is really done with tables.
There is also stuff in there on how to use floor() and ceil(), how to get and put table cell values, (and other fun stuff).
Thanks RT and thanks for the effort.
I hope to be able to repay the community someday with little gems like this one.
Lets all go have a beer! I'm buying!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Note that I've disabled the rule for @RThurman's magical Spawner Loop actor because it prevents the other loop actors from starting properly the way they're currently coded. You can of course enable the rule. I've also set game.maxIterations to 500, but you can change that to run different speed tests.
I've also labeled the loop counters on the scene and given credit (via Notes) where credit is due.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
The speed is equivalent to an Every 0 timer loop. Well, it's a little slower actually. But it's tricky to get it to work properly without missing counter values, and it slows way down at about counter=200.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User