This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-10-12 22:53:17

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

How to log the block positions...

In this game, http://scratch.mit.edu/projects/rabbit1131/2048916

When terrain generates, I want to log what each block value is, and whenever a change is made, log that change. So this way I can create other dimensions, but when you come back the world is the same.


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#2 2011-10-12 23:11:47

schnrfl
Scratcher
Registered: 2011-10-11
Posts: 500+

Re: How to log the block positions...

Use a list? If your height is, say, 50 blocks, use 1-50 for the first column IDs, 51-100 for the second column IDs, etc. You can write a simple algorithm that converts x and y into a number in the list.


opposable thumbs • ubc • dvorak • help
sprach eˣius//Foresson

Offline

 

#3 2011-10-12 23:23:43

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: How to log the block positions...

uhh
use lists, or like those 2d array things that i saw on the scratch wiki


Posts: 20000 - Show all posts

Offline

 

#4 2011-10-13 09:04:48

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: How to log the block positions...

schnrfl wrote:

Use a list? If your height is, say, 50 blocks, use 1-50 for the first column IDs, 51-100 for the second column IDs, etc. You can write a simple algorithm that converts x and y into a number in the list.

I'll try that..


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

Board footer