Help on programing a DM game
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Help on programing a DM game
Hi there.
I am interested in programming a game using the flip3D game projection found in DM-like games.
I found almost nothing in google so i come here to ask for some tutorials or wevpages where i can find information about this kind of game perspective.
Thanks in advance
P.S: i dont want or need a DM engine, only the info on how to implement the flip3d part.
I am interested in programming a game using the flip3D game projection found in DM-like games.
I found almost nothing in google so i come here to ask for some tutorials or wevpages where i can find information about this kind of game perspective.
Thanks in advance
P.S: i dont want or need a DM engine, only the info on how to implement the flip3d part.
- linflas
- My other avatar is gay
- Posts: 2445
- Joined: Tue Nov 04, 2003 9:58 pm
- Location: Lille, France
- Contact:
Re: Help on programing a DM game
i don't know if i understand you well but... do you want to make "fake 3d", i.e. only 2d sprites like original DM ? or do you plan to use a real 3d engine ?
"The only way out is another way in." Try Sukumvit's Labyrinth II
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Help on programing a DM game
Searching for "Flip3D" produces pages about some feature in Windows Vista, which is probably not what you were talking about.
So... what are you talking about?
So... what are you talking about?
Re: Help on programing a DM game
I'm talking about the fake 3D used by Dungeon Master and similar. This is, using 2D sprites on a simulated 2D environment. Basically what Linflas says.
Or take a look here:
http://blog.hexagonstar.com/rpg-design- ... projection <---- Around the middle of the webpage there is an article about Flip3D.
Or take a look here:
http://blog.hexagonstar.com/rpg-design- ... projection <---- Around the middle of the webpage there is an article about Flip3D.
Re: Help on programing a DM game
Finally I found how to simulate a 3D environment.
Simply use 3D perspective formulae to scale down the objects to simulate distance, and make them appear higher or lower on the screen.
For walls' perspective, lets suppose we got a texture that will be a wall, like this, from front view:
(the symbol to the left is the player's eye/camera from it's side)
Vertexes A and C will be at the normal corresponding coordinates, while B and C will be "moved" towards the center of the screen.
To do this, we have to know the distance between the player (located near the vertexes A & C) to the next game map cell, where B & D vertexes end.
Using some simple perspective formulae we can find how much we have to scale the texture in the side B-D.
Look this image:
Vertexes near the player/camera are just in the border of the screen, while the vertexes far away are closest to the center of the screen.
In any case, we start drawing the objects and walls from the farthest one to the closest one, so objects and walls that lead left or right (intersections) are overlapped by closest walls or objects.
For objects like monsters or items it's pretty similar: the farther the item is, the smaller and closer to the center of the screen is:
The same happens with items: they are drawn from the far to the closer, so the closer ones overlaps the farthest ones.
In this case, we first draw walls in the far distance, then walls closest to the player. Next the farthest monster and finally the closest one.
Right now, lets suppose we got a corridor with a length of one map cell, and after this, we got an intersection leading left and right.
Here, we draw first the walls that are just in front of the player which form the intersection itself. We draw then with the appropriate size and centered to the screen, to simulate they are far away. Next, we draw the objects (if any) in the intersection.
Next we draw the walls to the left and right in the corridor. In this way, those last walls will overlap some of the intersection walls and some of the items in the intersection.
Finally, we draw the monsters in the corridor cell using the same technique (first far, then close).
Also, most of the games uses some kind of distance darkening, so the farthest objects and walls are darker than the closest ones. Of course this is not realistic at all since in real life, objects in the distance are not darker but blurred. Anyway, for a game of this kind, using this darkening technique helps to offer a depth feeling.
That's basically how it works.
Hope you understand. If not, don't be afraid of asking any question.
Enjoy.
Simply use 3D perspective formulae to scale down the objects to simulate distance, and make them appear higher or lower on the screen.
For walls' perspective, lets suppose we got a texture that will be a wall, like this, from front view:
Code: Select all
A-----------------B
| |
/| |
<O |=================|======> Viewing this direction
\| |
| |
C-----------------D
Vertexes A and C will be at the normal corresponding coordinates, while B and C will be "moved" towards the center of the screen.
To do this, we have to know the distance between the player (located near the vertexes A & C) to the next game map cell, where B & D vertexes end.
Using some simple perspective formulae we can find how much we have to scale the texture in the side B-D.
Look this image:
Vertexes near the player/camera are just in the border of the screen, while the vertexes far away are closest to the center of the screen.
In any case, we start drawing the objects and walls from the farthest one to the closest one, so objects and walls that lead left or right (intersections) are overlapped by closest walls or objects.
For objects like monsters or items it's pretty similar: the farther the item is, the smaller and closer to the center of the screen is:
The same happens with items: they are drawn from the far to the closer, so the closer ones overlaps the farthest ones.
In this case, we first draw walls in the far distance, then walls closest to the player. Next the farthest monster and finally the closest one.
Right now, lets suppose we got a corridor with a length of one map cell, and after this, we got an intersection leading left and right.
Here, we draw first the walls that are just in front of the player which form the intersection itself. We draw then with the appropriate size and centered to the screen, to simulate they are far away. Next, we draw the objects (if any) in the intersection.
Next we draw the walls to the left and right in the corridor. In this way, those last walls will overlap some of the intersection walls and some of the items in the intersection.
Finally, we draw the monsters in the corridor cell using the same technique (first far, then close).
Also, most of the games uses some kind of distance darkening, so the farthest objects and walls are darker than the closest ones. Of course this is not realistic at all since in real life, objects in the distance are not darker but blurred. Anyway, for a game of this kind, using this darkening technique helps to offer a depth feeling.
That's basically how it works.
Hope you understand. If not, don't be afraid of asking any question.
Enjoy.
- linflas
- My other avatar is gay
- Posts: 2445
- Joined: Tue Nov 04, 2003 9:58 pm
- Location: Lille, France
- Contact:
Re: Help on programing a DM game
err.. thanks a lot but we already know all this as it is the very basics of Dungeon Master engine
"The only way out is another way in." Try Sukumvit's Labyrinth II
Re: Help on programing a DM game
I think the confusion was the term 'Flip3D', which the author of the page you linked to admitted was his own term for it, since he didn't know an actual term for it.
But keep posting your own findings, as I'm sure the more artistically or techincally inclined can add extra comments. There is technicaly documentation on the encycloaedia, but I;m not sure if perspective is covered.
There is also source code available for at least CSBwin, which might also help if you can spot the drawing routines in the code
But keep posting your own findings, as I'm sure the more artistically or techincally inclined can add extra comments. There is technicaly documentation on the encycloaedia, but I;m not sure if perspective is covered.
There is also source code available for at least CSBwin, which might also help if you can spot the drawing routines in the code
Re: Help on programing a DM game
No, i read somewhere else the term Flip3D (not being that Windows thing).
I finally decided to use Unity3D engine (http://unity3d.com/unity), so I don't lose time creating the graphical output engine, and also I got a good engine pretty powerful, multiplatform capable, and easy to use.
I finally decided to use Unity3D engine (http://unity3d.com/unity), so I don't lose time creating the graphical output engine, and also I got a good engine pretty powerful, multiplatform capable, and easy to use.
Re: Help on programing a DM game
"flip3d" term is used in Wikipedia/Dungeon Master discussion by Doug Bell himself http://en.wikipedia.org/wiki/Talk:Dunge ... eo_game%29 :
Ubermann, as far as I understand, you want to write a dm-like engine from scratch for your game. But instead you could use already existing engines that simulates Dungeon Master game.I got a question about the playfield style of Dungeon Master. Is there a common term which the pseudo 3D 90degree flip graphic style is called? I would call it just flip3D but maybe there's a better word how this style is called? --sys2074 03:59, 28 January 2007 (UTC)
I don't know if it has a formal name, but flip3D is pretty similar to how we referred to it. There's even a function in the code with that name. The algorithm for drawing it is a painter's algorithm, although generalized for 2D. (The painter's algorithm as described in Wikipedia is not the generalized one.) —Doug Bell talk 12:44, 7 February 2007 (UTC)
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Re: Help on programing a DM game
I already took a look at such pre-made engines. The problem is they don't offer me every feature I want, such as slopes or sectors with different heights, or even rooms with non-regular shapes, but also some other features about game mechanics.Adamo wrote:[...]
Ubermann, as far as I understand, you want to write a dm-like engine from scratch for your game. But instead you could use already existing engines that simulates Dungeon Master game.
Because I don't want to try to understand other's source code, I find doing my own engine the better option.
Right now, I already have the basic perspective procedures. Buggy, but working.
I will release some screenshots in a near future.
- linflas
- My other avatar is gay
- Posts: 2445
- Joined: Tue Nov 04, 2003 9:58 pm
- Location: Lille, France
- Contact:
Re: Help on programing a DM game
well.. then if you can implement 5 squares-ahead view, your engine will be very interesting !
"The only way out is another way in." Try Sukumvit's Labyrinth II
Re: Help on programing a DM game
I talked with Sophia about that and she said it is possible to rearrange the viewport - for example to implement 5 squares-ahead view. DSB is a very flexible custom engine. She could explain you all things that could be done with this engine.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Re: Help on programing a DM game
I'm using Unity3D engine (http://unity3d.com/unity). It's a modern and powerful engine.linflas wrote:well.. then if you can implement 5 squares-ahead view, your engine will be very interesting !
You can view up to infinite... if your computer can handle it.
I will implement a "fog" effect so you can make the fog to hide far objects to improve your framerate.
Unity3D is a full 3D engine. I find it more flexible and powerful than any other pseudo-3D engine, allowing to create complex room structures and effects, that would be impossible or very hard to achieve with classic-like engine.Adamo wrote:I talked with Sophia about that and she said it is possible to rearrange the viewport - for example to implement 5 squares-ahead view. DSB is a very flexible custom engine. She could explain you all things that could be done with this engine.
Anyway, thanks for the offer.
- linflas
- My other avatar is gay
- Posts: 2445
- Joined: Tue Nov 04, 2003 9:58 pm
- Location: Lille, France
- Contact:
Re: Help on programing a DM game
do you plan to make all 3d ? i mean objects, monsters and so on, such as Grimrock or Entombed ?
"The only way out is another way in." Try Sukumvit's Labyrinth II
Re: Help on programing a DM game
Yes. And also realtime.linflas wrote:do you plan to make all 3d ? i mean objects, monsters and so on, such as Grimrock or Entombed ?
Graphics and general aspect will remember Oblivion.
Combat, inventory, gameplay and etc... will remember to Dungeon Master.
Although the game will be RealTime, the player will be able to pause the game to develop the combat strategy, something like Baldur's Gate or Icewind Dale. But it's not necessary.
Re: Help on programing a DM game
have you checked Rasmus custom engine? I think he`s making full 3d real time DM-like game. Check out his homepage:
http://www.rasmus-dev.com/
http://www.rasmus-dev.com/
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Re: Help on programing a DM game
I have checked it out, but i don't like the controls.Adamo wrote:have you checked Rasmus custom engine? I think he`s making full 3d real time DM-like game. Check out his homepage:
http://www.rasmus-dev.com/
I prefer a more classic HUD distribution and mouse/keyboard usage.
Even if i didn't mind that, that engine can't use advanced texturing effects, a realistic physics engine and post-processing graphics manipulation (bloom, motion blur, water waves, real time atmospheric lightning), among other, that pretty almost any moder game has.
Using an engine (like Unity3D, ShyVa, etc...) it's easy to implement all that stuff pretty easy.
I'm doing something that will look like "Legend of Grimrock", but instead of moving tile-by-tile, you can freely move.
P.D. If everything goes as planned, I will release a version for PC and Android, and maybe for MacOS and iPhones (I don't know if I can compile everything for MacOs/iPhone from a Windows PC platform from within the engine)
- linflas
- My other avatar is gay
- Posts: 2445
- Joined: Tue Nov 04, 2003 9:58 pm
- Location: Lille, France
- Contact:
Re: Help on programing a DM game
yep, maybe we have another rasmus here
"The only way out is another way in." Try Sukumvit's Labyrinth II
Re: Help on programing a DM game
Not that ambitious. The only i have to develop is the gameplay logic and textures/models/sounds/music/mapping. Rendering and physics part is already done. That is one of the advantages of using a premade engine.Gambit37 wrote:Pretty ambitious goals for a single man project! Good luck!
The hardest part for me is the modeling part, but i think there are some webpages around which offers free models.
Texturing, music and sound part is not much hard.
Mapping is pretty easy, but requires much time, since the mapping tool works with map chunks, similar to Quake map editors.
Currently, im in mapping and game logic stage. Then will do the modeling and finally the gfx and sfx part.
Another feature i have thought about was to implement a random dungeon generator (remenber Dungeon Hack?). Maybe on future versions...
- oh_brother
- Son of Heaven
- Posts: 1897
- Joined: Wed Aug 12, 2009 11:13 am
- Location: The Screamer Room
Re: Help on programing a DM game
But this is not just a man...this is ubermann.Gambit37 wrote:Pretty ambitious goals for a single man project!
BTW I really like the idea of a random dungeon generator, sometimes it is nice just to wander around hacking and slashing.
- Gambit37
- Should eat more pies
- Posts: 13718
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Help on programing a DM game
@Ubermann, I can only assume you have unlimited free time. I wish I had enough free time to finish all the projects I've ever started, it just gets harder and harder as I get older with more responsibilities. I really need to win the lottery or something, then I could retire and just build stuff to my heart's content
Re: Help on programing a DM game
Yeah, i have unlimited time... until busy time starts ^^Gambit37 wrote:@Ubermann, I can only assume you have unlimited free time. I wish I had enough free time to finish all the projects I've ever started, it just gets harder and harder as I get older with more responsibilities. I really need to win the lottery or something, then I could retire and just build stuff to my heart's content
Actually i can only work on this something like 1 hour each day, maybe 2, and not every day.
But i never told this will be released tomorrow. Just "when it's done".
- Babe Bridou
- Journeyman
- Posts: 60
- Joined: Sun Dec 12, 2004 11:36 pm
Re: Help on programing a DM game
Using Unity you're going to meet a few tough problems, one of which being the items/monsters on other levels as objects/instances or as just data. If you want the game to be a single level (eg: where you can look down a pit and see where it goes) you'll have to "cheat" because no engine and no rig can sustain so many objects in memory interacting with each other.
In other words, you're going to have to design a bridge between the Unity engine and your Game engine, or else your levels will end up rather small and completely isolated from each other. The closest I've had it going (but true enough I haven't worked on Unity all that much) is to have only three levels active at a single given time. Fast movement or free falls in pits would then depend on the speed of the machine to instanciate the levels fast enough so you don't fall through the world.
What I'm saying is you can't just use Unity or any other modern engine to build a massive 10-stories tiled dungeon filled with walls, items and creatures on a single scene and expect it to just work as is - it requires the right ideas (which I lack) and possibly a lot of work
In other words, you're going to have to design a bridge between the Unity engine and your Game engine, or else your levels will end up rather small and completely isolated from each other. The closest I've had it going (but true enough I haven't worked on Unity all that much) is to have only three levels active at a single given time. Fast movement or free falls in pits would then depend on the speed of the machine to instanciate the levels fast enough so you don't fall through the world.
What I'm saying is you can't just use Unity or any other modern engine to build a massive 10-stories tiled dungeon filled with walls, items and creatures on a single scene and expect it to just work as is - it requires the right ideas (which I lack) and possibly a lot of work
Re: Help on programing a DM game
Sorry to drag up an old thread but does anyone know of any web sites which talk about the logic to create a 2d style dungeon master game. Someone told me there used to be a Amiga programming book which had a tutorial, im not worried about what language its written in more the concepts.
I'm currently trying to work out how is best to show the correct side of a wall based on the players position/direction
i.e. if you have a wall which has a banner on the south wall, I don't want to show it on the North/East/West Walls.
If anyone knows to guides about making a Dungeon Master style of game it would be most helpful, I'm trying to see what I can create with JavaScript/HTML Canvas if anyone is interested take a look at https://github.com/madmunky/Bloodwych
I've got the basics going reading the original bloodwych map in limited detail.
I'm currently trying to work out how is best to show the correct side of a wall based on the players position/direction
i.e. if you have a wall which has a banner on the south wall, I don't want to show it on the North/East/West Walls.
If anyone knows to guides about making a Dungeon Master style of game it would be most helpful, I'm trying to see what I can create with JavaScript/HTML Canvas if anyone is interested take a look at https://github.com/madmunky/Bloodwych
I've got the basics going reading the original bloodwych map in limited detail.
Re: Help on programing a DM game
Can't help with the question I'm afrid, but good to still see you around!
Re: Help on programing a DM game
There is definitely an Amiga Shopper issue which had a thorough tutorial (and maybe implemented it with AMOS - not sure on that). It was what I based my version on. I think I've got a Python version somewhere if you want it. As all the issues are scanned and online, there's no reason you can't find it. I tried looking, but only have a certain number of issues local and am on mobile broadband so can't download them wantonly.
The Python version, and the assembler version, are pretty much direct implementations of the tutorial with display code. To run the Python version, you need Python 2.7 with the suitable version of PyGame installed.
The Python version, and the assembler version, are pretty much direct implementations of the tutorial with display code. To run the Python version, you need Python 2.7 with the suitable version of PyGame installed.
Re: Help on programing a DM game
Thanks beowuuf, I've not gone anywhere just not really had anything to post about
zoinkers: Thanks for the python source, I'll take a look but I think I have made a solution for me issue.
zoinkers: Thanks for the python source, I'll take a look but I think I have made a solution for me issue.
- ebeneezergude
- Expert
- Posts: 345
- Joined: Mon Jan 21, 2013 10:58 pm
- Location: I see walls stretching off into the darkness...
Re: Help on programing a DM game
Thanks all for the help, finally manage to get this working - http://bloodwych.co.uk/bwhtml/bloodwych.html
Still early days..
Still early days..