🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

a little help with game programming

Started by
26 comments, last by Arkon 23 years, 10 months ago
yeah i noticed the GGI later
and didn''t think to edit my msg
oh well...

hmm if svgalib changes res EVERYONE can do it too...

well i saw the svgalib source..
so it will take a while to learn linux
hehe

so thanks you all for helping me

i hope i''ll write a few tutorials later
but never know ;]

Advertisement
Sdl is the way to go , I am in the process of making a wrapper to mask some of the mundane Tasks and tweak it to my liking . Even tho , its still very portable and easy to use , check out their site I think its www.sdllib.org . Trust me man , after learning how to plot the pixel , its gonna be , how do I read input , how do I rewrite the keyboard handler , how do I play sound how do I ................., why reinvent the wheel ? According to the Law of diminishing returns , in programming , the Time taken to complete a project is exponetially propotional to the complexity of the problem. </b>
I was influenced by the Ghetto you ruined.
hmm http://www.sdllib.org doesn''t work!

what is it about?
The link doesn''t work because it''s www.libsdl.org
joeG
Well, you want to know how to switch to mode 13h and plot a single pixel?

I''ll give you the sample code using DJGPP and Allegro:

#include "allegro.h"int main(int argc, char *argv[]){ BITMAP   *buffer;  allegro_init(); install_keyboard(); // setting up graphics mode. let it be detected by allegro, // because it searches for the best (fastest) available set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0); // resolution: 320x200, 8bpp...we don''t need any virtual // screen, so don''t intitialize it  // now we''ll create a back surface (no virtual screen!) // we''ll blit this back surface onto the screen later on. buffer=create_bitmap(320,200); clear(buffer); // clear it in order to prevent distorted pictures (weird // pixels) put_pixel(buffer, 1, 1, 15); // now one pixel (usually white with default palette) was // plotted onto a buffer bitmap  // now blit the buffer bitmap onto the screen blit(buffer, screen, 0, 0, 0, 0, 320, 200); destroy_bitmap(buffer); // we don''t need it anymore while (!key[KEY_ESC]) {} // wait until ESC is pressed allegro_exit(); return 0;} 


So. That''s it

Yours,

Indeterminatus

--si tacuisses, philosophus mansisses--
Ooops...the message above was marked as "unregistered". Well, it was from me

Yours,

Indeterminatus

--si tacuisses, philosophus mansisses--
Indeterminatus--si tacuisses, philosophus mansisses--
well thanks..
but could i see allegro source code?
i mean if i''ll dl it..does it come with the source code too?
I believe its a source only distro you have to compile it yourself but that may have changed since I used allegro.

< A HREF="http://users.50megs.com/crazyvasey/">My Homepage

This topic is closed to new replies.

Advertisement