Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (553)
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  
  Imperium Mini on Android (Released)  (Read 4078 times)
0 Members and 1 Guest are viewing this topic.
Offline strategy
« Posted 2010-01-24 22:40:58 »

Hi all.

Having gotten bored with the strategy games on Android (a bunch of which I can't play anyway, as Norway doesn't have paying access to the market  Angry ), I spent some time during vacation porting Imperium Mini to my phone.


It's a pure 2D, turn-based strategy game on the rise and fall of Rome; an almost direct port of the PC game (also done in Java).

I ran into a bunch of trouble because I tried to build in support for multiple resolutions (medium and high - low resolution just didn't look good, so I dropped it) since my phone (HTC Magic - Android 1.5) does not support this properly. Another problem was getting the screen to scroll smoothly and keeping the (rather large) background map in memory without running out. I do believe I've gotten most of the issues sorted out now, but I would appreciate it anyone with a little time on their hands would help me to test it out. I'm particularly interested in anyone who can test it on the Droid/Milestone or other large screen device.

Here is the link: http://www.micabyte.com/android/imperium.apk (2.6Mb)

It uses internet access and coarse location (for admob).

Here is the manual (also available in-game): http://games.micabyte.com/impmini/manual-android.html

A couple of known issues:
  • Manual and About dialogs sometimes do not load the webview on the first attempt. Very irritating problem that I haven't found a fully satisfactory solution to yet (currently I have a WebViewClient waiting for the loading of the page to complete, but it seems it doesn't always trigger). Anyone with a good tip on how to deal with this?
  • Dismissing dialogs in-game can take a little time. This is because the game is updating the game map, which will often require it to reload (to conserve memory) and redraw a lot of stuff (to allow for smooth scrolling).

An interesting little project to do; in particular, I found it quite interesting to note how what is in fact a very simple strategy game on the PC, easily becomes rather complicated when ported to a mobile device with all the limitations that brings with it (technically, interface wise and in terms of gameplay). But I do like the Android dev kit - just irritating with the 16Mb limitation and the problems of testing on X different combinations of screen sizes and OS versions.  Anyone willing to exchange ideas on how to to deal with big bitmaps for a smoothly scrolling screen?

Offline ernestw

Junior Member


Projects: 1



« Reply #1 - Posted 2010-01-26 15:04:13 »

Running this on a Nexus One - I hired some units, tried to attack Sicilia, and got the following error:

01-26 10:02:05.156: ERROR/AndroidRuntime(23231): Uncaught handler: thread main exiting due to uncaught exception
01-26 10:02:05.196: ERROR/AndroidRuntime(23231): java.lang.NullPointerException
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.micabyte.android.impmini.GameActivity.random(GameActivity.java:250)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.micabyte.android.impmini.game.Force.attack(Force.java:80)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.micabyte.android.impmini.game.Campaign.attack(Campaign.java:238)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.micabyte.android.impmini.game.Campaign.attackWithLegion(Campaign.java:957)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.micabyte.android.impmini.GameActivity.attackWithLegion(GameActivity.java:403)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.micabyte.android.impmini.gui.AttackDialog.onClick(AttackDialog.java:188)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.View.performClick(View.java:2364)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.View.onTouchEvent(View.java:4179)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.View.dispatchTouchEvent(View.java:3709)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.app.Dialog.dispatchTouchEvent(Dialog.java:643)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.os.Handler.dispatchMessage(Handler.java:99)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.os.Looper.loop(Looper.java:123)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at android.app.ActivityThread.main(ActivityThread.java:4363)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at java.lang.reflect.Method.invokeNative(Native Method)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at java.lang.reflect.Method.invoke(Method.java:521)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-26 10:02:05.196: ERROR/AndroidRuntime(23231):     at dalvik.system.NativeStart.main(Native Method)

Offline strategy
« Reply #2 - Posted 2010-01-26 19:17:05 »

Thanks ernestw.

I'm pretty stunned; the variable that is being accessed there is created when GameActivity is created and only nulled if GameActivity is destroyed; I just don't see how it is possible for that null pointer access to occur.

Nevertheless, it is easy enough to fix; I've uploaded a new apk that should handle the problem.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ernestw

Junior Member


Projects: 1



« Reply #3 - Posted 2010-01-27 05:42:13 »

Works well now.  Just finished a game and now it's way past my bedtime Smiley

I'm really liking this.

Offline strategy
« Reply #4 - Posted 2010-01-30 21:06:15 »

Thanks very much for the assistance. The official version 1.0.0 is released now on the Android Market. Hopefully people enjoy it.

Offline strategy
« Reply #5 - Posted 2010-02-08 08:38:36 »

I've been getting complaints that the game doesn't save on Droid. In a true display of the usefulness of the Android market, of course, all I have to go on are a few comments, which is worse than useless as the market provides no way to follow up problems.

Would anyone with a Droid do me the kindness of taking the application out for a spin (can be downloaded from the link above or on the market), and help me by doing a little testing of the save/continue mechanism (simply break off playing the game and returning to it a couple of times). Thanks.


Offline Corvinex

Senior Member


Projects: 1


Work Hard, Go Pro.


« Reply #6 - Posted 2010-02-08 19:02:35 »

Nice job on 1.0.0, i'll give it a spin later today and tell you the results.

"Do what you love and you'll never work a day in your life."
Android: Pac-Ball
Web Applet: Virus Effect
Old Games
Offline strategy
« Reply #7 - Posted 2010-02-08 22:27:54 »

Thanks Corvinex. I think I've been able to identify the problem in the emulator now, though (some malformed XML that had somehow slipped under the radar); so no need to worry too much at this particular bug. If you do find any other issues, of course, do let me know. Currently trying to see if I can make the interface a little more intuitive and streamlined. It's interesting - but tough - to code for both small and large screens.

Offline Corvinex

Senior Member


Projects: 1


Work Hard, Go Pro.


« Reply #8 - Posted 2010-02-09 06:22:34 »

Well I'm glad you figured out the issue because I don't see your game available on the android market. Must be a location issue, I'm in the U.S.

"Do what you love and you'll never work a day in your life."
Android: Pac-Ball
Web Applet: Virus Effect
Old Games
Offline strategy
« Reply #9 - Posted 2010-02-09 09:34:25 »

Hmm... that sounds weird. I have limited it so that it is not available on small screen devices (the text looks absolutely awful on low resolution), but that shouldn't be a problem with a Droid.  Wink

[Edit]
Ah ... I suspect I know the problem. The game is not called "Imperium Mini" in the market; it is filed under the name: "A Brief History of Rome"

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (24 views)
2014-08-22 19:31:30

atombrot (34 views)
2014-08-19 09:29:53

Tekkerue (30 views)
2014-08-16 06:45:27

Tekkerue (28 views)
2014-08-16 06:22:17

Tekkerue (18 views)
2014-08-16 06:20:21

Tekkerue (27 views)
2014-08-16 06:12:11

Rayexar (65 views)
2014-08-11 02:49:23

BurntPizza (41 views)
2014-08-09 21:09:32

BurntPizza (33 views)
2014-08-08 02:01:56

Norakomi (42 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!