Another 3D dungeon crawl engine

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Another 3D dungeon crawl engine

#1 Post by Ryue »

For my own visual novel / RPG hybrid game Red Eyes: The tainted blood I have created a my own dungeon crawler engine. The reason for this was mostly that I wanted to minimize the pressure on the artists (by reducing the amount of images they need to do per map cell the player can see) and to maximize the adaptibility of the engine itself.

Thus the Red eyes dungeon crawler engine was created. Even during the designing phase I already came to the conclusion that I didn't want to just "sit" on the code but instead share it, and also do an open developement there as soon as the basic engine was up and running.

So much now to the introduction.....now to the mainpart the engine itself.


Red Eyes dungeon crawler engine
The red eyes dungeon crawler engine is a 3d dungeon crawl engine that allows players to move through maps cell by cell (with 90° turns). During their travel through the maps players can run into objects and in addition to this events can be caused by them whenever they enter specific map cells.

Current features
* Moving through a map that contains solid and nonsolid objects
* Showable minimap
* Event processing when a player enters specific cells
* Each cell of the map has a rating of how visible it is
* Special effects (per map cell): Light fog

"Licence"
As mentioned I see the engine as open source. Thus it can be used for free and also commercial projects without any problems by me.
Only thing I ask there is to give credit.

Where to get it
As the project is open source I've decided to put it up onto github so that features can be added more easily and also the source code can be updated more easily:
https://github.com/Ryue/RedEyesDungeonCrawlerEngine

How to use it
I've created a wiki page where the "manual" for the engine is located at:
https://github.com/Ryue/RedEyesDungeonC ... ngine/wiki

Example screenshots
The basic image contains the view itself, a movement menu (they numpad keys can also be used to maneuver through the maps) and a minimap:
Image

Fog can be set for each individual map cell:
Image

Events occur whenever a map cell is entered (you can even differentate from which direction a map cell has been entered):
Image

And naturally there is more than 2 types of images possible that can be displayed:
Image

If you have any questions, suggestions, .... feel free to post here or send me a pm.

Also my thanks to Kinjo for helping me in cleaning up the code and making it more readable for others.

As special note: The images are also part of the open source and can be used how you like (an artist drew them for free for that).
Last edited by Ryue on Sun May 24, 2015 9:59 am, edited 1 time in total.

Mayche
Newbie
Posts: 10
Joined: Mon Jul 28, 2014 3:41 pm
Contact:

Re: Another 3D dungeon crawl engine

#2 Post by Mayche »

is it possible that you can change it so it can be on a third person view?

paktek123
Newbie
Posts: 13
Joined: Thu Jan 01, 2015 8:31 am
Completed: Raiser RPG Framework for Ren'Py
Github: paktek123
Contact:

Re: Another 3D dungeon crawl engine

#3 Post by paktek123 »

Great work on this! I really love the smoke affects! Thanks for open sourcing this!

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Another 3D dungeon crawl engine

#4 Post by Ryue »

Hi
Mayche wrote:is it possible that you can change it so it can be on a third person view?
If you mean a REAL 3rd person then no sadly not. There is the possibility to use this for a "fake" 3rd person by putting a sprite on the screen and then the artist drawing the tiles with the appropriate view imposed upon them. BUT not sure how it would look AND I'm also not sure if you would find an artist for that. I had really troubles finding one for doing the tiles as is.
paktek123 wrote:Great work on this! I really love the smoke affects! Thanks for open sourcing this!
No problem^^ if you have any questions just let me know.

User avatar
Hazel-Bun
Eileen-Class Veteran
Posts: 1010
Joined: Sun Oct 28, 2012 6:03 pm
Completed: Sunrise: A Dieselpunk Fantasy & Ultramarine: A Seapunk Adventure
Projects: Thrall: A Dark Otome Visual Novel
Organization: AURELIA LEO, LLC
Tumblr: authorzknight
itch: authorzknight
Contact:

Re: Another 3D dungeon crawl engine

#5 Post by Hazel-Bun »

Thank you for releasing this! It is much appreciated.
Black bookstore owner. Diverse fiction reviewer. Bestselling romance author. Award-winning fiction editor. Quite possibly a werewolf, ask me during the next full moon.

User avatar
Tayruu
Regular
Posts: 141
Joined: Sat Jul 05, 2014 7:57 pm

Re: Another 3D dungeon crawl engine

#6 Post by Tayruu »

This seems like an interesting system. I wonder how complex it is to create walls with complexity/depth like those trees?

If I were to use such a system, I'd probably be using such kind of walls a lot. > .>

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Another 3D dungeon crawl engine

#7 Post by Ryue »

Tayruu wrote:This seems like an interesting system. I wonder how complex it is to create walls with complexity/depth like those trees?

If I were to use such a system, I'd probably be using such kind of walls a lot. > .>
What do you mean with complexity / depath for walls?
If I guess correct what you mean then there is nothing behind that. The trees you are seeing are only 1 single row of trees each. The other rows (lending depth there) are just the trees of the next cell. IF you use transparent pixels in a "tile" you can make such see through / depth parts easily.

Thus for example an open door is posible where you can see the the insides of the house behind them.


Or did you mean something else?

User avatar
Tayruu
Regular
Posts: 141
Joined: Sat Jul 05, 2014 7:57 pm

Re: Another 3D dungeon crawl engine

#8 Post by Tayruu »

You've got those concrete walls, which appear to be flat concrete texture on a flat surface. The trees look as if they're made of several images, especially with the flat edge of the tree trunks running parallel with the game screen as opposed to the wall surface edge.

EDIT: Of course now that I can actually download and check the files myself I realise it's two separate images for front-facing and side-on walls. so. never mind me. \ o/

It's a good start to the system.

TLAOlt
Regular
Posts: 31
Joined: Mon Jul 21, 2014 12:52 am
Location: USA
Contact:

Re: Another 3D dungeon crawl engine

#9 Post by TLAOlt »

Ah! I'm making one of these! I'm the artist as well as the writer and coder for Transcendence: The Crystal Labyrinth, so this will be a lifesaver. I'll look into it and see if I can help improve it in any way. Thank you very much for bringing this to life! I promise to take good care of your coding and make the best product out of it that I possibly can. If I find anything that I can change and make better, I will talk with you about it, okay? Consider me a serious beta-tester.

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Another 3D dungeon crawl engine

#10 Post by Ryue »

Tayruu wrote:You've got those concrete walls, which appear to be flat concrete texture on a flat surface. The trees look as if they're made of several images, especially with the flat edge of the tree trunks running parallel with the game screen as opposed to the wall surface edge.

EDIT: Of course now that I can actually download and check the files myself I realise it's two separate images for front-facing and side-on walls. so. never mind me. \ o/

It's a good start to the system.
Yepp its a bit tricky. The thing with the trees you mentioned is it because of the 2 images or because of the trees behind trees?
TLAOlt wrote:Ah! I'm making one of these! I'm the artist as well as the writer and coder for Transcendence: The Crystal Labyrinth, so this will be a lifesaver. I'll look into it and see if I can help improve it in any way. Thank you very much for bringing this to life! I promise to take good care of your coding and make the best product out of it that I possibly can. If I find anything that I can change and make better, I will talk with you about it, okay? Consider me a serious beta-tester.
Glad to hear that its of use to someone :)

IF you have any questions just let me know also if you have any ideas for changes or how to make it better. tnx

TLAOlt
Regular
Posts: 31
Joined: Mon Jul 21, 2014 12:52 am
Location: USA
Contact:

Re: Another 3D dungeon crawl engine

#11 Post by TLAOlt »

Wolf wrote: Glad to hear that its of use to someone :)

IF you have any questions just let me know also if you have any ideas for changes or how to make it better. tnx
Mmmm I've played with it a little and, so far, the one that that is really frustrating the the lack of depth. The artist has to have at least intermediate knowledge/skill in perspective drawing (if you can't draw 3+ point perspective and then be willing to work overtime in order to give it the 3-D effect that it deserves. I'm still trying to do it, but I would love it if it where possible to add objects inside the rooms... like the appearance of a fountain in the center of a courtyard or something. I have come up with an idea as to how to do that with what is available now
It could be done by making walls where the object is located and then drawing said object from all 4 angles and using the PNG format so that you can see the background behind it.
Unfortunately, that only works for LARGE objects that sit on the floor, smaller objects (such as drawing a street in a town and putting in streetlamps or even people) are impossible. The only way I can think to implement that is to let the user manipulate the size of each wall. While I understand that is a lot to ask for, it would help improve the visual realism all that much more. I am playing with the size of the panels in Photoshop (I use that and SAI for art), so I may be able to tackle it without having you re-engineer anything. I'll keep you posted.

Another thing I would love to see, but haven't got into seeing if it's currently possible yet, is customization of the minimap. It's okay the way it is now (the GUI will simply need to be designed so that it fits in), but it would be great if it could be adjusted to fit the rest of the game's GUI. What do you think of the idea? If you're interested in trying it out, I'll send you some mini-map GUI assets via PM (you can keep them and add them to the open source files as well).

I also have a question about the minimap: it is possible to withhold it (or not) using persistent data? In the game I am creating, the minimap is a special object that the player is given by an NPC as a gift- most of the users (75-85%) will not receive it because they will fail to raise enough points in order to have the unlocking scene play. Is this possible using your program now or does this option need to be created?

Unfortunately, I can only offer you artistic skill at the moment. I am not the best coder in the world (I am advanced in HTML and I know small amounts of CSS. Sadly, I am a complete newb when it comes to Python and advanced Ren'Py: I've only been studying it for the past few months.). I will be sure to make up some really high quality graphics for ya in order to make up for pretty much copping this. Of course I will credit you in the actual game, but I don't feel like that does enough justice. By adding to it, I'll feel a lot more comfortable using it because I know I contributed.

Let me know how you feel about everything that I mentioned here, a'ite?
~TLA

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Another 3D dungeon crawl engine

#12 Post by Ryue »

Hi I'll post in regards to your other posts later on today (just woke up and saw your post and I need to do some shopping today).
First off thanks for the post and offer like I said first only this one point of it, later I'll answer the other points too.
Unfortunately, that only works for LARGE objects that sit on the floor, smaller objects (such as drawing a street in a town and putting in streetlamps or even people) are impossible. The only way I can think to implement that is to let the user manipulate the size of each wall. While I understand that is a lot to ask for, it would help improve the visual realism all that much more. I am playing with the size of the panels in Photoshop (I use that and SAI for art), so I may be able to tackle it without having you re-engineer anything. I'll keep you posted.
With that to make sure I get you correct: Do you mean also things like stalactites (coming from the ceiling) and flowers (standing on the floor) or a well in the middle of things or "just" the objects that are usually the most dynamic things like as you mentioned people and also streetlamps?

When I'm sure that I'm getting you correctly I'll post there accordingly (just need to make sure first I'm getting you 100%)

TLAOlt
Regular
Posts: 31
Joined: Mon Jul 21, 2014 12:52 am
Location: USA
Contact:

Re: Another 3D dungeon crawl engine

#13 Post by TLAOlt »

Wolf wrote:With that to make sure I get you correct: Do you mean also things like stalactites (coming from the ceiling) and flowers (standing on the floor) or a well in the middle of things or "just" the objects that are usually the most dynamic things like as you mentioned people and also streetlamps?

When I'm sure that I'm getting you correctly I'll post there accordingly (just need to make sure first I'm getting you 100%)
Stalactites would be difficult, since you would have to make the room/cell have a roof (and I know well that it doesn't have that yet, the ceiling and floor are projections made by the general background: they really don't exist), but a well? Yes. A well or fountain (or even a parked car) is a large object that the player shouldn't be able to just walk over, so it can easily be created by just walling off one or two cells (depending on how large it should be... heck, I'm sure you could even make a LAKE if you were good enough in perspective drawing and animation). From there, you would just make some art for it and be done.

The flowers, actually, don't need to done like that. They can easily be made by drawing them into the floor (if you can draw 3-D, that's a cakewalk). I was referring to more "dynamic" stuff, like people, streetlamps, chairs, lamps, furniture maybe a tree or section of low retaining wall (or a fence). What it would do is give it more mass than an empty room. Essentially, that's all you've made so far. That's a lot more than many have accomplished, but let's go crazy and give it substance, yea?

I'll respond to your PM in few.
~TLA

Ryue
Miko-Class Veteran
Posts: 745
Joined: Fri Nov 02, 2012 8:41 am
Projects: Red eyes in the darkness
Contact:

Re: Another 3D dungeon crawl engine

#14 Post by Ryue »

TLAOlt wrote:
Wolf wrote:With that to make sure I get you correct: Do you mean also things like stalactites (coming from the ceiling) and flowers (standing on the floor) or a well in the middle of things or "just" the objects that are usually the most dynamic things like as you mentioned people and also streetlamps?

When I'm sure that I'm getting you correctly I'll post there accordingly (just need to make sure first I'm getting you 100%)
Stalactites would be difficult, since you would have to make the room/cell have a roof (and I know well that it doesn't have that yet, the ceiling and floor are projections made by the general background: they really don't exist), but a well? Yes. A well or fountain (or even a parked car) is a large object that the player shouldn't be able to just walk over, so it can easily be created by just walling off one or two cells (depending on how large it should be... heck, I'm sure you could even make a LAKE if you were good enough in perspective drawing and animation). From there, you would just make some art for it and be done.

The flowers, actually, don't need to done like that. They can easily be made by drawing them into the floor (if you can draw 3-D, that's a cakewalk). I was referring to more "dynamic" stuff, like people, streetlamps, chairs, lamps, furniture maybe a tree or section of low retaining wall (or a fence). What it would do is give it more mass than an empty room. Essentially, that's all you've made so far. That's a lot more than many have accomplished, but let's go crazy and give it substance, yea?

I'll respond to your PM in few.
~TLA
Yepp. Saw it and we talked on skype already.

Ok then I'm understanding you correctly now.

I'll take a look into that. Stalactites and flowers are no problem. The later can be done quite easily Image (the engine used there
is the same engine just different images used). The former depends on the chosen displayed background image. If it has a ceiling stalactites are just as easy as flowers (I have them in my game). One problem with that is that there is currently not the ability to give a dynamic background (which is something I want to add later on after I have finished the demo for my game in 1-2 weeks).

Another thing I would love to see, but haven't got into seeing if it's currently possible yet, is customization of the minimap. It's okay the way it is now (the GUI will simply need to be designed so that it fits in), but it would be great if it could be adjusted to fit the rest of the game's GUI. What do you think of the idea? If you're interested in trying it out, I'll send you some mini-map GUI assets via PM (you can keep them and add them to the open source files as well).
The minimap I put in minimalistic on purpose so that people can redesign it as they need for specific GUIs (as it is quite depending on how the GUI for each game looks). Thus the minimap there I see mostly as an example as to how a minimap can be accomplished. If you have an idea there sure and I'll also try it out with the GUI assets.
I also have a question about the minimap: it is possible to withhold it (or not) using persistent data? In the game I am creating, the minimap is a special object that the player is given by an NPC as a gift- most of the users (75-85%) will not receive it because they will fail to raise enough points in order to have the unlocking scene play. Is this possible using your program now or does this option need to be created?
Not 100% sure on what you mean there. Do you mean that players see only parts of the minimap that they have already visited and when they get the map in the scene see the whole minimap OR do you mean no minimap at all until they get the scene?
Unfortunately, I can only offer you artistic skill at the moment. I am not the best coder in the world (I am advanced in HTML and I know small amounts of CSS. Sadly, I am a complete newb when it comes to Python and advanced Ren'Py: I've only been studying it for the past few months.). I will be sure to make up some really high quality graphics for ya in order to make up for pretty much copping this. Of course I will credit you in the actual game, but I don't feel like that does enough justice. By adding to it, I'll feel a lot more comfortable using it because I know I contributed.
Thanks for the offer and no problems there. I see it slightly different than you though. Maybe a bit unique view for a programmer (or not) but I don't only see
putting in lines of code as contribution but also comments that help develop the program into something even more useful and also advices or when someone finds something he / she thinks of as missing or wrong. All that I see also as contributing to the engine!

I myself am also using the engine in my own game: http://lemmasoft.renai.us/forums/viewto ... 43&t=31644 and for example if I find that I miss something or something is better / more efficient to be done differently I don't update it in my game. Instead I update it in the current build of the engine, update the engine with that and then use that version in my game (not only is it easier for me to not work with 2 completely different versions of the engine but it also makes sure that I'm motivated to update the engine with as many needed things as possible whenever they are found :) ).


------------------------------------------------------------------------------------------------------------------------------------------------
Next steps for me in regards to your points:
* Dynamic parts: 1.) Dynamic backgrounds where each different mapcell has its own background that is displayed at that location 2.) Lamp posts,...: Unknown so far need to look into that.

*Minimap GUI: I'll look into that

*Minimap withholding: Need a few more infos there from you.

TLAOlt
Regular
Posts: 31
Joined: Mon Jul 21, 2014 12:52 am
Location: USA
Contact:

Re: Another 3D dungeon crawl engine

#15 Post by TLAOlt »

Wolf wrote:Yepp. Saw it and we talked on skype already.

Ok then I'm understanding you correctly now.

I'll take a look into that. Stalactites and flowers are no problem. The later can be done quite easily Image (the engine used there
is the same engine just different images used). The former depends on the chosen displayed background image. If it has a ceiling stalactites are just as easy as flowers (I have them in my game). One problem with that is that there is currently not the ability to give a dynamic background (which is something I want to add later on after I have finished the demo for my game in 1-2 weeks).
Ah, so you were trying to do that anyway? HAHAAH okay, then! I'm glad to see that you are ambitious! I'll help you if I can, alright? If you need ANY type of art, I will happily make it for you, so you don't have to worry about an artist anymore. In fact, I am planning on working on asset graphics right now (as in, literally, right now). I have planned:

Forest
Brick Wall (What I use in my game)
Wooden Building
Wooden Fence
Deciduous Hedge (also used in my game)
Coniferous Hedge
Rose Hedge (girls love this for some reason? Alice in Wonderland much?)
City Street (steel and glass buildings with "alleys")

Do you want anything else? Do you want me to make up:

Car
Well
Fountain
Tombstone (creepy, I know)
Sculpture
Shrubs/Bushes
A Large Tree

Let me know and I'll get to work, okay? It'll take me a while, but I can do it.
The minimap I put in minimalistic on purpose so that people can redesign it as they need for specific GUIs (as it is quite depending on how the GUI for each game looks). Thus the minimap there I see mostly as an example as to how a minimap can be accomplished. If you have an idea there sure and I'll also try it out with the GUI assets.
Alright... I'll see if I can plug my design into it. If I can't, I'll need some instruction on how to do that, okay?
I also have a question about the minimap: it is possible to withhold it (or not) using persistent data? In the game I am creating, the minimap is a special object that the player is given by an NPC as a gift- most of the users (75-85%) will not receive it because they will fail to raise enough points in order to have the unlocking scene play. Is this possible using your program now or does this option need to be created?

Not 100% sure on what you mean there. Do you mean that players see only parts of the minimap that they have already visited and when they get the map in the scene see the whole minimap OR do you mean no minimap at all until they get the scene?[/quote]

The later case. I see that you already have the former (where they only see part of the map is places they've visited), so I wanted to know about the part where they don't get the map at all until they witness the scene. Do you have that set up yet? If it's in your Wiki, I'm sorry to say I haven't fully read it yet (too busy), but I will get to it. If it's in the wiki, just tell me and I'll read into it, okay?
I myself am also using the engine in my own game: http://lemmasoft.renai.us/forums/viewto ... 43&t=31644 and for example if I find that I miss something or something is better / more efficient to be done differently I don't update it in my game. Instead I update it in the current build of the engine, update the engine with that and then use that version in my game (not only is it easier for me to not work with 2 completely different versions of the engine but it also makes sure that I'm motivated to update the engine with as many needed things as possible whenever they are found :) ).
That's a good idea! Please keep me updated on the new updates as well! I'm sure I won't need to use this again for a labyrinth anytime soon, but I'm sure I'll use it again if I EVER make another game XD
Dynamic parts:
1.) Dynamic backgrounds where each different map cell has its own background that is displayed at that location
2.) Lamp posts,...: Unknown so far need to look into that.
Ahhh noooooooooo each cell having its own background will be HELL on the artist! What you have right now is, actually, optimal. I was looking more into having the cells' sizes changeable.... as in... having them conform to the pixel count of the picture given instead of tiling the picture again and again until they are filled. I am playing with this idea already in the version I have. I'll report as I get results.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]