Author Topic: NaaLaa for Linux  (Read 6255 times)

Offline Marcus

  • BASIC Developer
  • Posts: 12
    • NaaLaa
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: 3510
    • 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: 3510
    • 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


Offline Marcus

  • BASIC Developer
  • Posts: 12
    • NaaLaa
Re: NaaLaa for Linux
« Reply #3 on: May 02, 2018, 08:31:04 AM »
That would be interesting :)  I do believe someone made a solitaire game in naalaa som years ago.

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: NaaLaa for Linux
« Reply #4 on: May 02, 2018, 03:19:47 PM »
Naalaa seems to be the world's best kept secret. Let's change that.

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: NaaLaa for Linux
« Reply #5 on: May 07, 2018, 08:12:28 PM »
Can NaaLaa be embedded as a shared object? I would love to create an extension module for Script BASIC with it.

Offline AlyssonR

  • Advocate
  • Posts: 126
Re: NaaLaa for Linux
« Reply #6 on: May 08, 2018, 01:41:30 AM »
NaaLaa embedded in SB? Oh, yes please! *fingers crossed*

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: NaaLaa for Linux
« Reply #7 on: May 09, 2018, 09:13:49 PM »
NaaLaa embedded in SB? Oh, yes please! *fingers crossed*

The SDL_gfx extension module is a start for Script BASIC graphics but isn't a game engine in its current form. Just basic graphic primitives with alpha channel support.

Offline John

  • Forum Support / SB Dev
  • Posts: 3510
    • ScriptBasic Open Source Project
Re: NaaLaa for Linux
« Reply #8 on: July 04, 2018, 09:21:05 PM »
Quote
Naalaa doesn't use opengl or directx, just regular winapi.

That is interesting to know. Does that hold true for the Linux version as well?