Chaosforge Forum

  • March 28, 2024, 04:12
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Using Generator  (Read 3315 times)

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Using Generator
« on: May 03, 2011, 12:16 »

Hi again!

I made this mod that uses the built-in map generation module to make an infinite dungeon (multi-levels inspired by Simon-v's multi-level module, but perhaps less elegant).  Also, it is set up to allow you to specify special levels like in real DoomRL. Included is Hell's Arena on level 1.  The multi-level bit may be dodgy, but I think the random level stuff should work well (potentially perfectly).

The player placement issue is resolved by replacing Generator.place_player (and a few other problematic doodads) with a more single-level friendly version.

That said, this mod isn't really fun (or it's not any more fun than playing Doom RL on itytd), but it's a proof of concept that anyone is welcome to use for their own devious purposes.  Since special levels are included in the sandbox, it would be very easy to make this a very close copy of DoomRL.  Hence, we could make our own challenges or new special levels :)
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Using Generator
« Reply #1 on: May 03, 2011, 14:48 »

My God, it's full of (beautiful) hacks!

Some of the finds are going to look really good in my MultiLevel module. In the meantime, perhaps you will find a way to solve a problem i was struggling with for a while: saving the being list when you "exit" a level and then restoring it when you "return" (it works with items, so why not?). Maybe you can find a way to make it work, if you feel like it. :)
Logged

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Re: Using Generator
« Reply #2 on: May 03, 2011, 20:53 »

The idea of saving levels is awesome; how can I resist?

The basic problem is that, as far as I know, the only way to remove a being from the map also frees the associated pascal structure rendering any remaining lua reference useless.

But, after several failed attempts, I managed to devise a terrible hack that works very well. There are a possible few issues that I know of, but I expect it to be very usable.

The method is documented in the attached proof-of-concept level.

Edit: improved the method slightly.
« Last Edit: May 03, 2011, 21:42 by tehtmi »
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Using Generator
« Reply #3 on: May 04, 2011, 04:00 »

This is indeed very clever.

In fact, i wasn't aware some of the things shown in this demo were even possible. Thanks! This is going to keep me occupied for days... :)
Logged
Pages: [1]