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

#1
GLBasic - en / iPad Pro IDE
2019-Aug-31
I have recently switched to the iPad Pro as my main computing device. Although programming actually works fine with an attached keyboard and despite successful apps such as Pythonista (Python IDE) there are actually only a handful of IDEs out there for iOS. GLBasic seems to be a little forgotten nowadays. I think it was a great idea to put it on Steam. Maybe creating a version of GLBasic for the iPad could boost its sales and popularity as well since it would be a standout feature. Some features such as exporting programs would have to be cut, though. Any thoughts on this?
#2
GLBasic - en / 2D camera
2017-Feb-19
Hi everyone,
I'd like to know how to implement a camera for 2D games (Top-down view) in GLBasic so that it isn't necessary to move every object in the world instead of the player.
Most engines nowaday support this out of the box so I might have missed a built-in function.
I'm glad about any help! :)
#3
Hello, I have a problem with the following code, which is supposed to make my character move tile per tile (for example the character can't walk 1 or 2 pixels but always predefined distances).
However, it sometimes happens that the player doesn't stop walking for some time even if I don't press any buttons.

Code (glbasic) Select

GLOBAL startXorY2 = FALSE
GLOBAL Dir = 1

TYPE character
x
y
w
h
moving


FUNCTION init:
self.x = 200
self.y = 200
self.w = 50
self.h = 50
self.moving = FALSE
ENDFUNCTION

FUNCTION draw:
DRAWRECT self.x, self.y, self.w, self.h, RGB(100,200,50)
ENDFUNCTION

FUNCTION move: speed, distance, direction, startXorY
IF startXorY2=FALSE
startXorY2=startXorY
ENDIF


IF direction = 0
IF startXorY2-distance< self.x-speed
DEC self.x, speed
self.moving = TRUE
ELSE
startXorY2 = FALSE
direction = ""
self.moving = FALSE
ENDIF
ENDIF
IF direction = 1
IF startXorY2+distance>self.x+speed
INC self.x, speed
self.moving = TRUE
ELSE
startXorY2 = FALSE
direction = ""
self.moving = FALSE
ENDIF
ENDIF

IF direction = 2
IF startXorY2+distance> self.y+speed
INC self.y, speed
self.moving = TRUE
ELSE
startXorY2 = FALSE
direction = ""
self.moving = FALSE
ENDIF
ENDIF

IF direction = 3
IF startXorY2-distance< self.y-speed
DEC self.y, speed
self.moving = TRUE
ELSE
startXorY2 = FALSE
direction = ""
self.moving = FALSE
ENDIF
ENDIF
ENDFUNCTION
ENDTYPE


GLOBAL player AS character
player.init()


LOOP:
checkForPressedKey()
player.draw()

IF Dir = 0 OR Dir = 1
player.move(2, 32, Dir, player.x)
ELSE
player.move(2, 32, Dir, player.y)
ENDIF

IF KEY(57)=1
END
ENDIF
PRINT Dir,20,20

  SHOWSCREEN
GOTO LOOP

FUNCTION checkForPressedKey:
IF KEY(203)=1
Dir = 0
ELSEIF KEY(205)=1
Dir = 1
ELSEIF KEY(208)=1
Dir = 2

ELSEIF KEY(200)=1
Dir = 3
ELSE
  IF player.moving = FALSE
Dir = -1
   ENDIF
ENDIF
ENDFUNCTION


spacefractal: Just added code tag for easier reading
#4
Hello,
I've got a couple of questions about GLBasic.
Is GLBasic still in development/are there still people working on improving GLBasic, adding new platforms and stuff like that? I mean, the websites says so, I guess, but it seems that it is not completely up-to-date. Is there a built in physics engine or maybe a particle system?
Thanks in advance for any answer! :)
#5
Hello,
I wanted to ask if it is possible to publish games made with the free version of GLBasic for Android and iOS. As a pupil I can't afford the full version of GLBasic at the moment and rewriting everything in another Engine would be very time consuming. Thanks in advance for any help.  :)
#6
Hello,
is it possible to define own commands such as DRAW instead of DRAWSPRITE or LOAD instead of LOADSPRITE or something like that? I don't want to do such things with functions. Is it possible?
Thanks in advance
#7
Hello,
I wanted to ask if GLBasic supports things like microphone, GPS or camera access on android and iOS.
So you could use a picture you took before with your camera as the background for a level.
Is this possibel?
Thanks in advance
#8
Hello,
I have a question about GLBasic. Is there an easy way to create a tilemap?
Thanks for your answers :)