Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Lua...

Author
Message
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 17th Feb 2010 22:54
Is there any way to make Lua games/apps run faster? I barely have half of a tile system coded, and I see only about 10 - 15 FPS :\'( Any other Lua scripters/coders \'round here.

I develop games in MicroLua and Lua Player for the Nintendo DS and Sony PsP in case any one was wondering......

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Feb 2010 23:24
Just depends how you optimize your code. Lua is one of the faster scripting systems. Can we see some code that you reckon is causing the slow-down?

"everyone forgets a semi-colon sometimes." - Phaelax
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 18th Feb 2010 00:29
The DS has two CPUs, one a ARM9 at 66mHz and one a ARM7 at 33mHz. The ARM9 has access to 4Mb of RAM and the ARM7 has whatever VRAM the ARM9 sacrifices to it from its 640k store.

If you want to run Lua games on that you're fairly insane.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 18th Feb 2010 00:37 Edited at: 18th Feb 2010 00:38
I'll Warn you right now that the code is somewhat messy.........






The Do File Commands are just placeholders - they're not for any purpose right now, exept load maps, which it only grabs some data from...

I think its the danged canvas i'm drawing.....

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 18th Feb 2010 00:45
I'm surprised it's playable at all to be honest. Is it using hardware sprites/hardware acceleration or is it just blitting to a bitmap BG?

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 18th Feb 2010 00:55
Pure HArdware sprites.........The fun in it is pushing the little system.......but if pasting a 8x8 tilemap along with other images is slowing it down.............

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 18th Feb 2010 01:06
Ok, I don't know Lua, so I can't really follow the code structure, but is there a chance it might be reloading character sprites every frame? Pasting a 8x8 tilemap shouldn't slow stuff down. Tiled BGs on the DS use exclusively 8x8 tiles. I don't know how this is being handled behind the scenes though.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 18th Feb 2010 01:28
The Char is only reloaded if a button(X,A,B or Y) is pressed, Because its a customization/config screen. the map was to test collision.

Quote: "Pasting a 8x8 tilemap shouldn't slow stuff down."

might be a differant story on the DS, cuz every thing was smooth until I messed around with the maps.......

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 18th Feb 2010 01:31
If it was using hardware acceleration, adding a tiled map wouldn't slow it down; it's an extension of what the GBA could do and that could easily do four layered maps at once. It's got to be either software blitting or using some horrid method to render because all software has to do to render a tiled map on the DS/GBA is set some control registers, dump the tiles into one region of memory and the map into another. The hardware takes control from thereon, needing only two registers be adjusted to scroll the background.

Bad implementation.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 18th Feb 2010 01:38
Quote: "If it was using hardware acceleration, adding a tiled map wouldn't slow it down; it's an extension of what the GBA could do and that could easily do four layered maps at once."


I'll have to look into possible commands. MicroLua(DS) is still in its early stages, and I have yet to find a manual with a decent set of commands for it. but i get where you are coming from. So how are you so knowledgeable on the DS anyhow?

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 18th Feb 2010 01:44 Edited at: 18th Feb 2010 02:02
I spent a year programming homebrew in C for the GBA and DS... it's an encouraging platform. It's so weird at first to see something you wrote running on a Nintendo handheld. But if it wasn't for homebrew I probably wouldn't have bothered learning C...

I can't believe they credited themselves, the emulator maker and hell even Windows Movie Maker but forgot to credit ME!?

Hilariously, despite being written awfully by someone still learning C, it is a thousand times more stable and 3-4x as fast as the iPhone implementation. Which runs on a 600mHz ARM.

If you'd like to have a go, this was the last version I worked on, previously unreleased. ;D

I'd upload the source but MediaFire is having none of it. Four attempts and each time it's rejected.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 18th Feb 2010 02:07 Edited at: 18th Feb 2010 03:42
impressive. (the C Prog. I cant handle C - TOO COMPLICATED)

Quote: "it's an encouraging platform."


Really............I fail too see that. Only thing thats ran for me is [EDIT!!!!!] and hello world.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 18th Feb 2010 02:12
A) Pirated games are fairly illegal and are not up for discussion on this board; you'll probably get this thread locked and your account n00b slapped.

B) There's a folder full of examples, funnily enough called examples. Tear 'em apart. They mostly work.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 18th Feb 2010 03:41
Quote: "A) Pirated games are fairly illegal and are not up for discussion on this board; you'll probably get this thread locked and your account n00b slapped.

"


Maybe I should of read the AUP......


Quote: "B) There's a folder full of examples, funnily enough called examples. Tear 'em apart. They mostly work."


True that.........

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )

Login to post a reply

Server time is: 2025-05-24 23:51:06
Your offset time is: 2025-05-24 23:51:06