Tile based "digging" games

Get help using Construct 2

Post » Sat Aug 10, 2013 6:42 pm

@HPA97 even though this thread is ancient, it still got me curious. You say it's randomly erased. Does that mean that beside the ores you made the rest by hand?
B
9
S
1
G
2
Posts: 59
Reputation: 874

Post » Sat Aug 10, 2013 11:26 pm

@HPA97 i would love to know how you made it generate without using arrays,Im making a sandbox game similar to growtopia.
GMO FOOD = DEATH
B
19
S
6
G
4
Posts: 524
Reputation: 5,356

Post » Sun Aug 11, 2013 11:22 am

@Hoyer It's random erased. Everytime you load the game, you get a random map, with random ore placed. So it's somehow the same outcome as an array random generator, just ALOT easier!
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Sun Aug 11, 2013 11:57 am

@RookieDev The trick is to make your tiles all over the map, except at the top (because you want some surface) http://i.imgur.com/dinYKeO.png Then you add "Erasers"(Which i like to call them) http://i.imgur.com/WKsx1aM.jpg Which are the pink/purple circles or whatever you wanna colour them just make sure they are invicible during game. Then you make each of them individual so they don't erase in the same pattern. After that, you goto your event sheet, and make a global variable which you may call "RandomGen", just give it variable = 0.
Make a group, which you may call "ERASERTOTAL" And inside you make more Groups (Depending on how many eraser you have. http://i.imgur.com/92nBeaD.png. I for an instance has 6 to begin with, but i only use 3 of them + an extra eraser.
Do: System Every Tick -> System Set RandomGen to = round(random(0,7))
Inside your Eraser group:
(Make sure your eraser has "Bullet" behaviour.
Do: System Check Variable = 0 -> ERASER1 Set angle + degrees
Do: System Check Variable = 1 -> ERASER1 Set angle + degrees
Do: System Check Variable = 2 -> ERASER1 Set angle + degrees
Do: System Check Variable = 3 -> ERASER1 Set angle + degrees
Do: System Check Variable = 4 -> ERASER1 Set angle + degrees
Do: System Check Variable = 5 -> ERASER1 Set angle + degrees
Do: System Check Variable = 6 -> ERASER1 Set angle + degrees
Do: System Check Variable = 7 -> ERASER1 Set angle + degrees

Do: On start of layout -> System (for example) Wait 5 seconds
                          ERASER1 Set Bullet speed to 400
                          ERASER1 Set scale to 0.5
                          Wait 15 seconds
                          ERASER1 Destroy

(You could do anything you want for that one, but i did it like this to make it a bit more random and make the terrain look abit more nice)

Now do the same for all of your Erasers.
!!REMEMBER TO CHANGE Which "RandomGen" number that active certain angle for each of your erasers or else they will all do the same erasing!!

To make it even more random:

http://i.imgur.com/ikDLPkq.png

Instead of making a new global variable for that one, you could just use the "RandomGen" global variable.

At the beginning of the layout, you don't want to show the players how the map is generated, so make sure the tiles and erasers are invicible at the bery beginning.

Make a group called (for example): "GenerateInfo"
Create "Text" which you may call "LoadInfo"
Inside it will look like this. http://i.imgur.com/wcHHJIQ.png
Every 1 second you set "Generating: (add 5%)"
Do this 20 times, at the end you make "LoadInfo" Set Invicible.
At the picture you can see that i did chagne something, and added an another second, but that is bcause i have some delays with the erasers and random ore placing.

Now for the Ore's
http://i.imgur.com/NmRcRN1.png
You make theese pink circles, which will be spawned random all over the map at the end of the generating process (Make sure the map is finished erased before making the Ore gen appear).
Make sure you give the dirt/stone.etc(tiles you wanna replace with ores...) an variable. (ID=0)
Whenever an Ore is above a tile, the tile will change ID. (For example) DirtID = 0. "Random CoalGen appear" DirtID = 1 (Which will turn the Dirt to a coal ore. and you can watch the picture to see how it's made.

That is mostly it, but you also want the dirt on surface to become grass.

Make spawners at the whole top layer of the map, which spawns "Seeds" At all time. Whenever a seed hit the dirt, the seed destroy itself, and the grass change ID to a grass ID.

You also need to make sure the map get visible after the generating, you need to time the Seconds needed to generate the map, which you also need to put dealys on the LoadInfo! I hope this rough tutorials made some sense, in worst case i could make my capx downloadable, but id like to have it myself, becuase i plan to upload it to scirra arcade soon ;)
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Mon Aug 12, 2013 8:33 am

Thanks For Being so detailed about how you made that happen,I will study this,I think your method will come in handy in the future.Thank you @HPA97
I seen your youtube channel you should do more Construct2 Videos man this is the future and alot of people need help.Thanks!
GMO FOOD = DEATH
B
19
S
6
G
4
Posts: 524
Reputation: 5,356

Post » Mon Aug 12, 2013 12:32 pm

@RookieDev
Glad to hear :) I will post more construct when i get my new computer ;) I also works on an another project which i may also post some videoes about! But i am not sure if i can post them while speaking english, because my english kinda sucks, but i might try.
B
9
S
2
Posts: 41
Reputation: 1,756

Post » Wed Aug 14, 2013 6:29 pm

You have some good english @HPA97 its good enough for me to understand and im american.
Great vids and once again thank you for helping me out
GMO FOOD = DEATH
B
19
S
6
G
4
Posts: 524
Reputation: 5,356

Post » Mon Jan 20, 2014 2:06 am

@mystazsea HAHA. No lie, every forum i have been in today you have been in being a sarcastic douchebag sounding like you get off from other people not knowing what you know. Chill out dude a lot of these people here are here because they don't have much knowledge of making video games and they come here to get true answers from people and you have to put your useless opinion in. stop being sarcastic for one minute man and let these people learn. wouldn't you rather spread your game making knowledge and be known on here for that rather then for being a Douche that no one likes? you sound ridiculous ON EVERY FOURM!!! you have not put out one shred of usable info that i have seen.......
B
5
Posts: 8
Reputation: 318

Post » Mon Jan 20, 2014 2:23 am

@HPA97 I don't want to be rude so please don't be offended but I think
You choose very long and hard way for doing what you are doing. After examining your images I think you should first learn some more "How To" about C2 before starting this kind of project.
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Wed Jan 22, 2014 4:52 am

*spanks monkey to NNG's Avatar*


aaaahhhhhhhhhh
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
30
S
11
G
8
Posts: 313
Reputation: 7,360

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: farfetchd83, makkancs and 25 guests