• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
PureSnowX

First person 2D Dungeon Crawler

9 posts in this topic

I'm inspired to make a 2D FPV Dungeon Crawler like Arcana, Eye of the Beholder.
You know when you see a psuedo 3D dungeon in a first person perspective like this:
[img]http://www.wirdfors.se/wp-content/uploads/2011/05/Eye-of-the-Beholder.jpg[/img]

Now, I'm note sure that SNES supported 3D so I suppose it was all done in 2D, I know that all tiles are drawn to look 3D when pieced together.

It's just that I have no idea on how to code this, at all, not even the simplest clue. I have done 2D top-down and side-scrolling but not a 3D-looking 2D dungeon with "depth". [b]I know this can be achieved through 3D-programming with z-depth and all that fancy stuff, but I'd REALLY just like to do it in 2D, the classical way.[/b]

I figured some of you old foxes might know how to code this, and might nudge me in or explain it. I'v tried googling it but I came up with 0 topics around first person view in 2D.

The harders part I can imagine is scaling and positioning the walls, floors and ceilings that's further away so it looks like a complete hallway that you can see a defined amount of "cells" into.

Items, Monsters and other stuff is just plain scaling and not much piecing together with the other tiles so it shouldn't be hard to do.

[b]So how do you do a 2D first person view for a Dungeon Crawler using strictly 2D?[/b]

I'm going to use SFML and C++ and I'd like to avoid 3D programming as much as possible, strictly using 2D skills.
So anyone got any ideas on how to achive this? Edited by Moonkis
0

Share this post


Link to post
Share on other sites
Hello Moonkis,
I'm assuming you want smooth scrolling like Wolfenstien 3d correct? You might be able to find someone to help you build a basic 3d engine for this purpose. If you do not allow the person to spin, so he can only move forward and back:
For this solution your field of view is 90 degrees, facing a wall would cover the entire screen at depth 0. At depth 1, the wall would be half the size, at depth 2 a fourth,... The distances from the center would also shrink in this manner.

Also, if you don't allow the person to move forward and back, you could precompute the shapes like and old school rpg and have the player jump forward or back.
0

Share this post


Link to post
Share on other sites
What you're describing sounds very much like [url="http://www.grimrock.net/"]Legend of Grimrock[/url].

From what I've gathered, SFML has a window package that integrates with OpenGL, so all your 3D graphics needs should be covered. Unfortunately there is some level of 3D graphics programming and knowledge required to get even the most basic scene up and running, regardless of whether or not all the gameplay itself takes place on a 2D plane.

The best online resource I know of for learning OpenGL (and 3D graphics along the way) is [url="http://nehe.gamedev.net/"]NeHe[/url]. The first dozen or so legacy tutorials should give you enough information to get started. There are also a bunch of other links and references you can follow from there for advanced topics.
0

Share this post


Link to post
Share on other sites
The old 8-bit games used bitmaps representing a wall from every different view. The image on screen is then pasted together, using these pre-drawn walls, to give a 3d image. Enemies, items etc are scaled depending on how far away they are from the player. More modern games use a 3d engine which just replicates the view, but in real 3d.
My own game uses 3d blocks which are placed within a level to make a maze. However movement is restricted to 1 unit 'steps' and the view is restricted to 90 degree views, making it 'feel' like an old-school game, even though there is no reason why you couldn't run around the maze and view it from any angle.

[url="http://www.deepfall.moonfruit.com"]http://www.deepfall.moonfruit.com [/url]

[img]http://walen.se/sprites/images/sprites/eye_of_the_beholder_ii__ripper_takis_/eob3.png[/img]
[img]http://www.rik007.plus.com/2.jpg[/img]
2

Share this post


Link to post
Share on other sites
[quote name='r1ckparker' timestamp='1353873813' post='5003987']
The old 8-bit games used bitmaps representing a wall from every different view. The image on screen is then pasted together, using these pre-drawn walls, to give a 3d image. Enemies, items etc are scaled depending on how far away they are from the player. More modern games use a 3d engine which just replicates the view, but in real 3d.
[/quote]
This is exactly what I want to do, and I know how it's represented just not how to achieve it, and I really don't want to do it with a modern approach using 3D ( After all that is what I asked in my first post ). Since the old games didn't use 3D ( Did they? Did SNES support 3D? ) it must be possible without using 3D strictly using 2D? If so, then how would you achieve that code-wise? Think Eye of the Beholder and Arcania for SNES. Edited by Moonkis
0

Share this post


Link to post
Share on other sites
There are two ways to go at this within the SNES-constraints.
1) Create a lot of pretransformed versions of your sprite. So for example <sprite>_frontal_distance0, <sprite>_frontal_distance1, ..., <sprite>_left_distance0, <sprite>_left_distance1, ..., <sprite>_right_distance0, <sprite>_right_distance1. Then you just have to blit the right sprites in.
Advantages: can take the non-planar nature of the sprites into account if the sprites are prerendered instead of just pretransformed.
Disadvantage: you will need a lot of space for each sprite; need to write/find/buy a tool to automate the sprite creation or it is a real lot of work.
2) Have one sprite and do a perspective projection on the fly (just a simple blit from a 2d rectangle to a 2d trapezoid). I'm unfamiliar with the exact capabilities of the SNES but I remember it had a lot of fancy 2d blitting implemented in hardware, if it can do something like that you get a (very) reduced version of modern 3d graphics.
Advantages: does not require extra work doing asset creation.
Disadvantages: might not look very good; math to be implemented probably requires a decent understanding of how 3d graphics work. Edited by BitMaster
0

Share this post


Link to post
Share on other sites
Try this link: www.permadi.com/tutorial/raycast/

...or search using the terms "ray casting", "2.5d".

(Posted from mobile - apologies for the brevity and any errors.)
0

Share this post


Link to post
Share on other sites
This technique is know as [url="http://en.wikipedia.org/wiki/Ray_casting"]"Ray Casting"[/url]. Will make it easier for you to search for tutorials and whatnot. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Edit: Woops, was beaten to it! Edited by Amadeus H
0

Share this post


Link to post
Share on other sites
You might also look at the doom-engine (sources are available). It doesn't have the limitation of "90° walls" and there are tons of rersources for it, e.g. editors which you could use to create your own worlds. And there are different ports of "doom" with using OpenGL.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0