Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Experimenting with a Game Interpreter

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Francois Soft   Members   

139
Like
0Likes
Like

Posted 01 March 2012 - 09:26 AM

So I wrote this language called C-Lesh to develop my own games for a variety of platforms and devices to ease portability and to revive a project which I started back in 2007. Anyways, I implemented the interpreter in Java for Android 2.1 and noticed how slow the code runs so I went back to drawing board and had the interpreter spit out source code which I could intergrate into an Android project. Code now runs like 3 - 4 times faster.

Now here's my question. How do people do with performance when creating interpreters on Android? Is the NDK (native development kit) of significant help when implementing an interpreter? I'm curious because it says the manual that native code is not necessarily much faster than Java code. The fact of the matter is that the C-Lesh interpreter does not do much overhead in interpreting code. Has anyone messed with Java native code and doesn't the Android JVM convert most of its bytecode into native code?

Some feedback would be much appreciated!

Nerd's Quote: "If you stare at a computer for 5 minutes you might be a nerdneck!"

"I got an $86000 company, what do you have a**hole?"

"After 10+ years FrancoisSoft is back? Yep, and we're here to stay. It'll be a good time!"

"The Super Mario World Tournament is here! Will I win or will I lose it all?"
FrancoisSoft on the Web: http://www.francoissoft.net:3000 <- Inquire for account.

 


#2 Francois Soft   Members   

139
Like
0Likes
Like

Posted 15 March 2012 - 08:10 PM

Hmm. Guess no one knows. If anyone has written an NES or SNES emulator for Android I would love to hear how you did it.

Nerd's Quote: "If you stare at a computer for 5 minutes you might be a nerdneck!"

"I got an $86000 company, what do you have a**hole?"

"After 10+ years FrancoisSoft is back? Yep, and we're here to stay. It'll be a good time!"

"The Super Mario World Tournament is here! Will I win or will I lose it all?"
FrancoisSoft on the Web: http://www.francoissoft.net:3000 <- Inquire for account.

 


#3 frob   Moderators   

44013
Like
0Likes
Like

Posted 16 March 2012 - 09:10 AM

It is an interesting question. You are right that the better emulators probably do generate JIT-compiled code, either that or they are emulating machines that are orders of magnitude slower than the target processor.

Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I occasionally write about assorted stuff.


#4 coderchris   Members   

304
Like
0Likes
Like

Posted 11 April 2012 - 11:46 AM

It would be hard, but if you figured out how to get your compiler to output ARM code into a shared library (.so) file, you could then call System.loadLibrary() to load the JIT compiled script code.

I have also read that NDK compiled code is not much faster, but in my experience it makes a significant difference!
Check out my stuff: http://www.chrisacoder.com/




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.