Author Topic: ARC "Mobile" Discussion  (Read 3708 times)

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5131
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
ARC "Mobile" Discussion
« on: August 13, 2012, 06:50:44 AM »
ARC "Mobile" Discussion


Summary

Lets face it. We all have had some interest at some point in creating a game and having it work on a phone or tablet. and one of ARC's future goals is to support iOS and Android development. So we have some questions to answer and it will likely take a while.

What do you want out of the "Mobile" versions of the ARC engine?


Questions to be Answered

  • Mobile development is fundamentally different, the user interacts with the game and devise completely differently, how can ARC address this?
  • What Questions arn't we asking

Submitted Suggestions

  • Any bright ideas?
« Last Edit: February 26, 2013, 09:58:50 AM by Ryex »
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3248
  • LV: 294
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: ARC "Mobile" Discussion
« Reply #1 on: August 13, 2012, 07:33:17 AM »
I can't speak so much for the engine, but the editor is easy: a complete new one from scratch.
I am unaware of any way that either the Python or the .NET implementation could ever work on a iOs or Android device. The Python version obviously stands the better chance (the .NET implementation is 0%), but I'm pretty sure some of the core things like wx won't work, even if Python will. We could probably keep the underlying code that does the "logic", but the GUI would need some serious work...

As for the engine, it probably stands the best chance due to its lack of a platform dependent GUI.

As far as coding goes, I admit my experience with mobile development is exactly none, so I am going to shut up for the time being, before I make an ass of myself saying something stupid.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6585
  • LV: 407
  • Gender: Male
    • View Profile
Re: ARC "Mobile" Discussion
« Reply #2 on: August 13, 2012, 08:10:09 AM »
For the Android version, the primary creation will probably be in Java. Android does offer the NDK which is native C I believe. Anyways, since we're working with Java, there is an available library for Java called JRuby, which does as it sounds. Implements Ruby into Java. I've worked with it a little, not in an Android environment. Which will probably be your best bet for the Android devices. As far iOS, I have no clue on that.

For controls, we'll have to go with on-screen controls, an on-screen directional pad with 8-directions. Or go with an analog stick with 8-directions (kind of like the wii's nunchuk's analog stick.) A simple A and B button would work fine for most occasions. (Confrim and Cancel/Menu) The resolution is definitely gonna have to be forced rather than custom. Since we're working with smaller screens there really isn't a whole lot of room to allow custom resolution. Something maybe like 10 to 15 tiles across and maybe 8 tiles down. I've worked with Android development a bit and it's a bit tedious.

We should also build hardware keys into the engine. Devices with a slide-out keyboard or slide-out gamepad, it'd be really efficient to support it.

If we use JRuby with Android, we wouldn't have to give up custom scripting. Android is probably going to be a lot more tedious than iOS. We have all these different devices with different screen sizes so we'd need a decent test group to work with. Android uses OpenGL ES so we'd stick with one internal resolution and just project it to the screen. If building the engine using NDK doesn't work, the engine will have to be completely redone in Java with the Android SDK. At that point, we'll also have to consider what kind of SDK targets are we looking at. Android allows us to use a minimum SDK target, a preferred target, and then a maximum, which helps us reach out to more devices. A lot of phones are still running Eclair (2.1), Froyo (2.2), and Gingerbread (2.3). While tablets are running Honeycomb (3.0) and newer devices are getting Ice Cream Sandwhich (4.0) and Jellybean (4.1)

Then theres always multi-tasking to worry about. Android actually has a nice setup for this. You can build apps off of Services or Activities. When disposing an app, you can either store it in the background and keep it "paused" so the next time the user runs it, it goes back to where left off. Or you can just completely dispose of it. There are also things to consider such as permissions and such. Permissions might get a bit complicated with things like trying to allow a custom scripting language in the engine.

Anyways, just some things to think about for the Android port. As far as iOS goes, I have no fucking clue. Apple is a dick when it comes to development for mobile platforms so I never bothered trying it.

EDIT: Some more food for thought. With the iOS and Android versions, we can't just have a precompiled engine like we will with desktop versions. Considering the fact that people will want to edit their manifest files, icons, app names and whatnot. What's cool about Android is it can be developed for on Linux, Windows, or Mac. You can also build APK files using the android SDK via command line. Having the ability to do so, will allow the end users some more customization when it comes to building their android version.

Android SDK API Guide. http://developer.android.com/guide/components/index.html I recommend looking under App Components to get the basics.

More interesting links.
http://developer.android.com/tools/building/building-cmdline.html
http://developer.android.com/guide/topics/manifest/manifest-intro.html
« Last Edit: August 13, 2012, 09:13:06 AM by gameus »

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5131
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: ARC "Mobile" Discussion
« Reply #3 on: August 13, 2012, 09:14:16 AM »
I'd like to point out that there is no way in hell we'll be making an editor ON and android or iOS device.
it should be enough to build the functionality in the desktop editor to export a package that the engine for the devise in question could play.

I do happen to know a little bit about the status of APRIL (our rendering library) and android. namely that it's being worked on. I recently installed that Android SDK and NDK as well as the IDE tools and found that the project were hidden in the APRIL SVN. I havn't been able to build the projects yet because I'm missing png jpeg and zip headers and have no idea where to find them but the commit logs seem to indicate that their demo project at least build internally at Cateia (Perhaps Blizz can provide some insight here?) and using NDK to build ARC's dependencies like Ruby has at the very least been done before as there are ruby terminal apps for android in the market. we'll have to write some Java JNI glue code to bind it into a workable APP but I'm thinking we shouldn't have too many problems there.

the main question I have in the tech department is, is there a feasible way for developers to distribute their games? would we be able to allow them to bind their game data to the engine and distribute it as a bundle? or would we have to publish an eninge like app in the market and have people distribute their games a downloadable data packs that the engine app would run like an emulator:ROM set up?

from the design point of view there is a lot more questions.

for example the only input we can be sure a user on a mobile devise will have is the touch screen obviously we need to provide a way to place vertural controls buttons on top of the game, but how we do this in a well thought out way that doesn't hamper what people can do?
« Last Edit: August 13, 2012, 09:33:38 AM by Ryex »
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19917
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: ARC "Mobile" Discussion
« Reply #4 on: August 13, 2012, 11:42:34 AM »
Python works just fine on iOS and Android. But I am actually against an editor on those platforms. Why? Because deploying is impossible without a jailbroken/rooted device so it basically kills the whole point. And I don't think you can access external stuff like e.g. an installed RTP (that is, it doesn't work on iOS, it would work on Android using the proper permissions).
Besides that, there was never a plan to port the editor to mobile platforms.

As for the engine, users will definitely have to install the SDK if they want to build an APK. APRIL works just fine on Android, but as Ryex already pointed out, the libpng and libjpeg headers and libraries haven't been added to our repository yet (and there are some other headers and libraries missing). The only real problem is building Ruby for Android.

Actually that Emulator + ROM idea is a great idea. It would definitely help make things for developers easier (as they wouldn't have to install the Android SDK and Apache Ant).

And yes, the input would be problematic. One way to make it work, would be that developers use "mouse input". And there is still the problem of buttons. e.g. Blizz-ABS has a lot of extra buttons that it uses. So a Blizz-ABS game would not be able to run on a mobile device properly no matter what we do.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Kayin

  • Guest
Re: ARC "Mobile" Discussion
« Reply #5 on: November 01, 2012, 04:18:05 PM »
Hello all!

This is my first post here (I'll go introduce myself afterwards! =3), but I think I do have an idea about how the mobile version issue could be dealt with.
I've been trying to find a way to port any Enterbrain "Maker" game onto Android for the past few days, and the only software I finally managed to do
something with was IG Maker. Sadly, IG Maker is really, really limited (no scripting at all, hence limited customisation, a completely confusing
interface, etc.). But, the point is, I got the game to run on Android!

Like Blizzard said in the post just above mine, I switched the command input type to "mouse" : the only thing Android detects is the "left click" command.
I then proceeded to include an on-screen touch pad, which I think would be the way to do (check Zenonia, Inotia, Spectral Souls and other portable RPG games).
Unfortunately, that's where IG Maker's limitations come in : the engine was confused by the fact I was clicking with my mouse on the pad, which would be assigned
to a keyboard button. IG Maker had designed that function, but it isn't working. Let's say we click on the left arrow to move my character on the left :
clicking on the arrow would then send an information to the engine saying the left arrow (on the keyboard) was pressed.

Basically, we'd have to assign each keyboard button used in the gameplay of the game to a touchpad equivalent, which could be clicked by mouse (the player's finger).
It really works on Android (I cannot say for iOS because I don't have any physical iProduct), but the problem was IG Maker's limitation.

I then exported my game to .swf, and made a small Android project on Eclipse, loading a little .html file which embeds the .swf file in it. Then, I included the .html file
in the Android project with a webview. I followed this tutorial.
Basically, if you can export the game project to .swf and have an onscreen touchpad, the problem is (I think) solved. But of course, if you're able to directly convert
the ARC game project to an Android .apk application, that's even better! My .swf exporting solution just doesn't require any supplementary coding on your side, but
it probably isn't as "clean" as if you're able to directly make an application from the game project.

This was my little input, hope it helps! =3
So far I'm kinda stuck to the point where I have to put my project on hold, because there's no engine suited for my small Android rpg... Porting RMXP games on mobile would be perfect.
Your project needs to be completed! xD

By the way, I'm primarily a vgm composer (I shifted from coding and game design a few years ago), so if you need help for the RTP I'd be glad to write some songs
(a full RTP ost, à la RMXP would be okay too, but would take some more time I guess... but let's say it'd be my way to tell you "please complete the ARC project!" xD)

Best of lucks!
« Last Edit: November 01, 2012, 04:21:24 PM by Kayin »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19917
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: ARC "Mobile" Discussion
« Reply #6 on: November 01, 2012, 04:33:23 PM »
Yes, the plan would to be to convert the game to an actual APK file. There's only a limitation of 50 MB for APK files on Google Play so the user would have to use OBB files. This is where an ARC VM would actually be much more useful. The ARC VM could be distributed as APK file while the actual game data is in the OBB file and there is no file limit. This would allow the flexibility that is needed.

How did you activate the on-screen touchpad? Did you use an external app for that or did you just implement it in your game?
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Kayin

  • Guest
Re: ARC "Mobile" Discussion
« Reply #7 on: November 01, 2012, 04:39:54 PM »
I implemented it in the game, as there's no way to edit the exported .swf once it's out from IG Maker. I created four directional arrows then imported them in the game's library, and made them clickable buttons (with the mouse).

I have no idea of what's an OBB file though, I'll go check that. x]
I have seen some really heavy RPG games on Google Play (Blazing Souls, from the same developper as Spectral Souls, is 1GB), but maybe they use the OBB files you talk about.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19917
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: ARC "Mobile" Discussion
« Reply #8 on: November 01, 2012, 04:57:52 PM »
They're called "Expansion Files" and it's Google's way to get rid of the 50 MB limit while still actually maintaining it. The idea is that you only include critical game resources in the APK and that the actual resources go into that addition .obb file (which basically a zip file just like the .apk is a zip file) if your game exceeds 50 MB.
I'm pretty sure they are using either OBB files or they have developed some code that may download additional data from their own servers.

I was thinking that it would be a good idea to include the arrows in ARC's VM automatically when somebody wants to make a mobile game.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Loveless

  • Trained Member
  • *
  • Posts: 31
  • LV: 1
  • Gender: Male
    • View Profile
Re: ARC "Mobile" Discussion
« Reply #9 on: November 02, 2012, 03:49:54 PM »
Implementing the touchpad arrows would probably be pretty easy but I'm not sure if all android touchpads work the same on all android phones. By that I mean would the HTC One X running Ice Cream Sandwich work the same as the Droid 3 running Gingerbread in regards to the touchpad? Then again, you could probably have the code autodetect the version and change accordingly if it isn't all the same.