Showcasing PHP Map generators

Started by Edward, August 22, 2015, 09:25:13 AM

Previous topic - Next topic

Edward

Hi.
Thought I'd pop in and show off some very bad algorithms. :P
After looking at the background pictures on the CW 1&2 websites, I thought I'd try my hand at trying to create random background pictures. Downside being that I'm not especially good at algorithms so I just program straight up and down. But I'd thought I'd share with you what I've gotten so far. NOTE that you may need to give the page a minute to load. Maybe you get an error or blank page, but it is just to reload...

CW1: http://www.edwardleuf.org/misc/imagery/test/cw1.php
CW2: http://www.edwardleuf.org/misc/imagery/test2/cw2.php

Also, I couldn't quite figure out a good way to make the creeper spread in CW1, so that is why there's a large lack of blue.

/Edward

Asbestos

That's pretty neat. It's all randomly generated?

Edward


knucracker

That's pretty neat...
And from the looks of it you are being a bit modest when you say "I'm not especially good at algorithms" :)

kwinse

I agree, this is quite neato.

I got a reactor in the creeper when I first tried the cw2 generator, so that might be something to safeguard in the future.

Edward

Thanks you guys.

Quote from: virgilw on August 22, 2015, 11:09:02 AM
That's pretty neat...
And from the looks of it you are being a bit modest when you say "I'm not especially good at algorithms" :)

Maybe a bit, although if I was an expert this thing would've loaded in half the time. I'm pretty sure there's a better way, but I can't think of it at the moment.

Quote from: kwinse on August 22, 2015, 12:10:28 PM
I agree, this is quite neato.

I got a reactor in the creeper when I first tried the cw2 generator, so that might be something to safeguard in the future.

True... The slight problem I'm having is that the creeper and other objects are on 2 different tables of different dimensions. I may have tried to find if they come together, but it didn't quite work.

warren

How cool. Welcome to the random creeper world stuff club. For the terrain in 1, I cannot tell if you used aggregate, diamond-square or some other random algorithm. What did you use?

Edward


warren

A brownian motion maze maker algorithm adapted to terrain generation? Impressive. It would produce an effect similar to aggregate growth.

Edward

#9
I was just thinking that if this could be optimized some more, maybe Virgil would like to replace his website background pictures with a PHP picture, giving a completely different scenario each time (or load a scenario from the library).




example

warren

I suspect you may need a bit more than just optimizations, to get that to happen. As these are images that represent the public face of his company. Possibly some control over how the random algorithms draw, for example. Or different patterns.

Edward

Aka, I need help. ;)
Or someone just takes over. The idea is planted.