3D Text Based Game

I know this may sound stupid, but I want to make a text based 3D game. I mean making it styled to look like its 3 Dimentional. I understand it may sound stupid but I would like to try. I have looked for tutorials but have gotten little result. I have made many 2D games now, some text based, some graphical. I have gotten basic shape design, line algorithms, rectangle, and rombus shapes.
Please Help, no Matter how stupid it sounds. Even a basic idea on how the display would work. I have gotten into direct x. I have made programs on it before, but it does not show what I need.

Thank You
Lordseanington
If I understand correctly what you want to do, I believe your best bet is to use Direct3D
or OpenGL with an appropriate shader. Google ascii shader for more relevant information.
I am figuring I am going to do this in console or alike. I mean not needing an extra library for graphics, I mean something like this output
## ************
##*######### * *
#*#########* #*
************* ##*
*#########*##*
*#########*# *
*#########* *
*************

But i would like to do this programaticly.
Note that the # will be spaces

Note, I have all basic shape functions I created. Line, Rectangle Using Windows

It is alot like this
https://www.youtube.com/watch?v=RBUWh2e3cLw
Last edited on
Well, the other way I can think of doing this is implementing your own software renderer [1]. You can find many tutorials for this online. Actually, hamsterman, a member of this site, did exactly what you want to do some time ago [2], however the code is gone now (and so is hamsterman). Perhaps someone else here has kept the code and is willing to share.

That said, I would really go for the Direct3D/OpenGL + shaders approach. IMO, it's easier (but maybe this is
because I'm already familiar with modern OpenGL) and you'll pick up much more useful skills along the way.

[1] http://en.wikipedia.org/wiki/Software_rendering
[2] http://www.cplusplus.com/forum/lounge/19839/
Last edited on
I guess you're lucky. I found hamsterman's code hidden somewhere inside an old HDD backup.

Here's the source.zip file, base64-encoded:

UEsDBAoAAAAAALABUzwAAAAAAAAAAAAAAAAHAAAAc291cmNlL1BLAwQUAAAACABxAVM8RwIMIJcEAABDDQAAEwAAAHNvdXJ
jZS9ncmFwaGljcy5jcHDlV21P20gQ/pxI+Q+jnhStExNiV1WrmCChUMpJ4UWQ9igIIa/ZEEvGjuwNsZ3y32/2xbGdBNB9Pg
ns8cyzz4xnZteTv/zQCxaPDD49xe585ntJb/ap1Ww1vShMOPghhyUM4VvfhBne7S9Oq5nweOFxSC79dAXJLIo5eFEQxQ5Mg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AAAAAAA
c291cmNlLwoAIAAAAAAAAQAYAABOIJvnsMoBLXqY2sse0AEtepjayx7QAVBLAQIfABQAAAAIAHEBUzxHAgwglwQAAEMNAAA
TACQAAAAAAAAAIAAAACUAAABzb3VyY2UvZ3JhcGhpY3MuY3BwCgAgAAAAAAABABgAAO/KVOewygEtepjayx7QAS16mNrLHt
ABUEsBAh8AFAAAAAgAcQFTPDcOvJYoAQAATQIAABEAJAAAAAAAAAAgAAAA7QQAAHNvdXJjZS9ncmFwaGljcy5oCgAgAAAAA
AABABgAAO/KVOewygEtepjayx7QAS16mNrLHtABUEsBAh8AFAAAAAgAhgBTPOsvr3T8AQAAuAoAAA8AJAAAAAAAAAAgAAAA
RAYAAHNvdXJjZS9tYWluLmNwcAoAIAAAAAAAAQAYAAAWV03msMoBLXqY2sse0AEtepjayx7QAVBLAQIfABQAAAAIAGi+Ujx
xoxIYIAMAAMsOAAAQACQAAAAAAAAAIAAAAG0IAABzb3VyY2UvbWF0aHMuY3BwCgAgAAAAAAABABgAAOLOfuSwygEtepjayx
7QAS16mNrLHtABUEsBAh8AFAAAAAgAcQFTPDREEahHAQAARgQAAA4AJAAAAAAAAAAgAAAAuwsAAHNvdXJjZS9tYXRocy5oC
gAgAAAAAAABABgAAO/KVOewygEtepjayx7QAS16mNrLHtABUEsFBgAAAAAGAAYARAIAAC4NAAAAAA==

You can use an online service or the following ruby script to get the zip:

require 'base64'

puts 'in filename: '
ifn = gets.chomp

puts 'out filename: '
ofn = gets.chomp

File.open(ofn, 'wb').write Base64.decode64 File.open(ifn, 'rb').read
Last edited on
....

Did you just post a zip file as text on a message board?

....


Ever heard of dropbox?
Well, you did see what happened to hamsterman's original file on media fire. It's slightly more difficult for this to happen again now. I guess I could also upload to a file sharing site for convenience (go ahead and do it if you want).
Thank you verry much, i will try it. And, please, next time if you can, use Dropbox or its counterparts. I will get back to you. Thank you guys.

Update: As I have no way of using ruby, what online service should i use, i have not found what you are talking about.
Last edited on
I googled online base64 decode and got this as the second link:

http://www.motobit.com/util/base64-decoder-encoder.asp

Paste the text, check decode and export to a binary, enter source.zip as the filename and then hit convert.
For some reason the code isn't compiling correctly, but I might be able to create the missing files, classes, n iorn out errors. Thank you
I had no problem at all building with Code::Blocks and TDM-GCC 4.7.1 (the middle choice for windows here: [1]). Mind though that the code is windows-only, so if you're on a different OS you'll have to tweak a couple of things (check out hamsterman's thread for more details). However, there are no missing files or classes. Everything you need is right there. Just make sure you create a new project in your IDE and add all the source and header files properly before building. If you need more help, post your IDE / compiler and the exact errors you're getting.

[1] http://www.codeblocks.org/downloads/binaries
Last edited on
Builds and runs under VS 2005 without modification. Create a console project and copy the files in.

Very cool.
Last edited on
I am using code blocks with MinGW on a windows computer. I am getting strange output

undefined reference to `Vector::Vector(float, float, float, float)'|

This happens about 50 times.
You probably haven't properly added the files to your project.
Your project tab in codeblocks should look like this -> http://imgur.com/VORmVLp
Thank you, it does currently work now and I thank you all.
Topic archived. No new replies allowed.