Very early alpha stage


#1

I am doing my first working try of random dungeon generator. It works fine, as far as I can see, yet I’d love to have some other impressions.

My main concern is about performance, since I am using my own phone and it is kinda old, so the game looks a bit slow.

Thanks a lot for any help you can give me.


#2

Cool game, didn’t get too far but I enjoyed what I played. Performance wise it seemed to run perfectly on my phone, which is a cheap Moto E, so good job there too. Didn’t notice any slow down at all.


#3

The room generation seems to work great. What algorithm did you use?


#4
  1. I did a matrix of 55 by 55 cells of wall of 64 by 64 pixels. They are pathfinding obstacles, but with the behavior inactive.
  2. Build rooms of 64 by 64 pixels in random spots (from 1 to 44, X and Y) and gave them random X and Y sizes (from 3 to 10, by 64). Each one got an ID.
  3. On room ID 1, I put a pathfinding object and madeit find a path to room ID 2. For each node, it builds a piece of road.
  4. From room 2, find a path to room 3, and repeat until all rooms are done. No path from last room to first one, btw.
  5. To clean everything, delete any piece of wall touching the roads and rooms, excluding the ones in the limits.
  6. Delete the walls don’t touching your rooms and roads, so now just the walls around them are left.
  7. Put enemies and chests on the rooms using random ID and random place on them.
  8. Delete the rooms and roads to free the most of your memory

I can try to clean it up, and leave just the room generator, and upload it

https://www.dropbox.com/s/alpfql8gcddc3hm/Dungeon.zip?dl=1

Just upload the clean code to dropbox.


#5

Interesting strategy!

Do you want to try making an official extension for other GDevelop user to do something similar? If so, I would love to collaborate with you on it!


#6

I haven’t tried to make extensions, so it may be a good idea. Always good to learn something.


#7

What text do you want me to put in the Author field? This can be your name and email, a short link, social media account, etc.


#8

Thanks a lot. Name: José María Hernández Dorado.
Email: meceyn@gmail.com
for the media page it may be oscuridad666.itch.io page.

Thanks again


#9

Here is my current progress. Please review and make any suggestions!


#10

An awesome job, if I may say it. The idea of having a “safe break” for impossible rooms is clever. Something I need to add to my own code.

It could be good to add the option to delete the excess of terrain to save some memory and gain a few fps.Something like if “terrain object” not touching rooms nor hallways, delete them.

The place will look a bit emptier of course, yet you save some memory.

Checking some random numbers I made a dungeon that goes beyond the boundaries. You need to take in account the hallway’s size when making them. An adjust to the room creation limits or the hallway’s place so it doesn’t goes below 0 or over the terrain limit.

Maybe a condition in the creator like RandominRange(1+Hallways_size, (Terrain_size-Hallways_size)-1) so you get sure the rooms and hallways. I know it may not be as easy as it, but I hope it helps as an idea.


#11

Hi mates I think this is awesome please make some tutorials of how to use it and how to add different sprites as walls, floor, etc.


#12

For what I know, the extension will have comments and help for the use.

About using different wall sprites, my way to do it is:
+ When making the wall object and add one frame animations
+ In the creation event make the actual animation = RandomInRange(0,Max_Animations)

If you did 3 animations for the walls it would be RandomInRange(0,2)


#13

Thanks for the ideas!

  • I do need to prevent hallways from going outside the map.
  • I will add an option to delete unused terrain.

#14

First of all, great job on your examples, those are very well done and very valuable to the community.

This extension is not finished yet. You can of course use and test the non-finished code which is hosted on Github. Once the extension is submitted, reviewed, and published it will be available directly from GDevelop.

BTW, one idea for the rooms is to create External Layouts for rooms and insert those on top of the placeholder room objects made by the generator.

Another idea for the walls is to use the Autotile extension that FlokiTV is working on. (This selects the appropriate animation based on what position other tiles are located)


#15

Thanks for the feedback as soon as this extension is available I will make an example template to create a dungeon crawler.
I have tried other methods but I have always gotten stuck in creating the corners


#16

Ok, the option to delete unused terrain is implemented:


#17

This has actually given me an idea. I should add another object type called “WallObject” and put those where these terrain are. (Users can of course use the same sprite for walls and terrain, but some people will want to be able to have walls look different).

And… now I think I am going to do the same thing for doorway objects! Thanks for helping with these ideas, guys!