Jump to content
  • Advertisement

Archived

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

2d Graphics without requiring an OS

This topic is 5186 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

OK, so I wanna make a small little game without it requiring an OS to play, meening you pop in a floppy disk to get to the DOS prompt, and then just run the game. But first I need to know what kind of graphics that I can work with withot an OS (of course directX wont work, and I''m guessing neither will OpenGL, but how about SVGA stuff? I know Mode 13h would, but thats too ghetto for what I want to do. So my question is would SVGA be the best way to go about things, or is there something better for 2d graphics without requiring an OS?

Share this post


Link to post
Share on other sites
Advertisement
First of all, "the DOS prompt" is a level of OS. The OS is what gives you things like keyboard and mouse input, graphics capabilities, etc. Without an OS of some form you cannot do much beyond very basic interactions with the BIOS, which is slow and not adequate for games. Even SVGA-level graphics require a fair amount of driver logic to be present.

Basically, to do this, you would have to write enough of an OS to build your game on top of. In other words, you can''t not have an OS - you can only disguise the OS as a game and not let any other programs use your OS-level code. This is, first of all, very difficult. If you are asking questions about low-level graphics I do not think you''re ready to be playing with writing an OS yet. Secondly, this will be insanely hard to fit on a floppy disk. Third, this is very dangerous. All it takes is one incorrect blurb of assembler (yes, you would need to use a lot of assembly language to do this) and you''ve lost everything on your hard drive.

I would very strongly suggest you consider why you want your game to do this, and then consider alternative routes to achieve a similar result. Writing a nontrivial OS is a daunting task to begin with; tuning it to fit on a floppy and have enough power to run a game on a wide variety of systems is not something I''d advise a lone programmer to try, particularly not one who doesn''t have prior experience writing OS-level code.



PiQ Software - Tiny KeyCounter - Freon 2/7 Raytracing Accelerator

Share this post


Link to post
Share on other sites
The question you should be asking yourself is... what user would want to run such a game?

For one, I wouldn''t want to install a very low-level program to run a game on my computer: I have Windows and there are plenty of games available for it. Furthermore, someone passing off a self-contained OS/Game package for a 2D game sounds unreasonably suspicious to me. If running a 2D game in Windows proves to be too difficult for a programmer to acheive, I would never even consider installing something that works at a very low level with my PC to play a game...

I think the OP meant DOS as a basis for programming. Well, I certainly hope so.

Share this post


Link to post
Share on other sites
ehehe, yeah, basicially I meant starting with DOS, I didn''t plan on making my own OS or anything, I didnt actually plan on actually making a game for anyone else to play, I was just bored and wondered If I could do it, I know OGL and Dtx and all that good Win32 and MFC stuff, but I wanna try and escape the linux and windows stuff for a while, I already know how to do Mode 13h, but 320x200 in 256 color sucks, I was wondering what the next best thing is without needing Linux or Windows, Im guessing SVGA would be it?

Share this post


Link to post
Share on other sites
You''d need to write a driver layer and a memory manager before even thinking about using SVGA. As ApochPiq and Runelancer hinted, this probably is very difficult. If you do decide to write your own driver system, that may take years (and still not work robustly).

I highly recommend OpenGL or Direct3D for you.

-Nik

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Try the OpenWatcom compiler.

http://www.openwatcom.org/product/features_content.html

You can target 16 bit and 32 bit dos. It has a dos extender (the popular dos4gw).

It''s been a loooonnng time but I do believe you want to use any VESA modes that may be supported by your video card. VESA bios extensions comes to mind. It supports up to 24 bit color and much higher resolutions.

It''s been years and all my old code and docs are long since lost in a maze of backups and archives across defferent media types. But it was fun

Share this post


Link to post
Share on other sites
oh alright, thanks guys. So instead of doing SVGA programming, i could out Allegro and it already has all that stuff done for me and works in DOS and Unix, I think that would be my best bet.

Share this post


Link to post
Share on other sites
Screw allegro. SDL is faster, and more low level, without being stupidly confusing like DirectX. www.libsdl.org Besides every flaver of os (dozens supported) it even has code for consoles, like Dreamcast. It's incrediably robust, and perfect for any 2d(or 3d game because it supports OpenGL).

The true general first seeks victory, then seeks battle
- Sun Tzu


[edited by - drakkcon on March 8, 2004 9:17:25 PM]

Share this post


Link to post
Share on other sites
You know, you could take out the Linux code, rip out most of the niceties and compile a minikernel, and use framebuffer mode to probably get some pretty nice effects. I don''t know how well Linux''s framebuffer mode actually performs, and if it is worth using over SVGA or Mode 13h, but it might be worth a try.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!