Shoppa Map Generation Script

6 replies [Last post]
mikade
mikade's picture
User offline. Last seen 15 weeks 9 hours ago. Offline
Joined: 2010-10-22
Posts: 355

... or whatever it is called. Big Grin

So, in case you didn't know there is a really cool script in the DLC that generates a random shoppa map. I've been playing it quite a bit over the last few days and have gradually fallen in love with it. But, I think there are still some things that could be better, and I'm interested in what other people think, so I made this as a generic feedback thread.

nemo: I tried to bug you on IRC but my connection is really fail and not really conducive to idling on IRC at the moment. I have a bunch of suggestions, some of which I could probably implement myself, but well, I am a messy coder so I thought maybe you would prefer for me to list my suggestions here and then implement 'em yourself? What are your thoughts?

mikade
Hedgewars Developer

Kootooloo
Kootooloo's picture
User offline. Last seen 4 weeks 1 day ago. Offline
Joined: 2012-10-14
Posts: 27

I like that script. Most current image shoppa maps are very good, but with time they turn quite boring. The attitude some people have towards always playing the same map (won't say player names but *cough*Ropes*cough) irks me.

I haven't got much in the ideas area but maybe give a toggle-able option for a WxW option.

Always up for a The Specialists game, just ask me in Hedgewars.

nemo
nemo's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2009-01-28
Posts: 1861

Hey. Thanks for the compliments!

I'd not been interested in lua too much until mikade started experimenting w/ land drawing which required fixing ParseCommand (thus drawing is really only 0.9.18+ compatible)

Result was https://code.google.com/p/hedgewars/wiki/LuaDrawing

And my grand total of 3 lua scripts so far. The sample ones in that wiki entry, Tunnels and ShoppaMap (well, there was an experiment in fractal map generation, but results took too much CPU and weren't interesting enough).

You guys are totally welcome to change it as you like. Suggestions welcome too.

The script is a little messy, but I tried to provide a bunch of parameters to shape generation, so you could pull them into other scripts.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

mikade
mikade's picture
User offline. Last seen 15 weeks 9 hours ago. Offline
Joined: 2010-10-22
Posts: 355

Cool, thanks. I still haven't read the script toooo carefully, but after a little bit of derping around I used your functions to add orb clusters that generate with either 3,4, or 6 orbs. I also changed it so that the vertical lines sometimes terminate in a star instead of a circle. Probably could be better done, though.

As far as suggestions go, I think a basic draw rectangle thing (forgive me if this is beyond obvious) could be good. You could use that in combination with the other shapes to make some new ones that are still missing (see the 3 shapes below).

Apart from that, right angle triangles would also be nice.

I noticed your trianglularesque objects (like the ones on Ropes) generally generate at the bottom. Following that line of height-based generation, it could be cool to add "walls". Currently you don't need to climb much. But if you added a chance for it to generate a long line, nearly spanning the entire map's height but with a little hole in it, that would be good. They would generally spawns near to one of map borders (as seen in maps like shoppahell, shoppaneon, etc).

Aaaand lastly. While the script currently generates a sort of object-based island map (which is my favorite kind of shoppa map <3 <3 ) the truth is that most shoppa maps tend to have a floor. It would be a nice addition if it randomizes so that sometimes you get an islands map, and other times you get a floor map, where there would be a large rectangle constituting the floor across the bottom. In that rectangle you could add a couple of holes go down to water, and paint with some bumps, circles, rectangles etc. on top of it to make it non-uniform.

mikade
Hedgewars Developer

Wuzzy
Wuzzy's picture
User offline. Last seen 3 weeks 3 days ago. Offline
Joined: 2012-06-20
Posts: 1301

Interesting.

It would be nice if this map generation method would appear in the random maps drop-down box and you actually could see the preview of the map, rather than a "game mode". It doesn’t make any sense to me to register a terrain generation as a game mode. The bad thing about it is: if you do it this way, you can’t have a Lua scripted random generated map if you want to play an actual game mode, let’s say, The Specialists. You have to either pick the Lua-generated terrain script or The Specialists, it is not possible to have both.

The Lua map-generators definitely need a special treating by the engine, otherwise it will just lead to annoying problems.

Hi, I am a Hedgewars developer. Smile

nemo
nemo's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2009-01-28
Posts: 1861

Whew. Long list of suggestions. Ummm. We'll see...
Patches welcome? Wink Smiley

As for floor, the reason I didn't add one was that I felt it was adequately served by enabling the floor in scheme settings.
Provided more flexibility for player to turn floor on on demand (and walls too ofc).

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

nemo
nemo's picture
User offline. Last seen 3 weeks 1 day ago. Offline
Joined: 2009-01-28
Posts: 1861

WRT Wuzzy's complaint.
Eh... Doesn't seem like a big deal to me. If someone wants to pull this map into highlander to play highlander on it (god knows why), doing so is pretty trivial.

Implementing it in engine has been brought up. In fact, before this script was even created. It just seemed like a quick and easy way to play around w/ it, and figure out if it was worth doing in-engine.

It is clear the script has value even if you have to import it into another lua script to play the other lua script on it, or else people wouldn't be talking about it :-p

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]