How genarate by Table

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
Boblifey
001 Enthusiast
 
Joined: Tue Jan 07, 2014 4:54 pm

How genarate by Table

Postby Boblifey » Sun Aug 07, 2016 11:07 pm

So I'm making a random gen game trying to have it gen by what on a selected table.

untitled ad.png
untitled ad.png (10.99 KiB) Viewed 786 times


like so.

User avatar
Shingu
001 Supporter
 
Joined: Sun Nov 22, 2015 2:50 pm

Re: How genarate by Table

Postby Shingu » Mon Aug 08, 2016 1:39 am

Interesting...
A game made basically with the normal "table system" of the engine?
Seems that the blocks of images are organized in relation with the table content...
Can you show more details?
Image
Image

User avatar
Boblifey
001 Enthusiast
 
Joined: Tue Jan 07, 2014 4:54 pm

Re: How genarate by Table

Postby Boblifey » Mon Aug 08, 2016 6:47 am

I'm trying to get the tile-set event create the that table at once instead of making tons of scripts. Like one of the rooms.

User avatar
Gamerdude
001 Support
 
Joined: Wed Dec 12, 2007 8:56 pm
Location: Australia

Re: How genarate by Table

Postby Gamerdude » Mon Aug 08, 2016 7:00 am

Easiest way I can think of is setting up nested Numeric Loop events. The first will iterate through the X tiles, and the second will iterate through the Y tiles. Starting at 1 and ending at the number of tiles across/down. For each loop, check what the table value is using the loop variables. If the value is say 1, change tile at (X * 32, Y * 32) to whatever the corresponding tile is for that value.

Super brief explanation, but that's the gist of it.
Image
Image

User avatar
Boblifey
001 Enthusiast
 
Joined: Tue Jan 07, 2014 4:54 pm

Re: How genarate by Table

Postby Boblifey » Mon Aug 08, 2016 9:19 am

Now that's a brilliant idea I try this metiod by add I never thought of multiplacation before I give that a shot.

User avatar
Gamerdude
001 Support
 
Joined: Wed Dec 12, 2007 8:56 pm
Location: Australia

Re: How genarate by Table

Postby Gamerdude » Mon Aug 08, 2016 10:32 am

The multiplication is to translate the tile number to its X/Y location in pixels. I'm not sure how the Change Tile event works - if you need to input the tile number or its pixel coordinates.
Image
Image

User avatar
Shingu
001 Supporter
 
Joined: Sun Nov 22, 2015 2:50 pm

Re: How genarate by Table

Postby Shingu » Mon Aug 08, 2016 11:20 am

Boblifey wrote:Now that's a brilliant idea I try this metiod by add I never thought of multiplacation before I give that a shot.

"Loops" in the system to verify the content of "tables" automatically, to the system make a thing if the result is positive in each part, is very userfull...
This decrease the size of the script, and the number of needed actions to the writer...
In some cases this is valid to other systems also.
Image
Image

User avatar
Mr.Numbers
001 Support
 
Joined: Wed Feb 28, 2007 1:50 am
Location: Alberta, Canada

Re: How genarate by Table

Postby Mr.Numbers » Tue Aug 09, 2016 10:33 pm

You could also use the "Loop Table" event no?
Image
I AM THE ALL MIGHTY SCRIPTING MASTER
Please do not PM me with Engine 001 related questions, rather post on the forums. ;)

User avatar
Gamerdude
001 Support
 
Joined: Wed Dec 12, 2007 8:56 pm
Location: Australia

Re: How genarate by Table

Postby Gamerdude » Tue Aug 09, 2016 10:59 pm

Probably. I haven't used it before.
Image
Image

User avatar
Shingu
001 Supporter
 
Joined: Sun Nov 22, 2015 2:50 pm

Re: How genarate by Table

Postby Shingu » Wed Aug 10, 2016 2:48 am

Mr.Numbers wrote:You could also use the "Loop Table" event no?

Maybe this "Loop Table" have some utility...
I have used "Variables" combination to "Tables".
This example is based in a table with size: X=5 Y=5 Z=1
In a "table" with greater size, the size of the script is the same :D
Image
Image


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron