dumb lua testing map

Discuss map ideas, techniques, and give help.
Post Reply
User avatar
RyokoTK
Vidmaster
Posts: 4161
Joined: Mar 7th '06, 07:04
Location: Saint Paul, MN

The idea came to my head at one point that I wanted to make a large map in the style of Metroid Prime, or other metroidvanias -- a large, nonlinear map where progress is gated by collecting powerups and equipment and you backtrack a lot. This is not something Aleph One is inherently suited to for a lot of reasons, but with Lua it turns out you can crowbar a lot of that functionality into the game. So I did it on a test map (or, more correctly, twelve test maps), and here it is.

Warning: the map itself is garbage, it's just a test for the Lua ideas, so it looks like crap and flows poorly, but it shows off a lot of Lua concepts that I didn't know were possible and didn't know I could write myself (thanks to Wrkncacnter for walking me through a bit of it, but less than I thought I needed).

Here it is.

There are a lot of things going on that I'm going to explain:

* Multiple maps stitched together
The idea of a metroidvania is that it's usually one large persistent level, rather than discrete maps. Marathon doesn't do this, but you can have level transitions occur. With Lua I'm able to manipulate your starting point, and retain the direction you were facing and your x/y/z position in the polygon (since I clone the area in the transition from one map to another). The transition is seamless!

Actually the transition is really bad, because there is a momentary delay before the level transition. I think this is because there's half a second dedicated to the teleport out effect. With MML you can suppress these teleport effects, but then the game just makes you stand there like a clown for a brief moment. Also, the MML for suppressing teleporting *IN* to a new map doesn't actually fully work. So I use a fade-to-black fader to... sort of conceal the jankiness.

The other problem with this is that Aleph One will essentially fail to load a map if you transition 15 times in a single session (i.e. without dying or quitting and reloading). To mitigate this I have the game autosave immediately when you enter a map. This also made it easier to restore variable states when loading from a save, so there are no pattern buffers, just autosaves.

* Persistent map states
Default Marathon map behavior does not preserve the state of a map if you leave it and then return to it later. Think of the backwards loop in Electric Sheep Three: you have to replay all of those levels again, from scratch. With Lua and a lot of creative use of variables and tables, you can assign a bunch of variables when you do certain things in a map (such as kill enemies, hit switches, pick up items), save those variables when you leave the map, and then read those variables when you re-enter it and apply the states that I want from it. This one actually worked pretty well for the most part, with some... creativity: I can shoot some wires to activate a platform, leave the map, then come back and now the wires are "still" broken and the platform is "still" active.

When you pick up (most) items, it marks a variable and then suppresses it later (by moving it to a garbage disconnected polygon). Enemy spawns are suppressed if you exterminate all of them in a map. Some enemies will respawn after a few transitions, but most will not. I'm able to use basic monster flags (blind/deaf) to sort them out into various groups that I want to spawn or suppress based on, well, whatever I like. There are also a couple instances where a variable marked in one map enables enemies to spawn in a different map. Discovered automap polygons remain discovered if you leave and return, but it looks kind of weird since of course you can only see the map you're on and not the other map that's a few feet away.

* Progression-granting powerups
The regular powerups are replaced with permanent powerups that grant you progression. There's one that grants jumping, one that grants somewhat controlled teleports, and a couple of others. Maps with lava in there are "heated" and damage you while you're in them until you find the environment suit to let you survive the convection (swimming in the lava still hurts). Metroid-style progression allows you to take those powerups and backtrack to make progress elsewhere in the complex.

Rather than regular ammo pickups, there are items that increase your maximum ammo. The nice thing is that with a combination of Lua and MML I can circumvent the Total Carnage ammo delimiter. There is a room with a polygon that refills your ammo and HP to maximum, based on whatever these maximums are. There are also items to increase your max HP. By pressing the automap key you can see your current maximums at the top of the screen.

Enemies also have a chance of dropping partial health pickups or single ammo supplies. It will only do this if you need them, so if you have max fusion ammo, none will drop. These pickups do not persist between map loads (like traditional pickups in old games, this simulates them fading away over time). You cannot exceed your maximums with these pickups. Picking up a partial health or a max HP item heals you in a nice smooth gradient too.

Anyway, check it out if you want to see some dumb Lua stuff incorporated into a single player map. I might (but, realistically, probably won't) leverage all of this into a real mini-scenario; this is probably 25-30 hours of work into getting the scripts to scale nicely as I added content and have as much generalized code as possible so expanding it into a proper project would be really easy, and getting a variety of ideas established to make a cool map.
User avatar
The Man
Vidmaster
Posts: 1203
Joined: Aug 6th '08, 05:23
Location: Sarasota, FL
Contact:

RyokoTK wrote:Aleph One will essentially fail to load a map if you transition 15 times in a single session (i.e. without dying or quitting and reloading)
Oh, so that’s why Chronicles freezes every time I start at the beginning and play through “Men Like Ravenous Fishes”! Learn something new every day. Is there a plan to fix that? I’d like to be able to complete a single film of the whole game one day, just because I am insane.

Anyway, this sounds cool (I love Metroidvanias; Super Metroid might literally be my favourite game ever, and it certainly tops my list of “best game design ever”) and I’ll almost certainly check it out tomorrow after work.

I might also learn something from looking at your Lua. If nothing else, it might help me with two pairs of levels I’d wanted to splice together into a single map, but hadn’t been able to due to engine limitations. Maybe I can at least make the transition between them slightly more seamless.

If I have any ideas to make the map design cooler, I’ll also speak out, but realistically, I probably won’t, since you’ve probably made more maps recently than I have, and I’ve certainly never designed anything as cool as “Monument to All Your Sins”, “Stone Temple Pilates”, “Roquefortress”, etc.
“People should not be afraid of their governments. Governments should be afraid of their people.” —V, V for Vendetta (Alan Moore)

“The trouble is that we have a bad habit, encouraged by pedants and sophisticates, of considering happiness as something rather stupid. Only pain is intellectual, only evil interesting. This is the treason of the artist: a refusal to admit the banality of evil and the terrible boredom of pain. If you can’t lick ’em, join ’em. If it hurts, repeat it. But to praise despair is to condemn delight, to embrace violence is to lose hold of everything else. We have almost lost hold; we can no longer describe happy man, nor make any celebration of joy.” —Ursula K. Le Guin, “The Ones Who Walk Away from Omelas”

“If others had not been foolish, we should be so.” —William Blake, The Marriage of Heaven and Hell

“The law cannot protect anyone unless it binds everyone; and it cannot bind anyone unless it protects everyone.” —Frank Wilhoit

Last.fm · Marathon Chronicles · Marathon Eternal 1.2 · Where Monsters Are in Dreams · YouTube Vidmaster’s Challenge
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

Is this the same freeze that is fixed in the 1.3 alpha?
User avatar
RyokoTK
Vidmaster
Posts: 4161
Joined: Mar 7th '06, 07:04
Location: Saint Paul, MN

It could be, I haven't used the 1.3 alpha. edit: No, it is not fixed in 1.3a1.
If I have any ideas to make the map design cooler, I’ll also speak out, but realistically, I probably won’t, since you’ve probably made more maps recently than I have, and I’ve certainly never designed anything as cool as “Monument to All Your Sins”, “Stone Temple Pilates”, “Roquefortress”, etc.
I mean in this particular map everything is an un-shaded square room, I put quite genuinely zero effort into it. The point was just to try the Lua. Real maps, if they happen, will come later.
User avatar
The Man
Vidmaster
Posts: 1203
Joined: Aug 6th '08, 05:23
Location: Sarasota, FL
Contact:

I’ve seen that now that I’ve played it.

Thoughts:
  • It’s a blast to play. If this concept were expanded into a complete scenario, it’d be goddamn amazing, and I’d happily contribute to one.
  • The teleportation gun reminds me of the portal gun. It’s not quite identical, but it could be used to facilitate the same kind of puzzle-solving, albeit slightly less complicated, perhaps. (I wonder if the engine could support a crude version of the portal gun. That would be goddamn amazing.)
  • It’s really easy, and not very long. It took me about 30-45 minutes to clear out on TC (including getting all 17 items) using mostly fists, apart from one Enforcer who was sniping at me and one Trooper in the Arena room (I made the others kill each other), and that’s without any real methodical approach to my gameplay other than “run around and see what you find” (I got lost several times). I only died three times, two of which I attribute to reckless risk-taking (and, in one of those cases, failure to Think With Portals!™) and one of which was because I wasn’t expecting not to be able to breathe underwater in the early part of the scenario.
  • The design is, as stated above, very simple, which is part of the reason it’s easy to get lost. It’s not hideous, though; it’s just not memorable or interesting.
  • Despite the caveats, great, and I strongly recommend it. I’ll take a look at the Lua script after work, probably.
“People should not be afraid of their governments. Governments should be afraid of their people.” —V, V for Vendetta (Alan Moore)

“The trouble is that we have a bad habit, encouraged by pedants and sophisticates, of considering happiness as something rather stupid. Only pain is intellectual, only evil interesting. This is the treason of the artist: a refusal to admit the banality of evil and the terrible boredom of pain. If you can’t lick ’em, join ’em. If it hurts, repeat it. But to praise despair is to condemn delight, to embrace violence is to lose hold of everything else. We have almost lost hold; we can no longer describe happy man, nor make any celebration of joy.” —Ursula K. Le Guin, “The Ones Who Walk Away from Omelas”

“If others had not been foolish, we should be so.” —William Blake, The Marriage of Heaven and Hell

“The law cannot protect anyone unless it binds everyone; and it cannot bind anyone unless it protects everyone.” —Frank Wilhoit

Last.fm · Marathon Chronicles · Marathon Eternal 1.2 · Where Monsters Are in Dreams · YouTube Vidmaster’s Challenge
User avatar
Wrkncacnter
Vidmaster
Posts: 1953
Joined: Jan 29th '06, 03:51
Contact:

treellama wrote:Is this the same freeze that is fixed in the 1.3 alpha?
I believe that was fixed after the alpha was released. Is there any chance we can just get a hotfix version of a1 with the various bug fixes that have been done since 2015? I know this one is critical for my project https://github.com/Aleph-One-Marathon/a ... /issues/67, and I know the 15 transition bug has been causing issues for a lot of people lately.
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

The experience with 1.2 isn't great with the latest versions of macOS. It would suck to release a bugfix version of 1.2; the SDL 2 stuff is basically essential now.
User avatar
Pfhorrest
Vidmaster
Posts: 1847
Joined: Oct 12th '07, 22:08
Location: California
Contact:

I have a vague memory of you already answering this before, but I don't recall the answer: is there something unstable in the 1.3 alpha that makes it unsuitable for a new general release to replace 1.2?
User avatar
treellama
Vidmaster
Posts: 6110
Joined: Jun 2nd '06, 02:05
Location: Pittsburgh
Contact:

The gamma correction is broken in new versions of mac OS and Windows so the game is unplayably dark there (Marathon's uncorrected brightness is "Darkest"). I also remember having some issues with mouse control. There are some general maintenance issues that need to be looked into as well, and I need to set up my windows build environment anew.

I will try to set aside some time to look into all this, but this is a busy season in life for me.
Post Reply