LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-06-2003, 09:34 AM   #1
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30
Svga-lib C programming tutorials


Hey all,

I was wondering is anybody knows where to get some svga-lib tutorials?

I am developing games and I'd like to switch to Svga-lib based
I programmed in windows for a bit and made some pretty cool games
but I saw that linux doesn't have many games and since I like linux better
I'm gonna stick with games for linux.

LINUX ROCKS!!!!
 
Old 11-06-2003, 09:48 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Moved: More suitable where the Programming snobs like crabboy and acid_kewpie hangout..
 
Old 11-06-2003, 10:03 AM   #3
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Original Poster
Rep: Reputation: 30
Smile

Thanks trickykid I completly missed the programming forum
 
Old 11-06-2003, 01:25 PM   #4
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
...have you also checked, libsdl.org ..it's cross-platform and simple to use, and has a multitude of addon libs available :)

besides ..SDL RULES! ;)

Last edited by jhorvath; 11-06-2003 at 01:37 PM.
 
Old 11-06-2003, 02:14 PM   #5
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Original Poster
Rep: Reputation: 30
I tried the link but it gave me an error saying It can't conect to database.

But thanks anyway you gave me an Idea.
 
Old 11-06-2003, 02:52 PM   #6
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
...yeah that is odd, it was up just yesterday..<?>

the latest SDL (1.2.6) is on slackware.com/getslack (or your cd, if you have 9.1), pick a mirror and select a slack-9.1 tree under the 'l' (L) directory...you can install that if you'd like. i believe it comes with the html documentation that is found on libsdl.org, that gives some examples as well as good information :)

some recomended addons would be ..

SDL_image - useful for using images other than the native BMP support
SDL_ttf - for using True Type Fonts
SDL_net - ...networking, multiplayer

..those are probably mandatory for many apps :) , but they are seperate to keep the main SDL tree cleaner, smaller...

Last edited by jhorvath; 11-06-2003 at 02:55 PM.
 
Old 11-06-2003, 02:54 PM   #7
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Original Poster
Rep: Reputation: 30
thanks I'll try that.
Though I'm not using 9.1 I'm using 9.0
 
Old 11-06-2003, 02:57 PM   #8
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
i think that it should still install fine, if not ...the 1.2.5 found on the slack 9 cd will do as well..i think mostly fixes were made for various things that you probably won't need to worry about

also ,i edited the post above your last one ...i saw you posted before i could edit it...just some extra libs

..i saw your other post ...saying you were using C.. SDLs API is C but works also with C++ natively (in case you switch)...

Last edited by jhorvath; 11-06-2003 at 03:07 PM.
 
Old 11-09-2003, 02:13 PM   #9
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 417

Rep: Reputation: 31
Please try SDL, SVGA is eeeevilllll *wooggiieebooggieeee*
 
Old 11-09-2003, 02:20 PM   #10
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 31
svga is actually quite nice in a simple sort of way.

I'm actually writing a windowing system using it right now.
 
Old 11-09-2003, 02:29 PM   #11
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Original Poster
Rep: Reputation: 30
Thats was an idea my dad an I had kurt

Could you maybe show me how to handle keyboard input?
I know how to do something if a key is pressed.
But I don't know how to do something if a certain key is pressed.

Like :
I can draw a line across the screen if any key is pressed.
But I want to draw circle when the key A is pressed.?
How do I do it?

Thanks
 
Old 11-09-2003, 02:38 PM   #12
Kurt M. Weber
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 335

Rep: Reputation: 31
Check the value of the key that was pressed, and if it's the key A then draw a circle.

Of course, you'll have to write your own code to draw a circle since svgalib doesn't have any built-in functions for that...I recommend the algorithm at http://www.cs.unc.edu/~mcmillan/comp...e7/circle.html
 
Old 11-09-2003, 03:04 PM   #13
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Original Poster
Rep: Reputation: 30
I know how to draw a circle.
But I don't know how to check the value of the key pressed.
I'm having a hard time finding any tutorials and the man pages aren't much help.

If I could just know how to check the value of a key pressed.
 
Old 11-09-2003, 03:18 PM   #14
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 417

Rep: Reputation: 31
SVGA is evil because you have to run your programs as root.
I wouldnt trust a game with the integrity of my system.
 
Old 11-09-2003, 03:21 PM   #15
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Original Poster
Rep: Reputation: 30
It's pretty difficult but you can do a workaround so that a normal user can run them.
As soon as I find the doc I'll post it so you can read it.

Since I'm always logged in as root anyway it doesn't make much differnce to me anyway.


 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to learn programming languages like python reading tutorials? cyto Programming 25 12-25-2004 08:40 PM
Programming in Java, looking for a good place on the web for tutorials or books.... jmax24 Programming 3 04-18-2004 04:18 AM
Svga Thorgal Linux - Software 2 12-11-2003 03:16 PM
looking for programming tutorials / books, etc markus1982 Programming 18 03-12-2003 04:33 AM
svga lib & 3+ button MS mouse..help.. mavness Linux - Software 0 08-22-2002 01:30 PM


All times are GMT -5. The time now is 11:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration