PDA

View Full Version : [Release] LuaPlayer Euphoria V3 - Yet More Speed + IntraFont!



Zack
May 17th, 2009, 21:42
Hola :)

Hey.

So after a bit of work I bring you LuaPlayer Euphoria V3.

New Features, Improvements, Bug Fixes & Changes :

New Features :

1) IntraFont support. You can now load and blit fonts without the huge slowdown the built in font function has :)

How to use it ? Go to Samples/IntraFont for a working usage example.

Improvements :

1) Speed increase. Roughly between 20>40fps.
2) screen:clear() is now faster.

Bug Fixes :

1) screen:clear() now actually works. (it didn't in V2)
2) Image alpha on created images, colors, and loaded images now works.
3) 3D things I broke are now fixed (so 3d wise it is the same as .20 was).
4) FPS counter no longer flickers when not using waitVblankStart().
5) Checking for input (i.e pad = Controls.read()) no longer caps the framerate to 60fps. I suggest you use waitVblankStart() if you need to cap it to 60 ;)

Changes :

Ok, so all of the function names in V1 & 2 have changed. I meant to do this from the beggining but rushed so much I didn't quite get to it. The function names now ring true to the default LuaPlayer naming convention.

Here are the new functions and names (also included in the download) :


-- New Functions & Features List. Including Usage --

-## System Functions

System.setCpuSpeed(number) -- Set the Cpu speed. Options : 100, 222, 266, 333.
System.showFPS() -- Show the current FPS.
System.quit() -- Exit back to the XMB.

--REQUIRED SYSTEM FUNCTIONS (must be called in your loop)

System.startGu() -- Start the GU
System.endGu() -- End the GU

-!! Please see Either Samples/Mp3 or Samples/IntraFont for usuage examples

System.

-## MP3 Functions

Mp3.init() -- Initialize the Mp3 System.
Mp3.load(filename) -- Load a Mp3.
Mp3.play() -- Play a Mp3.
Mp3.stop() -- Stop a Mp3.
Mp3.pause() -- Pause a Mp3.
Mp3.end() -- Stop and Free a Mp3.
Mp3.free() -- Free a Mp3.
Mp3.endOfStream() -- Get the end of a Mp3 (ie . if Mp3.endOfStream == 1 then).
Mp3.getTime(string) -- Retrive the current play time position of the mp3.

-!! Please see Either Samples/Mp3 or Samples/IntraFont for usuage examples

-## IntraFont Functions

IntraFont.init() -- Initialize the IntraFont System.
IntraFont.load(filename) -- Load a font using intrafont (ie. font = IntraFont.load("font.pgf")).
IntraFont.print(font, x, y, textSize, color, text) -- x, y & textsize are floating point variables (ie. 0.1, 1.0).
IntraFont.unLoad(font) -- Unload the loaded font.

-!! Please see Either Samples/Mp3 or Samples/IntraFont for usuage examples

-## Automatic Functions (Do not need calling)

Image swizzling -- Automatic upon loading an image

All the readme/function files have been updated to reflect this release.

Future :

Plenty of stuff planned, MP3 Playback on the media engine, ogg playback on the media engine, more optimizations, additions of PSP Sce features such as savedata dialogue, OSK etc.

If you would like to request a feature be added, please do so at the official forum : LuaPlayer Euphoria Forum (http://www.retroemu.com/forumdisplay.php?f=148)

If you use this please leave a comment!

Download & Give Feedback Via Comments

wbjcastillo1
May 18th, 2009, 04:00
how do you use this? it is very confusing.. there's always an error null or system error

osgeld
May 18th, 2009, 14:33
just like normal luaplayer, write script save as index.lua and go

(course this is in the instructions that come with the package)

dangee
May 19th, 2009, 14:53
System.startGu()
im = Image.createEmpty(480,272)
im:fillRect(16,16,256,256,Color.new(0,255,0))
System.endGu()
repeat
System.startGu()
screen:blit(0,0,im)
System.endGu()
screen.waitVblankStart()
screen.flip()
until Controls.read():circle()
screen:save("ms0:/swizz.png")
System.quit()
V
V

http://www.dangee.net/swizzl.png

?

Zack
May 20th, 2009, 00:40
System.startGu()
im = Image.createEmpty(480,272)
im:fillRect(16,16,256,256,Color.new(0,255,0))
System.endGu()
repeat
System.startGu()
screen:blit(0,0,im)
System.endGu()
screen.waitVblankStart()
screen.flip()
until Controls.read():circle()
screen:save("ms0:/swizz.png")
System.quit()
V
V

http://www.dangee.net/swizzl.png

?

Here is the correct way (or working way at least) to do it :


im = Image.createEmpty(480,272)
im:fillRect(16,16,256,256,Color.new(0,255,0))

while not Controls.read():circle()
System.startGu()
screen:blit(0,0,im)
System.endGu()
screen.waitVblankStart()
screen.flip()
screen:save("ms0:/swizz.png")
end
System.quit()

You only need to start the gu and end it in your main loop. Only during blitting. Not loading too :)

Sorry I suck at documentation ( I don't put enough effort into it).

Hopefully someone will help me with the documentation and samples at some stage :)