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.


Messages - Leon

Pages: [1] 2 3
1
GLBasic - en / Re: iPad Pro IDE
« on: 2019-Sep-02 »
I would like to check out GLBasic's source code. However, I can't. I think you have to reach 100 posts on the forum to get access to it.

It would be slower, but only on the iPad. Once you finish coding on the iPad, you send your project to a PC and use the real GLBasic there and compile your game.

2
GLBasic - en / Re: iPad Pro IDE
« on: 2019-Sep-02 »
Yes, I totally agree with you, but that was not what I meant.

First, GLBasic (including the IDE) work fine on a Mac using Wine. As long as this is the case, a native export for Mac is not really necessary. It's not optimal but it works good enough.

What I was talking about is something different: We could write a simple IDE that runs on iPad and use GLBasic as an interpreted language. This means that the code is not compiled but just interpreted at runtime. As a result, you could do some serious coding on the go. Of course, the "real" GLBasic on PC is still needed for exporting, etc.

I would look into this myself but I don't have access to the source code of GLBasic and its thread.

3
GLBasic - en / Re: iPad Pro IDE
« on: 2019-Sep-01 »
Too bad. Would have been a great opportunity.

4
GLBasic - en / Re: iPad Pro IDE
« on: 2019-Aug-31 »
Apple has loosened the restrictions as far as coding apps are concerned. As far as I know, compiling is still a no-go. I could be wrong on that, though. Apple even released Swift Playgrounds for the iPad themselves. However, GLBasic on the iPad could be interpreted instead of compiled. Exporting would have to be done on a PC anyways. This way, all you would need is a text editor with syntax highlighting and an XCode template for GLBasic.

5
GLBasic - en / iPad Pro IDE
« on: 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?

6
GLBasic - en / Re: 2D camera
« on: 2017-Feb-19 »
Thank you.
I just don't really get how Viewport is supposed to be used (at least it doesn't do what I want).
Could you give me an example of how to use it?

7
GLBasic - en / 2D camera
« on: 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! :)

8
GLBasic - en / Re: Questions about GLBasic
« on: 2016-Aug-14 »
Well, INLINE really seems to be useful at times. I doubt that I will have to use it though.
However, I really like the idea behind it.

9
GLBasic - en / Re: Questions about GLBasic
« on: 2016-Aug-13 »
Well, according to space fractal you need to reach 100 posts.

10
GLBasic - en / Re: Questions about GLBasic
« on: 2016-Aug-13 »
Thanks, space fractal :)
Actually, being nice is something most users here have in common. :)

11
Thanks :)
I'll give it a try (and implement your tips)!

12
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

13
GLBasic - en / Re: Questions about GLBasic
« on: 2016-Aug-12 »
Wow. That's quite a few ;)

14
GLBasic - en / Re: Questions about GLBasic
« on: 2016-Aug-12 »
Oh and how can you gain access to the bonus area?

15
GLBasic - en / Re: Questions about GLBasic
« on: 2016-Aug-12 »
Drag and Drop won't be an option for me. ;)
Of course I won't pick a framework/engine just because it has particle effects but having some prebuilt functions like that is always nice to have.
Are Admob and IAP Android only or can they be used on iOS, too?
"- Small footprint of only 2mb + code + assets (unity is minimum of 20mb)" Great to hear that GLBasic can produce such small Apps/Executables!

Pages: [1] 2 3