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 - yaKC

Pages: [1]
GLBasic - en / Faster alternatve to GetPixel
« on: 2018-May-16 »
I've been working on a game for a few years using GetPixel, however I'm stuck at around 60 checks max per frame as it's really slow, I read that it transfers the framebuffer everytime you use it. Is there anyway to use Lockbits, or Getpixels (multiple) so that i only need to transfer once? Or perhaps a way using OpenGL?
I can use a 1 pixel sprite collsion as analternative with an image but this game really needs live info from the screen. not the whole screen just around a 32x32 area around the player.
Thanks in advance if anyone has a solution :D

GLBasic - en / Sprite Batching
« on: 2016-Oct-03 »
Does GLBasic batch sprites as i believe Unity does, or if not has anyone had any success in doing so?

Awesome language btw :D

GLBasic - en / Style of coding
« on: 2010-Jun-01 »
Can I just ask please about peoples style of coding, does anyone like I am doing (as a beginner) just code the whole thing in one file and not use functions, i.e. I make everything Global and have my routines just laid out and skipping them sometimes by GoTo and using labels... I know this is probaly bad programming pratice and I did have experience on SAM Coupe 8-bit with procedures and similar in AMOS on the Amiga but I am the only person coding like this as I learn GLBasic, will I eventually have to code my projects again if they grow too large due to this?

Also, would be very inerested to know how silly it is making everything global, especially if I'm guessing correctly by not using functions and having my projects just in one long laid out way I probably don't need to make my variables Global ?

And when I've Dim'ed arrays I get an error if I then try to make that array Global IIRC from when messing around, does the dimensioning of an array make it automatically global?

thanks for any views :)

edit:- just so I don't need to make a new topic...

Is it possible to load jpg's into GLBasic in anyway, or GIF's? I'm writing a picture viewer (and gonna be starting an art package soon) and whilst it's nice to load BMP's (especially a few) and be able to see the type of memory they will need internally the thought of not being able to view or load jpg's and GIF's is a bit worrysome to say the least.

GLBasic - en / Help for a newby please
« on: 2009-Dec-13 »
Hiya, just started using GLBasic a couple of days ago and already love it, however as can be expected I'm experienceing some rather weird problems.

Firstly, I have a few lines such as the following:-

IF c<>14062080 THEN LET p=p+1

and everything was working perfectly, and all of a sudden on
one of the lines it is now saying :-

(70) error : IF without ENDIF / THEN

even though it was working...

in a similar manner if i try

IF c<>14062080
LET p=p+1

or indeed any other IF ENDIF statement i get:-

(70) error : IF without ENDIF / THEN

even though I'm using it correctly :(

also, if i do a command like:-

IF KEY(50) and x>0 THEN LET x=x-1

it errors, forget the error, but if i only do one check in the line, like leaving out the extra AND x>0 it works

Can anybody help me please, I dearly want to start creating
games using GLBasic but everything sems to be not working as it should :(

anyway, as i say, great language and from a brief look around the forums looks like quite a community :)

Oh, and I've tried on both version 6.2 and the new version 7.

Pages: [1]