Random World

For questions about using Classic.

Post » Fri Feb 27, 2009 12:43 pm

Hello. First off, I would just like to state how much of an amazing utility Construct appears to be. After many false starts at creating a game (from my chosen utility being either too complex to learn or too simplistic in functionality), I have finally have settled on Construct, which seems to be just right. Anyway, enough lauds. What I am trying to create (an RPG-type game) requires the generation of a random world, and I'm wondering: how would I go about implementing this using Construct?
B
1
G
3
Posts: 5
Reputation: 835

Post » Fri Feb 27, 2009 1:21 pm

If you have any programming skills, you could develop a plugin for random world building and such. Or you could just build a whole sheet of mind-boggling logic that does the same and then eventually - when that is supported - copy the sheet between projects.

In short, yes, it is very much viable!
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Feb 27, 2009 1:22 pm

Just use the random() expression. I guess a basic place to start would be, for example, to repeat 100 times an event that places a tree at a random X/Y co-ordinate, and so on.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Fri Feb 27, 2009 1:46 pm

Yeah random works well for this you could set the random to random (50) for x, and random (10) for y.
That would get you a row of random objects, or random(300) +50 for x, and random (300) +10, for another row in another spot.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Feb 27, 2009 8:02 pm

I see. So random() is my best bet... or making a plugin of my own?
B
1
G
3
Posts: 5
Reputation: 835

Post » Fri Feb 27, 2009 8:04 pm

Well, you have to define the rules (on the paper), then try to figure out how to transform them into events. Yes, you can use Random(), you can control it too if you use dungeon building rules (i.e. room sizes, overlapping etc.).

Look at other dungeon generating algorithms for examples.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Feb 28, 2009 12:43 am

you dont need a plugin at all for this, just think about it, i believe newt had made an example of this somewhere

i dont suggest starting a huge rpg as your first project, maybe just make a single area, with items and a few attacks, to learn construct.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Feb 28, 2009 1:16 am

Yeah for procedural dungeon creation, basic one is dig a hole, pick a wall, dig out that wall, pick another wall, if nothings on the other side dig out that wall.

If it were possible to get color info you could just create an image and use that as a map.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat Feb 28, 2009 1:44 am

I see. That sounds easy enough (sort of). Where would I be able to find this example that you speak of?
B
1
G
3
Posts: 5
Reputation: 835

Post » Sat Feb 28, 2009 6:06 am

Research "roguelikes" for plenty of dungeon generation examples ;)
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests