Alright, version 0.1 of my humble random dungeon generator is out. Had to solve the dam thing with paper and pencil first. The style of the code is... well... utter chaos, but it works. You can get it here:
https://github.com/m7600/random_dungeon_generator
To use it, simply clone or download it, open the folder in a terminal, use cmake . and make, and then just run the executable. It will generate a .txt file called "outputmap.txt". Move outputmap.txt to a folder like /flare-game/mods/empyrean_campaign/maps, and then you can open it with Tiled.
Currently it generates a random-sized dungeon between 80-100 tiles in width/height, as well as 16 randomly sized rooms. I used srand() and rand() for this, I know that they are not the best option for generating random numbers, but I can change that later.
The walls all face the directions that they should face. The next step will be to add passages between the rooms.
Here are some screenshots, the first one shows only the floor tiles, then the walls, and finally the collision layer (which still needs some work).
Anyways, maybe this never gets implemented, but with some love it could still be a useful tool for modders, for quickly generating dungeon maps, that can be edited further with Tiled.
That's so cool!
looks great!
Thanks. I'm trying to re-code this in as an object of the Map class used by the engine,, so that it would be possible to use the MapSaver API. However, this task is proving to be way beyond my next-to-nill knowledge of C++.
Does anybody have any suggestions? Currently I made a subclass called RandomDungeon so that it can access the protected members of Map. And I'm still hunting all of the necessary dependencies (I thought I had them all, but I was wrong). Beyond this, I'm not really sure what to do.
Maybe I could try an intermediate solution. Instead of creating an object of the Map class, maybe I could create a class and object for my humble dungeon generator instead.
i have to be honest i only ever was interesseted in the process of how the flare devs were making their assets never the engine/mods itself.
i am atm porting the game over to unity - might also integrate some kind of random dungeon generator i think :-)
Unity is definately a great engine, very powerful. What I like about flare is that it has been taylored to a very specific genre. This saves modders a lot of time, since they only need to focus on art assets, map making, and editing text files.
Speaking of the art assets, I think Clint has done an amazing job with them. Making 2d sprites from a 3d model is kind of a lost art, but it was the process that Diablo 1 and 2 used. The Infinity Engine games (Baldur's Gate, Planescape: Torment, Icewind Dale) used the same method. Heroes of Might and Magic 3 was also notable for this.
Then the roads split. One the one hand, some games went the pure 3d way (Warcraft 3, etc), other went the pure 2d way (as in hand-made pixel art, with no 3d models from which to render them).
Today it's relatively rare to see games that use the method that flare uses. But I'm convinced that it's a huge time saver for 2d games. Besides, suppose that you want a pixel art look instead of a realistic one, you can configure Blender so that it outputs all the sprites that you need,.in whatever visual style you prefer.
yeah totally agree with you about clints work. i love the artstyle of D1&D2 and especially HoMM3 one of my favourite games of all time. thats why i was so happy to find the flare project where i could see and learn how to make this kind of assets (im a programmers guy.. kinda bad with all this "art" stuff hehe)
but yes its an extreme timesafe + i just love how it looks and feels it has this old school feeling to it.
my biggest issue is just that im bad at "painting" say for example pixel art. its quite difficult for me to make, seems like i have more of a talent in 3D modeling which is nice because as you said i can export this (like flare) into 8 or 16 directional sprites and animate them in the game engine.
i might share some of my progress i made with the unity project here in the forums, if it isnt too off-topic
Sure, share away! : )
Painting can definately be more difficult than 3d modeling. For one thing, in painting you have to worry about perspective, foreshortening, shading and coloring. In 3d, all of this is way easier to do. Perspective and foreshortening is basically done automatically for you. And instead of shading, you just place the light source somewhere; this will generate the correct cast shadows, etc. As for coloring, you just choose a base color, and the light source does the rest. Granted, setting all of this up can take longer than making a drawing or painting from scratch, but once you have everything set up, you can generate all kinds of images from different angles at a blazing speed. Even more so if you rig the model, so that you can pose in different ways, in combination with different camera angles. Finally, you can use all of this to generate your own illustrations or paintings. You simply take a screenshot or export it as an image, and then just adjust it a little bit with Photoshop, Gimp or Krita to give it a "painterly" look.
BTW, if you're interesting in the process of using Blender to make pixel art, you might wan to check out this excellent tutorial:
https://www.gamefromscratch.com/post/2017/01/24/Easy-Sprite-Art-In-Blender-Tutorial.aspx
Will do ;-)
yeah i totally agree with you. for me as a programmer a good fit, good art is always difficult to get "for free" but thats why i also very grateful for clints work so people can study it. one thing i couldnt do was to port his source files to the new version of blender. i might just start over and try to make my own models in the new version i think. if its good enough i might share it too
oh wow thanks again for this amazing source - may i ask you how much experience you have with blender/3d modeling?
Not much, to be honest. I can navigate my way through the controls and settings, but my models kinda suck. I can make somewhat decent creatures, but my humanoid models are quite awful. I tried editing Clint's hero model to make a demon, but it didn't look good. Gotta level up on my artistic skills.
Here are some screenshots of a few creatures that I've been working on.
I've also included a head model that I made following Riven Phoenix's excellent step-by-step tutorial on the human head. All the credit goes to Riven, I just followed his instructions. Here's his channel: https://www.youtube.com/user/junaidakhan1
Screenshot from 2019-11-01 16-46-14.png 195 Kb [0 download(s)]
Screenshot from 2019-11-01 16-49-27.png 236.3 Kb [0 download(s)]
Screenshot from 2019-11-01 16-53-10.png 327 Kb [0 download(s)]
And here are some examples of what I was talking about earlier on tweaking the models with a graphics program. I'm using GIMP and Krita. These are works in progress, they're far from being finished.
Screenshot from 2019-11-01 17-17-26.png 300.2 Kb [0 download(s)]
Screenshot from 2019-11-01 17-17-41.png 284.5 Kb [0 download(s)]
imho they are looking amazing. love the spider and the drake, the human face looks not that terrible thought
im not even able to make anything like your stuff yet - would be happy if lol. especially in the new version of blender. i see you still use v2.79?
good old gimp i think for my purpose such easy textures would be more than enough
thanks again for the source material you are really helping me out here :D
Thanks! About the Blender version, yeah I don't really have any reasons for upgrading right now. I did try out the current version, but I found some of the new features to be kind of confusing, but that's just me.
Glad you found the source material useful. Didn't mean to swamp you with links. I just like to share cool stuff when I find it.
You can probably make that spider in 10 minutes or so. If you don't mind, I'll just share one more link. It's actually the very first tutorial that I watched when I just got blender. It's for making any low-poly animal in 10 minutes. Granted, the guy in the video only makes an elephant. But I tried his method and I used it for making the spider:
https://www.youtube.com/watch?v=JjW6r10Mlqs&t
On a side note, GIMP is a great tool, but at some point you might want to check out Krita. I can guarantee that it's well worth your time if you want your images to have a more "painterly" aesthetic. What Krita has that GIMP doesn't is a set of brushes that mimic real brushes. So, for example, you have digital versions of watercolor, acrylic, oil painting, chalk, etc.
Hope that helps!
you are awesome mate! thanks, helps a lot! and really lol never mind i enjoy all of your insights. gotta have to create some animals now :D
im always using paint.net for my paint stuff altought i might have to switch to GIMP in the future because im gonna switch to linux in january (win7 support ends and im not gonna touch win10) does krita also work on linux? because i see that you are using it.
Yeah, Krita is free software / open source, it works fine on all operating systems. But even if you have some software that only runs on Windows, you can use an emulator such as WINE to run it on linux. For example, I have Baldur's Gate 2 and Planescape: Torment on my machine, and I can play them just fine with that emulator.
Personally I'm an Ubuntu fan. But there's a lot of awesome distributions out there. I've heard really good things about the new version of Debian, though I haven't tried it. Choosing a distribution is mostly a matter of personal tastes, I think.