Archived

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

old school style with new gfx ways?

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

hey all, i used to do some graphics programming, but it was where the screen was one big array and i only used 256 colors. with the new things already out and kicking, directx or opengl, id still like to get back to the big-array approach, but i would like to up my color-count some. im basically looking for some advice. im not wanting to do anything 3D at all, and my goal is just to produce a really simple 2D game thats playable on a windows machine. id like to be able to program my graphics using the big-array approach, but with RGB values (5, 5, 6) or something similar. what is the simpliest way to go about doing this with either directx or opengl? thanx in advice. =) - jeremiah http://inlovewithGod.com

Share this post


Link to post
Share on other sites
Use DirectDraw (7.0), it is perfect for that. You allocate one or more surfaces, which you can lock and get a pointer to and manipulate in anyway you wish.


Share this post


Link to post
Share on other sites
quote:
since microsoft has released version 8, does that still allow me to use the version 7 direct draw? if not, where can i get version 7?


Yes.

Another option, is to get a DOS compiler (like DJGPP) and then use SVGA modes, high-res and color.

Share this post


Link to post
Share on other sites
quote:
Original post by keethrus
since microsoft has released version 8, does that still allow me to use the version 7 direct draw?
Yes, all DX versions are required to support all previous versions.
quote:
if not, where can i get version 7?
You don''t need to get anything, but as DirectDraw isn''t a part of DirectX anymore the documentation has been excluded from the SDK since 8.0. But you can download it from here: http://www.microsoft.com/downloads/release.asp?ReleaseID=25680&area=search&ordinal=3 (Dx7Docs.exe, 14.4mb)


Share this post


Link to post
Share on other sites
Allegro is also a good library for doing that kind of thing. In my high school we used that library to learn graphics stuff. It has a very old-school like feel to it. If you are dedicated to using VisualC++ then you may find it a bit of a pain to get all set up with it. It was designed for DJGPP, so that is by far the easiest compiler to set it up on. But, if you don''t mind DJGPP then this library is great. It is also fairly portable. On linux you won''t have to change any of your code to compile.

be pround to be out of your mind

Share this post


Link to post
Share on other sites
thanx for all the replies.

im planning on using a windows compiler, not dos, and i just want a pointer or two to the screen and a secondary buffer, so i can program all my gfx stuph myself, since its simple and 2D, its fun to make the effects and everything. :-)

quote:
You don''t need to get anything, but as DirectDraw isn''t a part of DirectX anymore the documentation has been excluded from the SDK since 8.0. But you can download it from here: http://www.microsoft.com/downloads/release.asp?ReleaseID=25680&area=search&ordinal=3 (Dx7Docs.exe, 14.4mb)



so i can just download the DirectX 8.0 SDK and it will allow me to compile DX7 DirectDraw stuph?

- jeremiah

inlovewithGod.com

Share this post


Link to post
Share on other sites
i checked out www.mingw.org and its actually quite good, a freeware windows compiler instead of the sometimes costly "name brand" ones.

thanx for the link to the DX7 download, much appreciated. :-)

i looked at OpenGL /GLU today, and while i definately do not want to start any GL/DX debates (*sigh*), i am curious as to which would be the simpliest to use for what im doing. -- basically what i need is a pointer to the screen, a function to print a bitmap rotated (textured quad i suppose?) at any given transparency, and a function/way (if one exists) to plot individual pixels (for my self-created gfx functions i'll make) at any given transparency. the first (pointer to screen), both offer im assuming; but which offers easier methods for the last two options i need? (easiest = setup, actual act, etc).

thanx for all the useful links and information! :-)



- jeremiah

http://inlovewithGod.com

[edited by - keethrus on November 20, 2002 2:54:53 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Try fastgraph, It''s better for what you are doing than any of these libraries mentioned. http://www.fastgraph.com

Share this post


Link to post
Share on other sites
quote:
Original post by keethrus
so i can just download the DirectX 8.0 SDK and it will allow me to compile DX7 DirectDraw stuph?
Yes. As stated, all versions are required to support all previous versions. That includes the SDK. You might hit a few compiler warnings, though, but usually you only need to define something similar to #define DXVERSION 0x0700.

Take a look at this article; it should get you started: http://www.gamedev.net/reference/articles/article1838.asp


Share this post


Link to post
Share on other sites
Give SDL (www.libsdl.org) a try too. It will let you draw directly to the surface, supports many different formats, and is easy to use. Not only that but your code will compile on any operating system for which sdl is available, linux, windows, macos, beos....

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Anonymous Poster
Try fastgraph, It''s better for what you are doing than any of these libraries mentioned. http://www.fastgraph.com


"The games you play are written with Fastgraph"

Share this post


Link to post
Share on other sites
i must say SDL seems like it is the best route to go. it gives me access to a "screenbuffer", and also handles input, audio-output/mixing for me as well. it supports 32-bit pixels, which is the route im going. and it works for lots of different platforms. =)

the only things left is drawing a rotated bitmap (like a function to draw a bitmap of a tank, top-down view, on the screen at a given angle - with alpha blending). it has to be fast, because its going to be called a lot (tanks, missles, etc).

can anybody point me to how to find the result pixel when you have the original pixel, and the new to_be_put_on_top pixel (RRGGBBAA)?

also, any of you have a fast draw_rotated_bitmap function out there, or link to one? i could modify it to support alpha blending myself if need be. :-)

thanx for all the help so far. =)

- jeremiah

inlovewithGod.com

[edited by - keethrus on November 22, 2002 4:46:36 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by keethrus
also, any of you have a fast draw_rotated_bitmap function out there, or link to one? i could modify it to support alpha blending myself if need be. :-)
You should see if you can get a hold on MindWipe, he braged some time ago about some ultra-optimized assembly rotzoomer he made




Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you use SDL, maybe this helps:

http://www.ferzkopp.net/Software/SDL_gfx-2.0/index.html

or have a look at

http://www.libsdl.org/libraries.php

Share this post


Link to post
Share on other sites