flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > High Level Languages > Idlewild-Lang (2D game programming language)

Author
Thread Post new topic Reply to topic
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Idlewild-Lang (2D game programming language)
Hi,

So this is what I've been working on in my spare time over the last year.

Idlewild-Lang is a free (as in freedom), 64-bit, cross-platform (Linux/Windows) BASIC compiler that functions as a game programming language and also as a general-purpose language. It uses FASM or NASM as the backend.

This project started as a fork of my toy compiler Bubble BASIC (I posted that under another user name), but, although the build system and file names are similar, everything internally has changed. It's now more or less source-compatible with Blitz BASIC from Blitz Research Limited (if you're not familiar with Blitz, it was an advanced C-like BASIC dialect popular in the Amiga and early PC years).

It is suitable for writing simple 2D games (with 3D acceleration for masking, scaling and rotation), providing you are sensible - it's an alpha software so don't be surprised if, when you forget to load a font, you get a segmentation fault instead of a friendly error message!

The following BASIC keywords/operators are supported:

After, And, Before, Case, Const, Data, Default, Delete, Dim, Each, Else, Else If, End, End If, Exit, False, Field, First, Float, For, Forever, Function, Global, Gosub, Goto, If,, Insert, Int, Last, Local, Mod, New, Next, Not, Null, Or, Pi, Read, Repeat, Restore, Return, Sar, Select, Shl, Shr, Step, Str, Then, To, True, Type, Until, Wend, While, Xor, Include, On*

+ (unary)
- (unary)
~
^
*
/
+
-
>
<
>=
<=
<>

The following Blitz BASIC functions are supported:

Graphics, SetBuffer, BackBuffer, Cls, ClsColor, Color, Flip, Origin, Line, SetScale*, SetOrientation*, GetScaleX*, GetScaleY*, LoadImage, MaskImage, HandleImage, ImageXHandle, ImageYHandle, ImageWidth, ImageHeight, MidHandle, AutoMidHandle, DrawImage, DrawImageRect, Oval, Rect, LoadFont, SetFont, Text, StringWidth, StringHeight, LoadSound, PlaySound, LoopSound, StopChannel, ChannelPlaying, KeyDown, KeyHit, SetPrecision*, Abs, Sin, Cos, ATan2, ATan, Tan, Sgn, Exp, Log, Sqr, SeedRnd, Rnd, Rand, CreateTimer, WaitTimer, LSet, RSet, Len, Mid, Left, Right, Uni*, Asc, Chr, Upper, Lower, Print, Write, Input, DebugLog, Millisecs

I'd be very grateful if some other forum members could build this under Linux (for example, Ubuntu/Debian/Mint) and run some test programs and report any issues. I think there is a high chance of success with the build because I was able to build the language on a vanilla Ubuntu 14.04 virtual machine (I don't recommend this though as 3D graphics don't seem to work reliably in VirtualBox/VMWare). Ideally, if someone could throw together a little game with these functions I'd love to see it and include it in future versions of the language! I have included some simple example programs. Most of them are console apps ported from Bubble BASIC but there is a 3D-accelerated particles example in there.

Download from github (click "releases" at the top of the page for precompiled binary packages):

https://github.com/clockworkdevstudio/Idlewild-Lang

Thanks


Last edited by ProphetOfDoom on 04 Dec 2015, 23:19; edited 1 time in total
Post 11 Nov 2015, 01:28
View user's profile Send private message Reply with quote
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Re: Idlewild-Lang (2D game programming language)
This is an asteroid shooter game I wrote in Blitz BASIC and ported to Idlewild-Lang. Once you've installed the compiler it should be a simple matter to build and run the game; just type "idlewild-lang skyghost.bb" then "./a.out".

Here is a video of me playing the game (it's best viewed in portrait on a tablet):

https://youtu.be/xourmxqPcEc


Description:
Download
Filename: skyghost.tar.gz
Filesize: 263.38 KB
Downloaded: 118 Time(s)

Post 11 Nov 2015, 01:32
View user's profile Send private message Reply with quote
borbonhause



Joined: 18 Oct 2015
Posts: 23
libsdl2-dev package isn't found on my Ubuntu 12.04's package manager, I'll try to do something about that later. This looks pretty intriguing.
Post 11 Nov 2015, 06:28
View user's profile Send private message Reply with quote
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Thanks borbonhause. That's so typically Linux. Rolling Eyes I don't know how it can annoy me so much yet still be my favourite OS. Has anyone else had any success building the compiler/game? Extra points if it was on Windows. I'd like to provide binaries at some point but it's not a massive priority.
Post 11 Nov 2015, 13:50
View user's profile Send private message Reply with quote
borbonhause



Joined: 18 Oct 2015
Posts: 23
Tried running make anyway, and this is what I got:


Code:

$ make
ghc Main.hs -o idlewild-lang -DLINUX=1 -O3

Linker.hs:46:8:
    Could not find module `Control.Monad.Identity'
    Use -v to see a list of the files searched for.



Should I install some package, or my ghc is just that old?
Post 12 Nov 2015, 06:07
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 768
Location: Jakarta, Indonesia
something like:

Code:

sudo apt-get install libghc6-mtl-dev



maybe?
hmm maybe I should setup GHC on Windows as well...
Post 12 Nov 2015, 08:01
View user's profile Send private message Reply with quote
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Hi borbonhause,

I just installed Ubuntu 12.04 on a virtual machine and ran an apt-cache search; it seems that your version of Ubuntu simply doesn't have SDL2 in its repositories (except possibly the ttf module, weirdly). So you're stuck unless you want to try to build SDL2 from source, which I've never tried but it doesn't sound like much fun. It would probably be easier to install a newer version of Ubuntu. Oh btw, the error regarding Control.Monad.Identity can easily be fixed by just commenting out "import Control.Monad.Identity" in Linker.hs. Then the compiler builds (but it's useless without its standard libraries). I have no idea why I imported that package in the first place. libghc-mtl-dev IS available on Ubuntu 12.04 (thanks TmX) but that doesn't help much.
Post 12 Nov 2015, 13:33
View user's profile Send private message Reply with quote
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Okay I found a solution for Ubuntu 12.04 but it's not pretty.

Go to https://www.libsdl.org/download-2.0.php
Download SDL2-2.0.3.tar.gz

Go to https://www.libsdl.org/projects/SDL_ttf/
Download SDL2_ttf-2.0.12.tar.gz

Go to https://www.libsdl.org/projects/SDL_mixer/
Download SDL2_mixer-2.0.0.tar.gz

Go to https://www.libsdl.org/projects/SDL_image/
Download SDL2_image-2.0.0.tar.gz

Go to http://glm.g-truc.net/0.9.7/index.html
Click Download GLM 0.9.7.1 2015-09-07

All the above SDL libraries can be compiled and installed simply by:

./configure
make
sudo make install

Now use apt-get to install all dependencies listed in the README file EXCEPT (Edit: GLM and) the failed SDL ones (you may also need libglew1.5-dev).

Extract GLM then run:

sudo mkdir /usr/include/glm
sudo cp -r glm/* /usr/include/glm

"make" should now work.
Post 12 Nov 2015, 14:48
View user's profile Send private message Reply with quote
borbonhause



Joined: 18 Oct 2015
Posts: 23
So yeah, I compiled it. And learned that I have a 32-bit OS. Dispite having a processor that supports an x64 instructions. I'm sorry for everything.

Ok, I'm reinstalling my OS and backuping everything I have, shouldn't take more than a week if I'm lucky, which I'm not.


Code:
idlewild-lang: /usr/bin/ldi386:x86-64 architecture of input file `Examples/array_multi.o' is incompatible with i386 output

Post 14 Nov 2015, 06:47
View user's profile Send private message Reply with quote
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Hi borbonhause,

It's okay not your fault - I think Ubuntu was still recommending the 32-bit .ISO back in 2012. Thanks for all your efforts. I'm still wondering how the other 8 people who downloaded it got on though. Confused
Post 14 Nov 2015, 14:16
View user's profile Send private message Reply with quote
ProphetOfDoom



Joined: 08 Aug 2008
Posts: 62
Location: UK
Binaries for Windows and Linux
I've just updated this project with binary packages and install scripts. It means the language and all its dependencies can be installed on Windows with one single command from an admin terminal:

install-windows-bin.bat

Linux users have it nearly as good with just three commands to install the compiler. I also edited the README to give much more information about the cool features of the language.

The source code is here (click "releases" at the top of the page and download the zip file for your chosen OS).

https://github.com/clockworkdevstudio/Idlewild-Lang

There is also a copy of my asteroids game Skyghost with both source and binaries bundled in the same download.

Any feedback would be much appreciated.
Post 04 Dec 2015, 23:15
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.