Terraria Clone

Show us your works in progress and request feedback

Post » Mon Dec 08, 2014 3:10 pm

@VictoryX @lolpaca Thanks for going into detail in this post it helped me alot, One thing i dont see here is how to make hills or natural type of terrain using the array.

Im using the procedual method you have shown here but i can not seem to make anything other than flat ground like your demo.

Would you happen to know how to make some kind of random terrain elevation through arrays? If so it would be pretty epic to know.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Dec 21, 2014 7:21 pm

I never did come about a good way to generate hills or cliffs. It was always just a flat top like in the demo. If you come across a good idea on how to do it please post it.
Image
B
45
S
17
G
2
Posts: 201
Reputation: 4,501

Post » Sun Dec 21, 2014 9:24 pm

@VictoryX
I made a capx with a lot of different approaches here:
how-can-i-make-hills-within-my-world-generation-array_p862291?#p862291
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Tue Dec 23, 2014 9:21 pm

@VictoryX

In my game Teleblob i went for using the Tilemap object for the terain and after loads of thinking and trying i kind of perfected the use of it "with mining in mind".
You can see a glimpse of it in this vid http://www.youtube.com/watch?v=Yo-iDE6MTIo&feature=youtu.be
The nice thing is that the Tilemap setup i use is 8000 x 8000 and it can easily be bigger, but because my game is Online Multiplayer i kept it this large.
But 8000 x 8000 is still pretty large.
The most difficult thing with the tilemap was that i could not use a array to store all tile data.
What i did was use the tilemap image blocks as animations.
Lets say the tilamap image uses 15 tiles of the same rock, but each a little further destroyed.
Then when mining, i set (estimated) after 0.3 seconds the tile one number further down.

From Tile - To Tile (takes 0.3)
Tile 15 = 100% block
Tile 14 = 90 % block
Tile 13 = 80 % block
Tile 12 = 70 % block
Tile 11 = 60 % block
Tile 10 = 50 % block

Etc

This enables the animations of the blocks while using the Tilemap.
The time it takes to destroy them from 100% to 0% = 0.3 seconds x the amount of tile images used. (seconds can be altered per block)
Especialy for online games this is neat, because it keeps the cpu low so more frames are left over for multiplayer data to be send.
Hope it makes a little sence what i did.
(I tested a map of 8000x8000 sprites and it was killing.)
With this i easily get 60 fps on my pc.
B
59
S
21
G
14
Posts: 779
Reputation: 13,927

Post » Wed Dec 24, 2014 10:11 pm

@VictoryX can you show me how to generate such content as underground randomly? Maybe pm me with some sample "code" ?
B
6
Posts: 34
Reputation: 312

Post » Wed Dec 24, 2014 10:11 pm

oh forgot to mention that i like the idea and the game is working fine for me (chrome on windows)
B
6
Posts: 34
Reputation: 312

Post » Tue Jan 06, 2015 4:13 pm

Awesome. It took me a while to realize how to dig :D
B
8
S
1
Posts: 26
Reputation: 498

Previous

Return to Works in Progress/Feedback Requests

Who is online

Users browsing this forum: MushroomKingdomr and 0 guests