Archived

This topic is now archived and is closed to further replies.

3d ascii engine !

This topic is 5537 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi girls&boys need some help! I want to create a 3d ascii engine...does that sound scary ? well first of all i am one of the not so good programmers . thats why i spent my time here in the forum .! I need some tips and tricks() The first thing what i want to create should be a simple square ____________ |..........| |..........| |..........| |..........| //////////// /////////// where to start ?what to do ? I thought of creating a simple array qube[6][6][6]: where i store my data ? I need your advice here at the beginning point !. So please help me If you think that sounds shit / tell me why ! Thanks for your advice nO

Share this post


Link to post
Share on other sites
if you dont know what you''re doing i doubt you can accomplish this.
a 3D engine is still a 3D engine.. whether it''s raster, vector, ascii, whatever.
it requires a strong knowledge of 3D math and theory.

-eldee
;another space monkey;
[ Forced Evolution Studios ]


::evolve::

''In C we had to code our own bugs. In C++ we can inherit them.''

Share this post


Link to post
Share on other sites
I know
But is it possible to simulat one ,before i make the absurdest funktions to get a 3d engine ?
i know that its not really working , i mean that you simulate 3d
but its possible ?
right ? or not ?
Nexus Question day ?
(Dont kill my dreams )(couldn´t sleep last night because of that idea)

NO


Share this post


Link to post
Share on other sites
What you need is a special ASCII poly filler; forget about the 3D stuff, as it's irrelevant. For now, focus on how to fill a given polygon (or perhaps triangle) using the ASCII character set.

This is really, really cool:
quote:
Original post by Michalson (in some other thread)

Original post by Yann L
I guess you'd need some kind of clever dithering to make it nice. But I have seriously not the slightest idea, if ASCII 3D can be tweaked to actually look good



Judge for yourself:

3D Rotating Cube with Plasma Texture

Its not by me (this is an *old* demo), though I've taken the liberty of compiling the source code into an exe for all the people out there that don't happen to have a copy of Turbo Pascal lying around. Make sure you hit ALT+ENTER to view it in full screen, the Windows text console was never designed to update this fast so it will look like crap if you run it in a window (I won't post screenshots as it only looks good moving).


[edited by - CWizard on October 19, 2002 11:46:31 AM]

Share this post


Link to post
Share on other sites
*cough* Could it be that this engine will ultimately have to render some ASCII fish, hmm ? *cough*

Anyway, a 3D engine is a 3D engine. ASCII or 1600x1200 at 32bit, it's the same thing. Actually, the ASCII version is even more complex than an engine operating in a graphics mode: it needs to calculate dithering, and use some smart character selection, in order to get good visual results.

If you already coded a software 3D renderer for graphics mode, it's pretty simple to convert it to a basic ASCII engine. Turn down the resolution, add dithering. But if you don't, then expect to work on it for the next year or so. You'll have to learn all the basic 3D theory, matrix processing, rasterization, etc.

/ Yann

[edited by - Yann L on October 19, 2002 12:18:56 PM]

Share this post


Link to post
Share on other sites
Hey thats nice !
I see clearer now ,
but the fog is still there!
First off all i should try to make a 2d array/[square] that circles around. is that stupid ?
creating an algorythm that copys me a character into a specific
position in the array to get the square !and then an algo to turn that square !
i´ll should try a little bit
maybe i have questions later on
thanks for you fast reply !!!
_this demo is really cool_
see you later
NO

Share this post


Link to post
Share on other sites
I don''t know if what your talking about is the rendering or the rotations. I don''t think you have any or much experience with 3D coding, and you should read up on that first; there''s plenty of articles here on GameDev. The ASCII part is just about the rendering, and comes down to drawing polys of different colors.

Share this post


Link to post
Share on other sites
Well 3d ? that all sounds so hard , but is it really so hard ?
I thank you for your answer .
I only want to get in it if i do graphics or asci shouldn´t be the problem !
i want to do that dam thing _ and if it will take five years !
Maybe your right that i should forget about that 3d thing for now , but i have to think about it every day and that makes me
weird .Its good to have some response
thats the good thing of that forum !! It gets you in the right direction !
Yesterday i created my font editor :
its only an aray font[26][6][6]
and what i thought the whole day is that
that thing defines a 3 dimensional space ( if i am wrong correct me) So the only problem is to get that thing on the screen ( that it looks like 3d !)Thats called rendering ?
right ? So i havo to create my rendering tool (3d engine)
thats my prob ! i guess _

Thanks for your quick
(answers)i think i spell that answers wrong (my english isn´t so good)sorry

Share this post


Link to post
Share on other sites
I must say, I don''t understand exactly what you''re going at. Is it that you want to write ASCII text that have a 3D-look? If so, then it''s a question about ASCII art. Otherwise, go and read some 3D-tutorials so you get a grasp of how it''s done, and our responses here will make more sense to you.

Share this post


Link to post
Share on other sites
Well ()
I just started reading about 3d
vector / matrix operations and so on......
I think i have enough response for know (project 3d ascii engine is dead for the next few weaks)(because i dont have the knowledge)
________** I guess i should come back when i have read those books about 3d ____ i will continue asking questions when i have started making my engine .
i thought it would be easy - but it isn´t.
an array defines a 3d space but a 3d engine is more complex.

Thanks guys for your time and for your patience
No

Share this post


Link to post
Share on other sites
Can you not render a 3D scene in memory the usual way and then pass it through a filter that looks at the image and outputs ASCII characters? There are a few ASCII mpeg player style programs around that do this kind of thing.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Someone''s actually done something like this already, that may give some clues as to how to go about it. (or may not)

It''s called Textmode Quake.

Yes, be afraid -- be very, very afraid.

The link is here http://webpages.mr.net/bobz/ttyquake/

What I believe they''re doing... and what I think you should try to do... is to, as other people are suggesting, is to make something in 3d... and then make the output from that into ascii...

Check around for some of the programs that turn an image into ascii and vice versa, and get an idea of how they do it (basically you''re dealing with translating brightness levels into various characters that contain about the same brightness level)

Hey, looks like someone did the same thing for unreal tournament check here: http://icculus.org/~chunky/ut/aaut/

Both of these, I believe, only run on *nix systems... I think they''re specifying a specific SDL driver that displays whatever you send to it in text mode.

But in any case, hope this helps.

-Ascent
http://www.unseenthings.com/

Share this post


Link to post
Share on other sites
Speaking of ASCII 3d engines...

Feeling a little perverted the other day (and, admittedly, it had something to do with ASCII fish) I''ve adapted my raytracer to render realtime animated scenes on a console.



Nexus, comparing the original raytracer to this sick version might demonstrate what the others are saying about taking an existing 3D engine and adapting it to render in ASCII; the only thing I really had to change was one final output routine.

Source & exe avail on my site.



www.coldcity.com
code, pics, life

Share this post


Link to post
Share on other sites
Heeeeeee
Ian
i have seen your homepage a few days before ! and have downloaded your talisman !!!
I have a few questions about that:
First how long have you been working on that thing ?
because i am also interrested in creating a new operating system for my computer ?
if you have some good tutorials about creating an operating system can you mail me that ?
thats all for now
thanks for your reply
no

Share this post


Link to post
Share on other sites
(Offtopic)

Hi Nexus,

Thanks

Talisman''s something I work on to take time out from larger projects; I find it quite refreshing to get right down to the bare machine when working on some huge object-oriented thing...

I actually have no idea how long I''ve been working it if you add it all up... I think I started Easter of last year though. But I really haven''t spent as long on it as that suggests.

The latest version (that I mention on the page) is far cooler than the early version that''s there to download; I should really package the latest incarnation up and put it on the site.

Brgrds,
I.

www.coldcity.com
code, pics, life

Share this post


Link to post
Share on other sites
quote:
Original post by NexusOrganicus
First how long have you been working on that thing ?
because i am also interrested in creating a new operating system for my computer ?
Hehe... prepare yourself to be occupied for the next decade or so. Really, you can make a minimal operating system for a specific computer, like the Amiga OS, in not that long time (half a year, perhaps?), if you are a great coder with lot of OS experience. But making your own OS, such as Windows or UNIX, will take many, many, many long years.

Share this post


Link to post
Share on other sites
Hi (off and on topic)
Cwizard !
What should i say now ?
I am not really good in programming thats true
i don´t wanna create a opsystem like windows
I wanna do fun stuff /
I am not saying that i have to do these things but i want to, so i will do them !by time
I just wanna learn how things work and try it for myself
i know that i takes a lot of time to create, for example a 3d engine or an operating system or what ever . But when you always tell the people that i takes years and years they never start doing these things ! They hang around and play with their compiler and stop at a point .Then everythings gone.
And asking questiond is the best way to learn !.
When you never ask how something works you will never get an answer.
It was very good to start that discussion about 3d because now i know that there is more to do then to create an array .!
Took my math-books searched in the internet (lineare algebra)
(matrizes) and so on .
Dont expect that i write a 3d render engine tomorrow
Don´t worry to much about the time !.

For me its a way to learn this stuff .
Maybe its stupid but its my way to get near these things.
And it really helps when people send you links or some example how they did it , how they went through all this .
Where to start and how to start and so on .
It would help me if you sent me some examples of that amiga op sytem you´r talking about that would be better than just talking about how long it would take to .........

dont take everything too serios ...( i am just a beginner and still dreaming) and i am thankfull for any information .


_________________**thanks for your reply**__________________
NexO


Share this post


Link to post
Share on other sites
Nexus, I think it''s great your asking questions, and I agree that one should always try to point to the right direction. My last response, about the OS, was perhaps a bit too discuraging, as it did sound like you didn''t like your current OS, and wanted to make a new one.

The Amiga OS? I hope you know about the Amiga computer, and the Amiga OS was, of course, its Operating System. It is/was a simple, bare-bone, OS as well as it was great and revolutionary at the time. The reason I used it as an example had to do with that it was a OS made for a specific piece of hardware, in contrast to Windows or UNIX, which must be able run on and handle every piece of hardware and combinations thereof, that exists on the PC market. I cannot give you any source, as it is copyrighted and not publicly available; although, it is quite easy to disassemble and decipher as most of it is written in assembly.

I shall try to point out some major parts of an OS:

  • Must be able to detect, configure and control the hardware in the computer.
  • Although not really part of the actual OS, it must have a File System.
  • A complete API which the OS itself as well as Applications can use to control the computer and access all of the OS''s functionality.
That the basics, then for a more advanced system, more stuff is needed:

  • GUI (and/or Shell) with a graphics API for programs to use to display stuff.
  • Virtual Machine Model. That is, to provade each process (program) with its own "virtual machine" of memory and hardware. This includes virtual memory, multi-tasking, paged memory etc.
  • Security Model, with users/groups with various privaleges.
  • list goes on and on and on and ...

Share this post


Link to post
Share on other sites
Huch
That sounds really hard !
_________________________
I think i should start with my 3d enging and read some books about matrices and so on ...........
The OP has to wait i think .
You are right when you say it takes years ....
But what about Dos ---
you only have the autoexec.bat config.sys and the command.com
right ? 3 Files to start a pc ( ups forgot the dos folder )
but if i reduce the possibility´s of my op it would be easier
to programm.___Just like an old game console.
Do they use assembly because of the speed ?

Cwizard thanks for your advice ,

Nexo
________________________________________________________________

Share this post


Link to post
Share on other sites
NexusO,

A simple operating system consists of three main parts.

Firstly, it provides a task scheduler to control which process is actually running in a given timeslice.

Secondly a memory manager is present to allocate memory to programs and ensure that no program can access memory it isn''t supposed to.

Thirdly, a support structure for applications is provided, so that they can perform functions like drawing to the screen. These system calls could be a dynamically linked library, an interrupt intercept routine, or something else.

However, you can get even more simple; DOS was originally just the third part of the above; it just set up a lot of interrupt handlers.

Talisman is at the level of DOS currently, in terms of features and complexity.

HTH,
I.

www.coldcity.com
code, pics, life

Share this post


Link to post
Share on other sites
I would recommend that you start your journey with something other than an OS . It is pretty hard, as you must start from the bare bones. For example, consider how your OS code is going to be executed. In normal case, it''s the OS that execute your executable, but in this case your code is the OS, and it can''t execute itself before it has been executed.

And you must code the first part of the OS in assembly, as there is probably no compiler out there that can compile for your custom OS. You will probably need to make your own compiler and/or extension to another compiler, if you want to code in C/C++ for your OS. Another option, is to emulate DOS or Windows programs, so you can make them in MS VC++ or similar.

It''s not those 3 files that make up dos (I think). Those are configuration and extension files, and not the core of DOS.

For fun, while I''m ranting here, I''ll try to explain some basics of the Amiga OS (which is the only OS I know inside-out).

On the Amiga, all the OS code resides in a 256 kB, 512 kB, or 1 MB ROM, located on the motherboard. This is only the core, not extensions and graphics etc. The content of the ROM is mapped into the end of the linear address space (the byte at address 0xFFFFFFFF is the last of the ROM). When the computer is powered up, a special chip initializes the processor and sets the program counter (the address of next instruction to execute) to an address in the ROM, which is the computer initialization code.

The initialization code will scan the hardware to determine and configure the computer model, processor model, memory banks, disk and hard drives, expansion boards, etc. It will then make the API ready. (All OSes are really a gigantic hierarchial and complex structure, plus the code to control this structure.) The Amiga OS are divided into several "libraries" (comparable to DLLs), where the main one is called Exec. Each library has a "base address" which points to a structure with a lot of interesting info about the library and system it''s concerned with. On "the other side" of the base address there is usually a huge "jump/function table" with jump instructions to the functions of that part of the API. So, the init code, will load Exec Library''s base structure into main memory, and store the address to the base in address location 0x00000004. So, an application will be able to get the "exec base" by reading that hard coded address, and from it be able to access all API functions of the Exec Library, which includes functions for opening every other library; Dos, Intuition, Graphics, Serial, Expansion, etc.

That did probably not make any sense to anyone not familiar with Amiga coding, but it could serve as a hint of a general idea of an OS, and I don''t have time to write any more .

A last note. I think it would be a great experiance for every coder, to try to make an OS. If you do, you will discover a great deal of thing you didn''t know you didn''t know, and hopefully learn much.

Share this post


Link to post
Share on other sites