Results 1 to 10 of 42

Thread: Mazer - procedural maze generator in Lazarus using Castle Game Engine

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Played a bit. Some improvements to movement could be made. Not sure if you could, but make the player not stick to things when moving, but move to the side if something is just blocking the path a bit. For example, a protrusion on the wall prevents moving forward, the player should move to the side and still move forward. You can test for this by making a few collision tests in the direction the player is moving, and placing the player at an appropriate spot where it's not colliding. Some games do this for more fluid movement. Also, when running and going up stairs, the player will move deeper into the stairs and the movement will become jagged.
    Existence is pain

  2. #2
    de_jean_7777, thanks for the feedback! Yes, I am aware of the problem, but fixing it requires playing with Castle Game Engine internals... It doesn't seem too complex, and Michaelis explained me how-to, but still I'm a little "afraid" to start making the patch... And as it's not too critical I put some more effort in something more interesting, like developing new generation mechanics or tilesets... But I'll surely fix it in some time.
    phibermon, thank you! I've been thinking of implementing my own erosion (and extrusion) algorithm... but if there is something available and tested it's perfect! I'll definitely look into it.
    My free and opensource games: http://decoherence.itch.io/
    Sources are here: https://github.com/eugeneloza?tab=repositories

  3. #3
    A few days ago I've recorded a 15-minutes maze run (2x speed)
    My free and opensource games: http://decoherence.itch.io/
    Sources are here: https://github.com/eugeneloza?tab=repositories

  4. #4
    I had to take a look to your maze generator. I think it is perfect to create dungeons.

    I hope you can fix that lighting glitch. It's a bit annoying.
    No signature provided yet.

  5. #5
    Quote Originally Posted by Ñuño Martínez View Post
    I had to take a look to your maze generator.
    At this moment I'm buisy with interface creation for my RPG game... As soon as I've finished I have several major upgrades pending:
    • Render and no-collision elements to reduce getting stuck and improve preformance
    • Memory optimization (thanks to Lazarus forum) will enable almost infinite maps generation
    • Better controls (requires to make a few changes to Castle Game Engine source) to prevent getting stuck at different map elements
    • Overworld map generation by Height Map (not Mesh)


    I hope you can fix that lighting glitch. It's a bit annoying.
    I wish I could make that quickly. But still I didn't study shaders so well to use them properly... I've tried srAlways mode (which provides shaders for me) and it gives much smoother results for lights, but there is flickering (at least in my defect graphics card)... I can't promise I'll fix this issue quickly... But I also wish I could do it as soon as possible
    My free and opensource games: http://decoherence.itch.io/
    Sources are here: https://github.com/eugeneloza?tab=repositories

  6. #6
    Quote Originally Posted by eugeneloza View Post
    • Memory optimization (thanks to Lazarus forum) will enable almost infinite maps generation
    I assume that your maze generator algorithm internally uses some kind of a random number generator right. Have you ever thought about using a pseudorandom algorithm for this?
    By using pseudorandom algorithm you could be generating your mazes on demand since such algorithm would always return same results if its initial state is the same. This would require only a fraction of the memory that you need now.
    Also using of pseudorandom algorithm you would literally get possibility for true endless mazes. Well depending on your overall maze generation algorithm they might begin to repeat after lots and lots of kilometers but then again no one would probably notice that.

  7. #7
    Have you ever thought about using a pseudorandom algorithm for this?
    Well.. the things are not as easy in this issue. Mazer is not the final goal of this maze generation algorithm. I'm working on a RPG game Decoherence, where each maze would be not as huge, but will represent a location full with items, enemy spawn points, waypoints for AI, interactable objects like doors, switches, secret passages and so on. So, basically I need to generate the map in advance and store its current state in save files.
    The same stuff with the overworld generation. It will be a 2D maze of the similar sort for the player to explore fighting monsters, solving puzzles, making epic quests to save the Galaxy
    So... I don't really need an infinite map. Just at the moment a 33x33x15 map consumes all the RAM for a 32 bit app. And after optimizing, I can drop this amount 10 to 100 times lower (at this time the required RAM is ~n^3, and it will become ~n). Moreover, a 33x33x15 map takes 40 minutes just to explore 70%... and twice that to get 100%. Basically hardly anybody but me likes such (and even longer) maze-solving experience A new video I've recorded took me 35 minutes to solve the maze and I've felt really lost in the end. If it wasn't for luck to find the rose I'd have very hard time finding my way back to other maze branches.

    And another video (this time 35 minutes run accelerated 2.5 times)
    My free and opensource games: http://decoherence.itch.io/
    Sources are here: https://github.com/eugeneloza?tab=repositories

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •