Menu

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.

Show posts Menu

Topics - quick2code

#1
I'm having problems with KeyHit that Gernot created. I want to press a key and start a sprite moving. I don't want the sprite to stop until I press the same key again. What I do doesn't seem to work. Here's the code. Thanks for any info.
Code (glbasic) Select

KeyHitUpdate()

IF KeyHit(57) = 2
    locX = locX + dirX
ELSE
    locX = locX
ENDIF
#2
     I'm having so many issues with converting source code from books and such. Something simple as bouncing where you multiply a variable by -1 to change direction doesn't work.

    Also, programming a path for a sprite is extremely weird in GlBasic. I tell the sprite to move to a point, stop and move to another. For some reason, the sprite jumps all the way back many pixels. I have to figure out a number to subtract from x or y to make it move smoothly.

   Kitty, could you please create a bunch of movement examples for 2D like, bouncing, point to point, sliding, stopping at a point, screen wrapping, etc. The examples did not help. I don't want anyone to do the work for me, it's just that GlBasic has its own way of doing things and it's frustrating trying to figure it all out. (English please.) Thank you.
#3
I just wanted to know if anybody tried any of the 3D demos on Iphone. What I want to do is keep my Windows PC and use that for developing games with GlBasic, then buy a Mac laptop and compile for the Iphone. I have some questions:

Will a new skinned 3D file format come about soon?
Will Lua scripting work on Iphone?
Is the 3D engine stable enough to make some games?
What happened to Newton physics?

I enjoy low poly game development and I really want to use GlBasic for cross platform design. Thank you for any info. 
#4
I think GlBasic needs a guaranteed physics engine. I know Newton was attempted but with the IPhone option, wouldn't something like ODE be a better option, and is it even possible?

Also, GlBasic can import Blender files, but I was wondering if it will ever get to a point where the import can recognize Emptys' and Curves. I imagine using Blender as THE level editor for my game. I place an Empty where doors turn and of course, Curves can aid in paths for characters and cameras.

With the new particle system on the way, all that's needed is a stable GUI(DDGUI?) + possible scripting extension, and hopefully get the 3D up to or beyond the Blitz3D level. Thanks.
#5
GLBasic - en / IPhone 3D
2009-Jul-18
  I haven't heard if the 3D functions of GlBasic will be usable on IPhone. I figure they will be.

  Also, wasn't there some type of scripting language available for GlBasic, one with an OOP syntax. The language BriskVM 2 is usable in C/C++ so I'm figuring it and any other C compatible software are possibilities for GlBasic. (Lua and Python?) Thanks for any info.
#6
GLBasic - en / OpenGl Syntax
2009-May-08
Would it be possible to have the OpenGl keywords also appear in the Auto Completion(Ctrl+Space) window?

J2ME can import images as arrays of integers so there's a way to simulate color palette swapping(change sprite colors in code). Can GlBasic support this in the future? And image reflection and rotation can be done in OpenGl so I'm thinking GlBasic could gain this ability, which would seriously cut down on the amount of images/resources required for a game.

And I'd like the final word on the whole Floating Point thing. First I hear that the mobile compilers have an integer foundation. Then I hear that GlBasic is based on Floating Point. The new INTEGER functions are great but how is that gonna help with a screen full of rotating, scaling, smooth moving, and pathfinding sprites? Especially if GlBasic is all Floating Point.

Everything else(namely IPhone) seems to be heading in the right direction. Thanks for any info.
#7
Good day,

   I would like to know, from the people who have designed applications for Smartphone and PocketPC about the speed and functioning of GLBasic creations. Mainly the rotations, scaling, sprite count and overall stability/speed of the applications. I think GLBasic desperately needs some type of fixed point functioning to be taken seriously for mobile. I'm just about to buy an HP Ipaq and do some serious game dev for it. And another thing, there's a new Windows Mobile 7 coming soon and alot of the functionality of WM6 has been either changed or discarded. How will GLBasic keep up with the loss and replacement of graphic libraries? Thanks for any info.
#8
Can GlBasic play mod/tracker music on the PocketPC? The docs said any platform with the required codecs can play certain files. From what I know of other SDK's this might have to be something native to GlBasic to be possible. Thanks.
#9
Good day,

    I was under the impression that the new version 6 of GlBasic would allow a sort of fixed point implementation with the Integer functions. Is this true or do I still have to make my own fixed point library for mobile games? I'm thinking integer + GlBasic's rotation/scale functions are all I'll need.

I was wondering how some of you implement a KeyHit function where one press of a key = 1 action instead of a constant stream. Would a timer or loop be better?

Last question, what is the definitive map editor for GlBasic? I've had Mappy for a while and the Beta version of the loader is good and all but it doesn't seem to be updated and collisions are a requirement to me. Thanks for any info.
#10
One thing I haven't figured out yet is how Z-Order works with images in GlBasic. How do you put one image in front of or behind the other?

Also this may be a silly question but I was wondering if palette swapping can be done with GlBasic. This is the function in old school arcade games where sprites were different colors on different levels by loading a different palette for each. I heard this wasn't possible with 16 bit color and up but the Allegro library and SDL can do this. Thanks.
#11
This is the first demo that I'm actually proud of. I know it can be optimized much better with arrays and such. I did the math but I don't really understand it. Sorry if this post is trivial.


Code (glbasic) Select

// --------------------------------- //
// Project: Ammo Types
// Start: Tuesday, October 28, 2008
// IDE Version: 5.360

GLOBAL LocBulletY
GLOBAL ScreenX, ScreenY
GLOBAL fontX, fontY, bullSizeX, bullSizeY

ScreenX=640
ScreenY=480

//Bullets starting point
LocBulletY=(ScreenY/2)

SETSCREEN ScreenX, ScreenY, 0
LIMITFPS 60

SETTRANSPARENCY RGB(199, 200, 255)

LOADFONT "FirstFont.png", 1
SETFONT 1
GETFONTSIZE fontX, fontY

//Put string in variable and get its length
Message1$ = "Left/Right Control moves bullets"
wordLen1=LEN(Message1$)

Message2$ = "Space temporarily lowers bounce"
wordLen2=LEN(Message2$)

LOADSPRITE "Bullet.bmp", 1
GETSPRITESIZE 1, bullSizeX, bullSizeY

//While Escape key is not pressed
WHILE KEY(01) = FALSE

PRINT Message1$, (ScreenX/2)-(fontX*wordLen1)/2, 100
PRINT Message2$, (ScreenX/2)-(fontX*wordLen2)/2, (100+fontY)


bulletBounce()

SHOWSCREEN

WEND

END



FUNCTION bulletBounce:

GLOBAL bulletDir = 1
GLOBAL bounceLimit

//Move bullet
INC LocBulletY,bulletDir

bounceLimit=TRUE

//Set limit ball can bounce
IF bulletDir>20
bounceLimit=FALSE
//Space key lowers bounce
IF KEY(57)
bulletDir=bulletDir-5
ENDIF
ENDIF

//Make bullet bounce
IF bounceLimit
bulletDir=bulletDir+.5
ENDIF

//If bullet goes past top or bottom, reverse
IF LocBulletY>ScreenY

bulletDir = bulletDir*-1

ELSEIF LocBulletY<0

bulletDir = bulletDir*-1

ENDIF

LOCAL bulletStart=20 //Starting position of bullets
GLOBAL bulletSpace=0 //Spacing increment



FOR x = 20 TO 200 STEP bulletStart //Draw several bullets


//Initialize bullet\
DRAWSPRITE 1, (ScreenX/2-(bullSizeX/2)*bulletStart)+(x+bulletSpace), LocBulletY

//Left and Right Control moves all bullets
//Beyond that, don't ask
IF KEY(157)

IF bulletSpace<(ScreenX/2-(bullSizeX)*bulletStart)+(bullSizeX/2*bulletStart/2)
bulletSpace=bulletSpace+1
ENDIF

ELSEIF KEY(29)
IF bulletSpace>-(ScreenX/2-(bullSizeX/2)*bulletStart/2)+(bullSizeX/2*bulletStart/2)
bulletSpace=bulletSpace-1
ENDIF
ENDIF


NEXT


ENDFUNCTION


[attachment deleted by admin]
#12
Good day,

    I was wondering if there will be more math functions with GlBasic. Some of the books I have on AI and other 2D game programming issues require ATAN2 and others. SmallBasic has a massive amount of math functions, although I don't know if any of them are required for game development.

Also, with the new Natural numbers and the coming BYTE commands, can we have more working examples, like tiled levels, platformers, save system, level loading and such? Thanks for any info.
#13
Good day,

   I recently purchased GlBasic and I've been making great progress. But I can't seem to convert any known Time Based Animation code I have to be GlBasic friendly. I'd like to slow down the animation of images even with the FPS set at 60. I've been trying for hours, and I don't see any example code in the Samples folder. Can somebody show me an example? I'm not sure if this is the right place to put this request. Thanks to anybody for any information.
#14
GLBasic - en / Update 5 to 6
2008-Oct-06
Hi. I'm just about to purchase GLBasic. I searched the forums and didn't find anything in regards to upgrade pricing. If I purchase GLBasic now do I get the free upgrade to the brand new Version 6? Are there free upgrades forever? I'm real interested in the new natural number functions and for portable devices, this is the clincher for purchasing GLBasic over a couple of other programming languages. Thanks.