gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS homebrew announcements > Micro Lua DS 1.0.1 beta - when Lua meets ?Library

#162631 - Risike - Sat Sep 06, 2008 11:00 am

Sorry for my bad english...

[Images not permitted - Click here to view it]

What is Micro Lua DS

Micro Lua DS allows you to launch Lua scripts (actually Micro Lua scripts) on the Nintendo DS. Unlike DSLua, (a former Luaplayer for Nintendo DS), Micro Lua DS is ported directly from the sources code of Lua 5.1.3 and uses ?Lib for DS.

That makes it a programming language with very simple syntax, in which you can create good games very quickly.
No installation required: all you need to get started is a text editor.

Micro Lua doesn't use 2D hardare of the console to display graphics. It use the 3D GPU so the two screens display 30 fps.

The Micro Lua syntaxe looks-like PSP Luaplayer syntaxe. but there are more functions like rotations, zooms...etc

Micro Lua allows you to display animated sprites and maps very easily with special modules.


Source code example

Quote:

img = Image.load("man.png", VRAM)

x = 10
y = 10

while not Keys.newPress.Start do

Controls.read()

if Stylus.Held then
x = Stylus.X
y = Stylus.Y
end

if Keys.held.Up then y = y + 2 end
if Keys.held.Down then y = y - 2 end
if Keys.held.Right then x = x + 2 end
if Keys.held.Left then x = x - 2 end

screen.startDrawing()
screen.blit(SCREEN_DOWN, x, y, img)
screen.print(SCREEN_UP, 0, 0, "Use the stylus or + to move the man")
screen.print(SCREEN_UP, 0, 8, "Press START to quit")
screen.print(SCREEN_UP, 0, 184, "FPS: "..NB_FPS)
screen.stopDrawing()

end



Advantages of Micro Lua

- Very simple syntaxe
- Object oriented programmation (if you want)
- No sprite limit, no size limit, no display limit
- No rom size limit, all ressources are on you SD card
- Works on all linkers (tester with R4, R6, EZ5, M3 Perfect, Supercard DS One)
- Exceptions management
- Very fast for a scripting language
- Advanced management of sprites and map
- You can program on all systems (PC, Mac, Linux, Pocket PC and all systems which have a text editor, even DS itself)


For the future

- Bugs correction
- Wifi
- Motion
- Rumble
- More sounds format support


kwnown bugs

- Sometime drawLine and drawRect doesn't work
- Some screen blinking when there is a lot of text on the screen (sometime)

These bugs will be corrected in the next version.

Links

Download: HERE
Official website: http://microlua.risike.com
Official forum with french and english sections: http://microlua.xooit.fr

#162656 - Wraggster - Sun Sep 07, 2008 5:24 pm

its great to see a worked on Lua Player for the DS, it would be awesome if it were possible to somehow play the hundreds of PSP Lua Games apps etc on it, although i presume thats not possible. But i shall be watching every release from your site :)

Will you have a release page for any releases made to run on this Lua release ?
_________________
Webmaster of Nintendo DS Emulation News

http://nintendo-ds.dcemu.co.uk

#162684 - ingramb - Tue Sep 09, 2008 6:32 am

Haven't gotten a chance to try it yet, but this looks well made. Hopefully some good games will come of it.

#162694 - Risike - Tue Sep 09, 2008 3:57 pm

Wraggster wrote:
its great to see a worked on Lua Player for the DS, it would be awesome if it were possible to somehow play the hundreds of PSP Lua Games apps etc on it, although i presume thats not possible. But i shall be watching every release from your site :)

Will you have a release page for any releases made to run on this Lua release ?


No, but all good hombrews will be on the Micro Lua website download section. There is already one.