トピック
受付中

World Generation?

Im creating a simple Terraria clone and its gone well so far, but ive hit a road block: World Generation. This is something i dont know how to do and i need lots of help. Its gonna be a side scroller, like terraria, not from above if that helps.
3そうだね
プレイ済み
返信[1]
親投稿
SpokFlygon FlygonKid
Sorry man I don't know how to code but I wish you luck
0そうだね
未プレイ
返信[2]
親投稿
Jacob KulcakKid4
Let's just say that's a little difficult to figure out.
0そうだね
プレイ済み
返信[3]
親投稿
MrWhich MrWhIchXD
I dont know, maybe look it up.
0そうだね
未プレイ
返信[4]
親投稿
Aaron Krondelo
Look up procedural generation.
0そうだね
プレイ済み
返信[5]
親投稿
Random guy spncrjhn
when you finish it give us the ID. please
0そうだね
プレイ済み
返信[6]
親投稿
@RandomGuy Of course I will! :D Miiverse is really the only thing motivating me to make it so far, so feed back makes me happy :)
1そうだね
プレイ済み
返信[7]
親投稿
Random guy spncrjhn
i just love terraria but i cant help i dont know much. i got this only on the 31 of august so i dont know much.
0そうだね
プレイ済み
返信[8]
親投稿
Random guy spncrjhn
ill google it.
0そうだね
プレイ済み
返信[9]
親投稿
That's fine, you can only learn if you try! That's kinda of one of the points of this project, I need to learn more about how each command works and how to use them, making algorithms and other stuff. I also need to work on finding better ways to compact and increase performance of programs as well. I am by no means good at coding :P
1そうだね
プレイ済み
返信[10]
親投稿
Random guy spncrjhn
i think i might have found a solution. i found a block called randomize. i think you can type in randomize world or something. i dont know.
0そうだね
プレイ済み
返信[11]
親投稿
Well here's the thing, I need to be able to understand and be able to completely adjust the world generation system, or else I won't be able to add stuff to the generation or fix something if an error comes up about world generation. And it would be nice to have a unique style of world generation as well. But thanks!
1そうだね
プレイ済み
返信[12]
親投稿
Random guy spncrjhn
also i need help with showing bg. i thought because you were asking world generation you would know how to show bg.
0そうだね
プレイ済み
返信[13]
親投稿
Random guy spncrjhn
sorry i dont know basic verry well
0そうだね
プレイ済み
返信[14]
親投稿
I don't have very much experience with loading BG's but I have a file on my 3DS somewhere that would have a BG load test on it. But I don't know the key sadly.
0そうだね
プレイ済み
返信[15]
親投稿
Random guy spncrjhn
if you go to the thing where you publish things, it should tell you the key if its published.
0そうだね
プレイ済み
返信[16]
親投稿
Autz sonic-HD8765
World generation is hard, depending on how advanced you want to get. If you want a simple terrain where you have only 2 types of terrain, that's pretty simple. But if you want like 30 types of terrains with caves and such, i have bad news...
0そうだね
プレイ済み
返信[17]
親投稿
Random guy spncrjhn
i have an idea. if you make different terrains and randomize where they get put.
0そうだね
プレイ済み
返信[18]
親投稿
@Random Guy well that defeats the purpose, it's supposed to be random, not hand made. @Autz Honestly I just want like a single plains-like biome with trees and go from there. Very simple.but yet I don't know how to even do that.
0そうだね
プレイ済み
返信[19]
親投稿
Random guy spncrjhn
oh. maybe you can make it generate different worlds randomly but with specific bioms.
0そうだね
プレイ済み
返信[20]
親投稿
Random guy spncrjhn
also im trying the same now. thanks for the inspiration. it might be a sequel to yours or maybe a prequel.
0そうだね
プレイ済み
返信[21]
親投稿
@Random Guy boi I don't even know how to make one biome :Y
0そうだね
プレイ済み
返信[22]
親投稿
@Random Guy Np! Looks good as well!
0そうだね
プレイ済み
返信[23]
親投稿
Random guy spncrjhn
mabe you can use the map editor. i have 9 posts left so please dont ask alot anymore today.
0そうだね
プレイ済み
返信[24]
親投稿
Random guy spncrjhn
heres plantera
0そうだね
プレイ済み
返信[25]
親投稿
Random guy spncrjhn
progress is progressing.
0そうだね
プレイ済み
返信[26]
親投稿
Aaron Krondelo
I think the general idea is to create rules which allow or deny certain aspects to be created. Meaning you will need variables to use as ID's for each specific element. (A tree, a block of dirt, grass, ect.) So, you will use RND, but then you need to use your rules to determine what can/will be placed next to it. On a grid that will be either 4 sides, or 8 including adjacent tiles.
0そうだね
プレイ済み
返信[27]
親投稿
Aaron Krondelo
That is only the very basics though, on a larger scale you likely need algorithms for larger sections. These rules will define things like: If there is a body of water, no land will be generated on top, or things like defining mountains.
0そうだね
プレイ済み
返信[28]
親投稿
Aaron Krondelo
Sorry, what I meant was for larger sections.. a better example would be biomes. Determining the rules for adjacent blocks is fairly simple, but determining rules for large sections of blocks will be much more complicated and I can't think how you would do it without algorithms that can average areas.
0そうだね
プレイ済み
返信[29]
親投稿
Aaron Krondelo
Hopefully that makes sense to you, and take my advice with a grain of salt. I've never actually studied procedural gen, that's just my presumption of how it works in general.
0そうだね
プレイ済み
返信[30]
親投稿
Yeah yeah that was kinda the area I was going for, IDs and stuff.
0そうだね
プレイ済み
返信[31]
親投稿
Random guy spncrjhn
found something out and tested it too! google ¨code to show bg.¨ one of the results should be smilebasic lesson 34 bg or something like that. click it then scrool down until you see bgput. it will give you directions from there.
0そうだね
プレイ済み
返信[32]
親投稿
Random guy spncrjhn
repeat the bgput code until your satisfied for random generation! (you might want different numbers in () )
0そうだね
プレイ済み
返信[33]
親投稿
There's no way it's only 2 lines of code 0-0 but k I'll try
1そうだね
プレイ済み
返信[34]
親投稿
So I tried it and yeah! It works, but I'll have to add a couple of things, like rules so it's not so all over the place and looks more like terrain and tree generation!
1そうだね
プレイ済み
返信[35]
親投稿
Random guy spncrjhn
you can make more of it to make more blocks.
0そうだね
プレイ済み
返信[36]
親投稿
Random guy spncrjhn
my first game is working! not finished yet though.
0そうだね
プレイ済み
返信[37]
親投稿
Instead of PRINT you can use ?
0そうだね
プレイ済み
返信[38]
親投稿
Random guy spncrjhn
even further! at the actual game now!
0そうだね
プレイ済み
返信[39]
親投稿
Random guy spncrjhn
duh! for side scrolling you zoom it in, then if you move enough to the side it scrools!
0そうだね
プレイ済み
返信[40]
親投稿
Random guy spncrjhn
how do you make rules.
0そうだね
プレイ済み
返信[41]
親投稿
Sadly that's where I stand in this as well, but I think you couldn't use RND like we are right now, we would need a controlled RND, like a RND under certain conditions and based on the conditions it would randomly generate under those circumstances. And to do that there would have to be lots of math and loops.
0そうだね
プレイ済み
返信[42]
親投稿
Aaron Krondelo
...That's what I said.
0そうだね
プレイ済み
返信[43]
親投稿
Random guy spncrjhn
i think they should have made it so that 0,0 coordinates are the bottom left corner of the screen. then we could control it better, because we could give it a limit so it isn't a mess everywhere, its just a really weird ground. if only... (-_-)
0そうだね
プレイ済み
返信[44]
親投稿
Well you can add a layering system like I did where it generates from the bottom up layer but layer until it gets to its max layer by using a FOR loop. With the layering system you'll be able to somewhat control it?? I'm still working it out.
0そうだね
プレイ済み
返信[45]
親投稿
MrWhich MrWhIchXD
Im very confused about wat anyone here is saying.
0そうだね
未プレイ
返信[46]
親投稿
That's ok you don't need to understand, we are just being confused on world generation
0そうだね
プレイ済み
返信[47]
親投稿
Random guy spncrjhn
btw, warrior, im making a btd like game. you can help me if you want. just click my face and find the discussion, you can help if you want.
0そうだね
プレイ済み
返信[48]
親投稿
Random guy spncrjhn
found something big for sidescrooling! if you have bg zoomed in theres a code called bgmove! you can make it so you can move the bg! ill make a demo to show you!
0そうだね
プレイ済み
返信[49]
親投稿
Random guy spncrjhn
sorry, the code for moving bg is bgofs.
0そうだね
プレイ済み
返信[50]
親投稿
I am aware of that. I'm working on After War for a bit until my poll on SBS gets off the home page.
0そうだね
プレイ済み
返信[51]
親投稿
Random guy spncrjhn
k
0そうだね
プレイ済み
返信[52]
親投稿
Random guy spncrjhn
THIS IS A BIG IDEA! maybe you can place bg with bgput, limiting it depending on the bg thing, then place bg for background over it on the same layer, and not put collision for the background bg!
0そうだね
プレイ済み