New to Scratch, I learned how to use lists by reading the code for this project - then did something similar with Scenery Generator: http://scratch.mit.edu/users/dunmovin ... Thanks
This is difficult for your age Fionan. But here is something you can do: hide the detail and ruggedness variables, then import your helicopter sprite. You'll have the start of a game on a mountain drawn using this technique.
Because the pattern keeps repeating itself, indefinitely, at a smaller and smaller scale. So the calculation you see at the beginning is the same one that is applied at the end, at a smaller scale. A possible improvement of the terrain generation is to allow a zoom, and keep applying the same algorithm every time you zoom in...
That's the hard bit. But some ideas: 1) Set a low level of detail to calculate fast 2) Display new terrain at very low detail at first, then more finely when the character moves there 3) Use every opportunity to speed up the calculation
I've always been fascinated with fractals! The calculation is just so amazing.... It never ends! I also love fractal artwork. If you haven't seen any yet, I would highly reccomend looking at some!
Join the party! Actually, featuring is down to luck. Another day this project would have been completely ignored, but the guy who was doing the next world-wowing RPG on scratch slipped on a banana skin and broke his big toe instead :-)
Lovely to see you here - that's a *lot* of guns on your site!
A program like this is a lot of work. I'll have to try drawing trees, waves, clouds using the same technique
Probably because it's not as exciting as a game. I must say I wasn't expecting to be featured! Thanks to whoever put this forward.
The project is written for other people to use in their games.
Just wondered if you had completed any projects for scratch that can translate ACTUAL geographical and or geological data into a cross section or three dimensional view?
I was thinking about it... scratch earth :-)
The Math would be OK - translate lat and long of a dot on Earth to a dot on screen, and maybe a line (great circle) routine - but then entering data, like an outline of continents, by hand in Scratch, that would be a labour of love - hundreds of points in two Scratch arrays, ughh...
Stop press - as it is featured: this project is made for remixing. Use it in a game of your own!
Once again, a technique for anybody to pick up: this is an algorithm for randomly generating a realistic terrain.
How it works: first, it chooses a height at both ends, for example, -100 and +200.
Then the height in the middle would be 50 (the average). Instead it changes that height randomly, let's say to 0. We see a line broken in two.
The first half of the broken line, its middle is at height -50. The generator changes that, randomly, by a few pixels - to -30 let's say.
The second half of the broken line was between 0 and 200. The normal height would be 100; change that randomly to 130.
Now the line is broken in four pieces, giving an overall irregular shape - bu not too irregular. To make it in more detail, we can break the sections in the middle again, giving 8 parts, and break it again, in 16 parts, etc. The algorithm repeats the same pattern as the level of detail increases: it is fractal.
The "ruggedness" decides the range for picking up the height of the terrain. If it is set to 200, the heights are picked between -200 and +200 at first. At the next level of detail, the height is changed by somewhere between -100 to +100, at the next level changed by between -50 to +50, etc.
The calculation takes time - this is scratch! You can change how much detail to calculate, and less detail is quicker.
Comments
You need to be logged in to post comments
Add a Comment
Great! I'm thinking of using it in one of my projects!
Very realistic looking!
Wow forest sure is good at picking projects!!!!
nice!
Nice project & usefull...
that is pretty cool!
interesting
I will logout right now.
oh wow
Nice! I made something like this but it didn't draw terrain as well.
New to Scratch, I learned how to use lists by reading the code for this project - then did something similar with Scenery Generator: http://scratch.mit.edu/users/dunmovin ... Thanks
Thanks! If you use other languages than scratch look at linked lists. Or ArrayLists (in Java).
excellent
All your projects are wonderful and helpful, are you on the scratch team?
No but I teach programming with Scratch. I try to go for fundamental things - maths, algorithms, etc. I have two colleagues that make games instead.
nice
so i could help him with his projects
hello
niccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccce
Cool!
cool
this is really good.!
cool concept and goo programming. good job:) it's an exellent base for remixing.
Thanks. I was looking at your projects - you might find my 3D stuff useful: (link to project)
(view all replies)plz come and look and play my stuff because im looking at urs and if u do say u will and ill love ur project (and plz coment my projects)
Use the forums! There's a special "show and tell" space just for that.
cool!!!!!
I don't get it! Is it for secondary school because I'm ten!
Thanks! My brother told be as well. I really only glanced at it but I understand it now.
This is difficult for your age Fionan. But here is something you can do: hide the detail and ruggedness variables, then import your helicopter sprite. You'll have the start of a game on a mountain drawn using this technique.
(view all replies)I'm ten.It's simple.However I have the brain of a 15 year old.I was tested.
(view all replies)how is it a fractal? i am very interested in this.
Because the pattern keeps repeating itself, indefinitely, at a smaller and smaller scale. So the calculation you see at the beginning is the same one that is applied at the end, at a smaller scale. A possible improvement of the terrain generation is to allow a zoom, and keep applying the same algorithm every time you zoom in...
(view all replies)Love it!!
nice job
you are a genius.
Cool, 330th view! How's that? WOO! By the way, awesome video.
Man 1 say: WOW Man 2 not here
spread the word and the buttter
lol i just took an IQ test and scroed 107 and i still don't understand this
My IQ is 147 and I get this simply.It uses a pen and gos up and down randomly.
(view all replies)nice
AWSOME AND IM THE 244TH VIEW WOW
cool progect but i wonder if anyone could make one with scrollex
That's the hard bit. But some ideas: 1) Set a low level of detail to calculate fast 2) Display new terrain at very low detail at first, then more finely when the character moves there 3) Use every opportunity to speed up the calculation
Pretty cool and very creative!
pretty cool
^^ Nice work!
I've always been fascinated with fractals! The calculation is just so amazing.... It never ends! I also love fractal artwork. If you haven't seen any yet, I would highly reccomend looking at some!
terrain ruggedness=0 terrain detail=10
You end up with a very slow STRAIGHT LINE!!!!!!
(view all replies)I like how carefully it draws that straight line. Over and over again...
(view all replies)LOL!
COOL!
Cool!
Awessome!
Agh, I made my own version similar to this about half a year ago that I could have put on and got featured. Haha.
Join the party! Actually, featuring is down to luck. Another day this project would have been completely ignored, but the guy who was doing the next world-wowing RPG on scratch slipped on a banana skin and broke his big toe instead :-)
(view all replies)Hi your my scratch teacher at wicklewood school!!!
Lovely to see you here - that's a *lot* of guns on your site! A program like this is a lot of work. I'll have to try drawing trees, waves, clouds using the same technique
(view all replies)ehr... great? really, gt a life
Ah, euphemised critisism, that's what you behold!
kinda agreed, it's different, it's unique, it's hard to make, but most of all BORING!
(view all replies)Very clever. It's featured!!! Congratulations!
Cool as!
Unfortunatly for me it almost always goes to the bottom of the screen
Hit the green flag and it will start a new terrain. It's always random, so you'll get lucky and find a good one eventually.
i do not see how this can be on the front page
It's a useful technique that could be handy in any game that needed random terrain.
Probably because it's not as exciting as a game. I must say I wasn't expecting to be featured! Thanks to whoever put this forward. The project is written for other people to use in their games.
sweet!
It's a great use of fractals - nice!
Thanks - I had to catch up with you :-)
I download!
Very, very nice!
Pretty nice - I already see people using this. Nice way of "calculating" the terrain, too.
This is very cool...I love to watch the iterations!
Just wondered if you had completed any projects for scratch that can translate ACTUAL geographical and or geological data into a cross section or three dimensional view?
I was thinking about it... scratch earth :-) The Math would be OK - translate lat and long of a dot on Earth to a dot on screen, and maybe a line (great circle) routine - but then entering data, like an outline of continents, by hand in Scratch, that would be a labour of love - hundreds of points in two Scratch arrays, ughh...
(view all replies)I don't understand it, but it's a clever use of Scratch. Nice job =]