Tile based "digging" games

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply
Author
1,355 Rep
Post Options Post Options   Quote ShabbyCat Quote  Post ReplyReply Direct Link To This Post Topic: Tile based "digging" games
    Posted: 28 Sep 2011 at 1:34pm
Many of you have probably seen games like terraria for example where the terrain seems to be made up of tiles that you can dig out.

I was wondering what the theory behind the creation is?

Are the tiles little sprites that you spread all over the screen?

I'm gathering you wouldn't paint them by hand and that you would generate them some how? I guess this would involve setting an upper limit (so you have a horizon) and then getthing it to fill in the test with sprites and adding a random function somewhere to pick different types of sprites.

Is that sounding like a sane path to take?
Any options or examples welcome.
Back to Top
1,338 Rep
Post Options Post Options   Quote Dabbijo Quote  Post ReplyReply Direct Link To This Post Posted: 28 Sep 2011 at 4:17pm
Would like to know this as well.
Back to Top

Moderator
28,496 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 28 Sep 2011 at 4:35pm
For a start of an answer check this post out
There are also other examples of tiling/grid in the "how do I" section, make sure to do a quick search if you need more.
Back to Top
19,047 Rep
Post Options Post Options   Quote sqiddster Quote  Post ReplyReply Direct Link To This Post Posted: 28 Sep 2011 at 10:32pm
I'm guessing the world is a huge array - you need to know how they work before undertaking a project like this.
Back to Top
1,355 Rep
Post Options Post Options   Quote ShabbyCat Quote  Post ReplyReply Direct Link To This Post Posted: 29 Sep 2011 at 12:13am
Very nice so one method is to store the differing tile images as animations as use something like int(Random(0,Sprite.AnimationFrameCount)) to pick a random animation. That's cool. If you wanted to "tile" around something. E.g. bury a diamond in the dirt I guess you could overlap the diamond at a particular position on another layer then when you grab it you could destroy all the overlapping tiles so you have a hole where it was dug out?
Back to Top
2,033 Rep
Post Options Post Options   Quote valdarko Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jan 2012 at 10:10am
well, this is a old post but i think ppl still wanting to learn about ways to make building/block/digging kind games (including me), so i'v made a search on the internet and found this site here:

auto-tiling

and here:
Minor78 - Level Editor

that explain the basic behind auto tiling, but i'm still learning how to use things and i cant find a basic tutorial of how to make a level editor with construct. I hope this help and if you guys find some good basic tutorial of autotiling/level editor for platformer using Construct, pls let me know too

Edited by valdarko - 11 Jan 2012 at 10:20am
Back to Top
11,754 Rep
Post Options Post Options   Quote Yann Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jan 2012 at 10:40am
I also may add that for awesomely big world, you could use random seed.

The idea behind that is that all number returned by this kind of random() function would always take your seed number at a start and return every time the same numbers.
Because you might not now it but a random doesn't really exists in a computer world. Random() function are series. You take a starting number and then always apply the same operation to have the next pseudorandom number.
Well now that I've explained that for those who didn't know.
If you apply the same random operation for creating your big world, you can understand now that if you have the same serie of randome number you'll generate the same exact world.

Then basically you could store an entire world in one single number (and I believe it's how minecraft works). Then you just have to store what has been modified in this world. Which would be far less than the big world.
The only downside is that generating the world, if it's a really big one, could take some time.
But there's some ways to split your big world in tiny ones (that's the purpose of Arsonide's gridTree plugin for Construct Classic) to avoid this overhead (also minecraft might use something like that).

That's all (:

Edited by Yann - 11 Jan 2012 at 10:41am
Back to Top
2,033 Rep
Post Options Post Options   Quote valdarko Quote  Post ReplyReply Direct Link To This Post Posted: 19 Jan 2012 at 2:51am
some dude make a aproach with this kind of game here:
http://www.scirra.com/forum/planet-mogma_topic47579.html
Back to Top
2,041 Rep
Post Options Post Options   Quote mystazsea Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2012 at 4:53pm
Terraria you say..yes excellent game but Ummmm....
What about "Cortex Command"..Sheer Genius..A Brilliant Indy game... 11 years in the making...

The only way I can think how they did it was with an Procedurally generated Pixel Array of Truly EPIC Dimensions

well worth a look...if you can figure how they made that and give me that code ..I'll buy you a Lamborghini ....A phat red one



http://www.datarealms.com/games.php
This is the stone of poor and little price,
spurned by the fool but honored by the wise...
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down