Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Wildagotchi: Virtual Pet  (Read 11719 times)
0 Members and 1 Guest are viewing this topic.
Offline ufoqwa
« Posted 2014-01-14 12:28:39 »

Hi, I've made with my girlfriend a retro-looking 'Tamagotchi like' game.
Game is free (with rarely shown ads), here is link:

Description of game is on Google Play so to avoid redundancy, here I'll describe technical side only Wink

App is written using Java, C/C++ and Lua.
In Java I have:
- modified LibGDX part that handles Audio / Input / Files,
- networking with JmDNS (to allow playing with Bonjour on iOS side), because of that I set minimal Android version to 2.3.3 -> too many devices below 2.3.7 don't handle multicast dns properly,
- lifecycle handling, opengl initialization, sharing, ads and rest of pure Android stuff.

In C++ :
- modified gdx-cpp project that handles Graphics,
- JNI glue,
- binds to LuaJIT,
- binds from Lua to Java via JNI (where is no sense to have wrapper classes).

In Lua:
- game logic.

There is a lot of action on Lua side but LuaJIT have 0 problems with it. If you make game with Lua on LuaJIT, more probably GPU will be your problem, not CPU. What is sad that is on iOS you can fell that no-JIT is problem and I have 20fps only on ip4 when on Galaxy S with debug build & old arm instruction set (no armv7) & power saving I have easily 60 fps.

Questions and Feedback are welcome Wink

Offline saucymeatman
« Reply #1 - Posted 2014-01-27 16:15:01 »

Why so many different languages for one small game?
Would everything be so much simpler if you just used Java?
Offline ufoqwa
« Reply #2 - Posted 2014-01-29 16:20:34 »

Yes it would be easier.
I wanted to make something crossplatform, that may be extended by native code (c++/java/obj-c) and expressive enough without sacrificing too much performance (Lua).
Now I can make next game faster and I can easily add another platform (for example winphone, when I get angle workin).
But to be honest, writing crossplatform thing is more enjoyable than writing only games all the time Wink
It gives also a lot of experience from many technical domains.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ricardo

Senior Devvie

Medals: 2
Projects: 3

« Reply #3 - Posted 2014-01-29 22:50:19 »

Java is cross platform....
Without to many effort you can made a game for Android, Linux, Windows, Mac and much more just using Java.
Correct me if I am wrong.
Offline ufoqwa
« Reply #4 - Posted 2014-02-02 11:47:14 »

Java wants to be crossplatform and at least for PCs it is, but in mobile space it is not so nice.
On iOS you would have to play with Avian, but at all it would be so problematic cos Java on Android is not the same Java that Avian will handle (Android SDK etc).
On iOS you may also use RoboVM, it's going to be great but lacks a lot of things now.
For Winphone you have few things like IKVM (if it works, I don't know), anyway these options are not good.
I wish Java to be crossplatform on mobile as it is on desktop, but it is not.
Offline Opiop
« Reply #5 - Posted 2014-02-02 12:41:12 »

Well of course it isn't going to be. But why would you program one game in so many different languages when the majority of them aren't supported on phones? Unless I'm missing something here.
Offline ufoqwa
« Reply #6 - Posted 2014-02-02 15:15:31 »

Lua is supported where C is supported (even most of microcontrollers support it), but Lua is only scripting language that I placed on top for speed up development of simple games. C++ is for things that cannot be done in Lua (OpenGL, threads etc), so we may say that support for C++ on given platform is critical for being cross-platform. Windows Phone 8, Android and iOS support C++. Then for some things that may be accessed only by given platform language I have to write minimal 'backend' in that language. For example I need Java for sound, opengl canvas initialization and JmDNS stuff. Obj-c on iOS for sound, EGL and network.

I know that it may look like overhead for just one game, but overall it was great experience Wink
Pages: [1]
  ignore  |  Print  

EgonOlsen (1303 views)
2018-06-10 19:43:48

EgonOlsen (1161 views)
2018-06-10 19:43:44

EgonOlsen (900 views)
2018-06-10 19:43:20

DesertCoockie (1301 views)
2018-05-13 18:23:11

nelsongames (1106 views)
2018-04-24 18:15:36

nelsongames (1338 views)
2018-04-24 18:14:32

ivj94 (2080 views)
2018-03-24 14:47:39

ivj94 (1231 views)
2018-03-24 14:46:31

ivj94 (2214 views)
2018-03-24 14:43:53

Solater (798 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!