BASIC

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Yodaman Jer

Pages: [1]
1
Hey Gernot,

I've been playing with GLB for a bit now and I was just wondering how hard it would be to create a set of commands that create 3D objects?

What I mean is, rather than the user developing their own functions for  creating spheres, cubes, torus' etc., they could simply type in...

Code: GLBasic [Select]
//Create a sphere
CreateSphere(objNum, objSize)

Instead of...
Code: GLBasic [Select]
FUNCTION CreateSphere: num, r, n, col
LOCAL i,j, theta1, theta2, theta3, pi
        pi = ACOS(0)*2
        IF r < 0 THEN r = -r
        IF n < 4 THEN n = 4

        X_AUTONORMALS 2 // smooth edges
        X_OBJSTART num
        FOR j=0 TO INTEGER(n/2) -1
                theta1 = j * 2*pi / n - pi/2;
                theta2 = (j + 1) * 2*pi / n - pi/2;
                FOR i=0 TO n
                        theta3 = i * 2*pi / n;
                        X_OBJADDVERTEX  r*COS(theta2) * COS(theta3), r*SIN(theta2), _
                                                        r*COS(theta2) * SIN(theta3), i/n, 2*(j+1)/n, col
                        X_OBJADDVERTEX  r*COS(theta1) * COS(theta3), r*SIN(theta1), _
                                                        r*COS(theta1) * SIN(theta3), i/n, 2*j/n, col
                NEXT
                X_OBJNEWGROUP
        NEXT
        X_OBJEND
ENDFUNCTION // n

And then calling...
Code: GLBasic [Select]
CreateSphere(sphere, 18, 12, RGB(255,255,255))

It's just something that seems a little more user-friendly for beginners, especially those who don't understand geometry all that well (like me!). :P

The best part could be that the user could still manually create the objects via code instead of the compiler auto-generating it through one command, allowing for more advanced users more options.

What do other, more seasoned users of GLBasic think?

2
Hi everyone! It's been a while since I've posted here, and unfortunately I still have not purchased GLBasic. However, the discovery of the Samsung Galaxy Player has gotten my interest up again!

http://www.samsung.com/us/mobile/mp3-players/YP-G70CWY/XAA

It has a 1GHz processor, 512MB of RAM and 8GB of internal memory, with the ability to add a 32GB microSD card for even more storage. And here's the real kicker; it's got a 5" screen! Sure, it's not the most powerful device, but it looks like just the portable media player I've been shopping for, and it looks like a decent thing to start developing Android apps and games with. :D

Has anyone here even heard of this thing? Apparently it's been out since October but I have NEVER heard of it, nor have I seen one in any stores. Then again, it looks almost exactly like the Galaxy phones, so maybe my brain just skimmed over it? :P

What do you guys think about using it for app development?

3
Off Topic / Post your desktop!
« on: 2011-Oct-21 »
Hi all!

This is always a fun topic in another forum I visit from time-to-time. Everyone who wants to can post a picture (formatted nicely to fit the forums) and talk about theme packs/wallpapers and the like. It's just a fun little thing to do. :)

My desktop is attached below. The wallpaper was taken from a Google Image search and I just have the default Windows 7 theme, but I made the icons on my taskbar smaller to gain 10 more pixels of real estate. :P


[attachment deleted by admin]

4
Hi guys,

I've been using the trial version for a couple of weeks, and within the last week or so all of the text/font commands don't work like they used to. I can't load external fonts or even my sprites. All of the media is located in the appropriately named "Media" folder, and yet nothing works. Do these features disappear after a couple of weeks?

No hard feelings if they do. :P I definitely want to purchase GLB. :) I'm just trying to make sure I haven't broken anything on my system...I am running this on my laptop, but I plan on purchasing an iMac soon which I'll run Windows 7 alongside of for game development. :)

Also, while I'm at it, what version of OpenGL does GLB support?

EDIT: Oh gaaaawd, I feel so stupid. :P

I've been using the wrong slash symbol. I've been so used to using the forward slash (\) with DarkBASIC for the last three years that my fingers just automatically type that one in instead of the backwards slash. Sorry for polluting the forums, Gernot...:P

5
Hi everyone,

I never actually learned how to make 2D games.  :-[

I started programming in 2007 and immediately dived in to making 3D games and never bothered with learning how to make 2D games, particularly sidescrollers similar to Mario.  Can anyone tell me if there's any tutorials on making a sidescroller anywhere, for GLBasic? I've seen PeeJay's tutorial and it's helped some, but not with side-scrolling...

I also don't know how to make a map editor for 2D stuff (3D yes), but that's something I'll save for later! Right now, I'm more concerned with making my game sprites actually move across the screen.

6
GLBasic - en / Problems with "SETTRANSPARENCY"
« on: 2011-Oct-03 »
Hi all,

I can't seem to get the SETTRANSPARENCY command to work properly in a FOR-NEXT loop with "GRABSPRITE".

Break-down of my code:

First I'm using SETTRANSPARENCY to set black not to be drawn, then I'm loading my "landsprite.bmp" tileset.

Then I'm using a FOR-NEXT loop to break the tile into three separate sprites using GRABSPRITE. Before this, I use SETTRANSPARENCY again to set the black pixels not to be drawn.

Then I'm drawing a series of these freshly made sprites to "stretch" out my tileset and check for seamlessness. The problem? The black outline is clearly visible...


...but when I draw the original sprite, it's not there!


Full code...
Code: GLBasic [Select]
// --------------------------------- //
// Project: 2DGame
// Start: Tuesday, September 27, 2011
// IDE Version: 10.118

//Load our font
SETTRANSPARENCY RGB(0,0,255)
LOADFONT "Media/newFont.png",0

//Load our sprite
SETTRANSPARENCY RGB(0,0,0)
LOADSPRITE "Media/Sprites/landSprite.bmp",0

X=0
FOR A=1 TO 3
    DRAWSPRITE 0,0,0
    SETTRANSPARENCY RGB(0,0,0)
    GRABSPRITE A,X,0,40,40
    X=X+40
NEXT



//Set current font
SETFONT 0

//Main loop
WHILE TRUE
    //Draw sky-blue background
    DRAWRECT 0,0,800,600,RGB(0,150,255)

    //Draw a series of tiles
    DRAWSPRITE 1,0,600-40
    DRAWSPRITE 2,40,600-40
    DRAWSPRITE 2,80,600-40
    DRAWSPRITE 2,120,600-40
    DRAWSPRITE 2,160,600-40
    DRAWSPRITE 2,200,600-40
    DRAWSPRITE 3,240,600-40

    PRINT "A*Little*Epic",800/2-110,0
    PRINT "A Game By Jeremy Gardner",800/2-200,25
    SHOWSCREEN
WEND

I've tried putting the command in different places within the FOR-NEXT loop but nothing works. Can anyone tell me what's going on please?  :)

EDIT: It definitely seems to be with just the GRABSPRITE command, as I moved my code out of the FOR-NEXT loop and tried it that way, and it still gave me the black out line. :\

7
One of my biggest, incomplete projects to date (I've been working on the idea since 2009) thrives off of the integration of a built-in level editor to allow the player to build their own worlds, thus hopefully increasing the replay value.

I was just wondering if anyone here has made a 3D level editor with GLB? I've made plenty of them in DarkBASIC. I'm going to try to do it with GLB once I have the full version, and I'm excited because I think I could build my own custom meshes in the editor thanks to the "add vertex" commands. Has anyone done that before? I think it would be great for level editors!

If you have made a 3D level editor, can you post a screen shot or two and tell me how you did things? I've always loved level editors and they're always fun to code, especially in a new language! I'm going to try and make a 2D one later this week, I'll post back when I've got it running. It will be my first GLB program!  :good:

8
Off Topic / Introducin' Meself
« on: 2011-Sep-24 »
Hi everybody!

I just discovered GLBasic last night, and I must say that I'm very, very impressed by it!  I looked through all of the samples on the website and the Sphere Mapping one is what got me convinced to try this thing out. 

I'm not new to programming, I was previously using DarkBASIC for my game programming (and that was a nightmare on Windows 7), and I was just looking into Blitz3D when someone told me about GLBasic.  So glad I checked it out!

Has anyone made 3D games with it run on Linux, specifically Ubuntu?  If I can program my 3D game to run on Windows, Mac and Linux (and so far it looks like I can most definitely do that), I will be the happiest geek on earth! :D


Pages: [1]