Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 12 Nov 2019, 02:44
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
B4SDL v. 0.1: Basic with OpenGL and SDL support
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Thu 01 Feb 2007, 21:21    Post subject:  B4SDL v. 0.1: Basic with OpenGL and SDL support  

b4sdl-0.1.pup
http://p13.wikispaces.com/B4SDL

This is Davy's derivative of the BASIC programming language Basic4GL by Tom Mulgrew. It runs in Linux and supports much of what B4GL can do.

To run it, you'll need OpenGL support (see MU's 3DCC package) and SDL (including SDL_Image, again, see MU's 3DCC for ease). Note: Pizzapup 3.0 already has SDL, so you'd just need the OpenGL support if you run that.

It installs to /usr/local/share/b4sdl and links the binary into /usr/local/bin. Some demos are provided in /usr/local/share/b4sdl. To run them, open a terminal in /usr/local/share/b4sdl/ and do this:
b4sdl terrain.gb
Use the escape key to exit. Most of them use a combination of the arrow keys, space-bar, and wasd.


I compiled this from source in Pizzapup, so it doesn't need GLIBC 2.4 like the binary in Davy's package. If you wish to compile it yourself, download Davy's package at the above site to get the source. Then you'll need to either adjust the makefile or link some headers from in /usr/X11RC7 to /usr/include. I can't remember exactly what to do, because I compiled it last night and was too sleepy to form decent memories. You'll also need the OpenGL and SDL headers installed, including those for SDL_Image.


Keep in mind, this is just version 0.1. I haven't played with it much yet (just got it compiled last night) so I don't know the limitations exactly. As I understand it, input isn't completely working. I tried running some B4GL programs with it and it complained about certain commands. On the other hand, the demos it has look pretty nice.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib


Last edited by Pizzasgood on Thu 01 Feb 2007, 23:37; edited 1 time in total
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Thu 01 Feb 2007, 22:10    Post subject:  

you must apply the full path of a demo:

b4sdl /usr/local/share/b4sdl/simple.gb
b4sdl /usr/local/share/b4sdl/fps.gb
b4sdl /usr/local/share/b4sdl/sps.gb
b4sdl /usr/local/share/b4sdl/terrain.gb

Really impressioning... grr... why must I start a job on monday, it would be great to play around with the code Wink

Thanks Smile
Mark
Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6266
Location: Knoxville, TN, USA

PostPosted: Thu 01 Feb 2007, 23:36    Post subject:  

Sorry. I did mention that you should be in the directory, but I didn't word it quite right. I'll go fix that.

I've never used Basic4GL very much (mainly because I don't like Windows), but I've always liked it. It's a great way to learn OpenGL. Much better than trying to learn in C++. I played with it a bit before I started using Linux, and using OpenGL was really easy, especially since I was still used to basic back then. It's also nice because you can set things up much faster, for quick tests of some idea. That's why I was really glad when I heard about B4SDL. Hopefully I'll play around with it more, now that I can do it in Linux.

There isn't much documentation for B4SDL right now, but Davy says he'll do it soon.
davy wrote:
Basic4SDL is meant to be closer to SDL style commands than Basic4GL... I know I need to write some documentation, but basically...

keydown in Basic4SDL is like the ScanKeyDown in Basic4GL. SDL doesn't separate it's scan keys from regular keys.

If you look in the file "DavyFunctionLib.cpp" in the "FunctionLibs" folder you can see a list of the keycodes at the bottom. They are standard SDL keys.

I plan to write some documentation soon, but I've been busy lately. You can learn a lot by looking at the source, all of the "comp.addFunction" are function definitions, and all of the "comp.addConstant" are constant definitions.

My goal is to make it as similar to standard SDL usage so it will be easy for people to switch to/from C/C++ and SDL with Basic4SDL. Hopefully that will make it a little more of a learning tool.

Basic4SDL also has a few extra features like...

sdl_wm_togglefullScreen() which toggles window/fullscreen (during runtime)

sdl_wm_setcaption("Title", "Bar Title") sets the window title and bar title (during runtime)

WarpMouse(newX, newY) sets the mouse position

Most of the rest is the same... But I still plan to write out some documentation for it (and add more features soon)

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0804s ][ Queries: 13 (0.0319s) ][ GZIP on ]