Author Topic: NaaLaa for Linux  (Read 93 times)

Offline Marcus

  • BASIC Developer
  • Posts: 4
NaaLaa for Linux
« on: April 10, 2018, 06:27:03 AM »
My Windows computer died, so I finally ported NaaLaa to Linux a while ago :)

Not much to say about it though. It's still meant mostly for retro-style games. The IDE, compiler and the programs you create needs nothing or less to run. The IDE was written in NaaLaa, not using IUP or GTK any other widget system.

http://naalaa.com

« Last Edit: April 10, 2018, 06:28:37 AM by Marcus »

Offline John

  • Forum Support / SB Dev
  • Posts: 1685
    • ScriptBasic Open Source Project
Re: NaaLaa for Linux
« Reply #1 on: April 11, 2018, 11:51:58 AM »
Marcus,

Very nice! I'm looking forward to playing with naalaa on my Ubuntu 16.04 64 bit Linux laptop.

Code: [Select]
' ==============================================================================
' Bouncing balls.
' ==============================================================================

' This library helps us maintain constant fps.
import "Speed.lib"

' Turn of automatic redraw.
set redraw off

' Load a ball image.
load image 1, "assets/ball.png"

' Ground position.
groundY = 400

' Create a couple of ball objects, as many as fits the width of the window.
balls?[width(primary)/width(1)]

' Initialize their properties.
for i = 0 to sizeof(balls) - 1
    ' Set position, a wavey curve above ground.
    balls[i].x = i*width(1)
    balls[i].y# = float(groundY) - 150.0 + sin(float(i*45))*75.0
    ' Set vertical speed.
    balls[i].dy# = 0.0
next

do
    ' Update balls.
    for i = 0 to sizeof(balls) - 1
        ' Increase speed, gravity.
        balls[i].dy# = balls[i].dy# + 0.1
        ' Update position.
        balls[i].y# = balls[i].y# + balls[i].dy#
        ' Bounce?
        if balls[i].y# > float(groundY - height(1))
            balls[i].y# = float(groundY - height(1))
            balls[i].dy# = -6.0
        endif
    next

    ' Clear screen.
    set color 0, 0, 0
    cls

    ' Draw ground.
    set color 255, 255, 255
    draw line 0, groundY, width(primary), groundY
   
    ' Draw the balls.
    for i = 0 to sizeof(balls) - 1
        draw image 1, balls[i].x, int(balls[i].y#)
    next

    ' Update the window.
    redraw
    ' Wait enough for 60 fps.
    _SPD_HoldFrame 60
until keydown(27)

« Last Edit: April 12, 2018, 11:37:38 AM by John »

Offline John

  • Forum Support / SB Dev
  • Posts: 1685
    • ScriptBasic Open Source Project
Re: NaaLaa for Linux
« Reply #2 on: April 17, 2018, 04:40:08 PM »
Marcus,

I think this would be great running in naalaa.

PySolFC: a Python solitaire game collection