User | Post |
BakedBeans
 
   


  
 
 
Since: 05-03-02 From: Vancouver Rating: 10 (400 pts)
Since last post: 8161 days Last activity: 8091 days
|
|
On my hunt for programming libraries to make my game(s) that I do myself easier, I came across this pretty functional graphics API library called Allegro.
http://www.allegro.cc/
some of you may have heard of it. It's basically if you want to be able to draw graphics but don't want to learn the complexity that is DirectX or OpenGL, just use this library to do it for you.
Here's some sample code to initialize a graphics window and put something on the screen:
allegro_init();
set_color_depth(32);
set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0);
BITMAP* video_buffer = create_video_bitmap(800, 600);
show_video_bitmap(video_buffer);
BITMAP* image = load_bmp("picture.bmp", NULL);
masked_blit(image, video_buffer, 0, 0, 0, 0);
It has API that is as basic as the old-school bitblitting, up to the latest 3D hardware rendering support (for those who are picky about performance, using polygons to render your 2D is much much faster then blitting ).
This is just for those interested in making their own games. It reminds me a lot of the API I wrote myself during a school project (well... maybe not as large as theirs ~_~).
Remember! There's no need to program something that's already been done  |
Sasami
Goddess in Training
 
   


  
 
 
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7697 days Last activity: 7697 days
|
|
DirectX is incredibly powerful and incredibly easy to learn... if you want to be serious about making something good I would suggest learning it... and uh... blitting via hardware using hardware acceleration through directx... nothing could be faster, all you are doing is direct copies of bytes of arrays to other memory locations in vram, then doing a pageflip, which takes 2 or 3 lines of assembly to move the backbuffer to the screen  |
Avaj
 
   

  
 
 
Since: 06-04-02 From: Washington
Since last post: 8238 days Last activity: 8238 days
|
|
DirectX is the way to go... Nice avatar pic btw Sasami =) |
Sasami
Goddess in Training
 
   


  
 
 
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7697 days Last activity: 7697 days
|
|
thanks  |
MingShun
 
   

  
 
 
Since: 05-10-02 Rating: 10 (400 pts)
Since last post: 7745 days Last activity: 7745 days
|
|
Yeah, Direct X is powerful, but very confusing too...
The Tutorials will only take you so far. But, I think it's easiest to think of Direct X as a bunch of commands that you tell your compiler to perform. Then you just have to look for the right commands to use.
Funny, I thought Allegro was only for the Borland C++ Editor that I used in high school. I think the compiler was version 3.0... Does it work for Visual C++?
--------------------
Wish I had a sig pic....
(edited by MingShun on 08-13-02 05:42 PM) |
Sasami
Goddess in Training
 
   


  
 
 
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7697 days Last activity: 7697 days
|
|
DirectX is a standardization that will work with any piece of hardware, I doubt you want to write your own stuff to access it ; |
KaworuShiro
 
   

  
 
 
Since: 06-05-02 From: Palo Alto, California
Since last post: 7879 days Last activity: 7879 days
|
|
not quite all, nearly all. I can only advise that you be weary with DirectX and SGI's Cobalt chipset, last time I fooled around with DirectX and their Cobalt card, I got some kooky renders.
-------------------- ~_~ |
MingShun
 
   

  
 
 
Since: 05-10-02 Rating: 10 (400 pts)
Since last post: 7745 days Last activity: 7745 days
|
|
Got a screenshot? Or was it a nice blue screen with some weird words on it?
-------------------- Wish I had a sig pic.... |