Jump to content

  • Log In with Google      Sign In   
  • Create Account


Experimenting with a Game Interpreter


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 C-Lesh   Members   -  Reputation: 124

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!"
C-Dev: http://www.francoiscdev.com - Home of the game development language C-Lesh and the Super Mario World game engine!


Sponsor:

#2 C-Lesh   Members   -  Reputation: 124

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!"
C-Dev: http://www.francoiscdev.com - Home of the game development language C-Lesh and the Super Mario World game engine!


#3 frob   Moderators   -  Reputation: 19635

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 personal indie blog at bryanwagstaff.com.

#4 coderchris   Members   -  Reputation: 207

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.



PARTNERS