Creating android 3d game with Android Studio and Unity - java

I'm trying to create a TBS game with an isometric view for android. I began with Android Studio and I've already designed core parts of the UI including login, registration, authentication, and menus. I'm now trying to create the actual game and I've discovered that in order to make a 3d game, the only reasonably efficient path is to create the game from an engine like Unity3d. Is this true? How can I keep the progress I've already made while doing this? For example, is there a way I can launch and instance of the Unity game and pass the variables needed, while the rest of the app is made using Android Studio? Unity uses C# and I'd prefer Java, is there a way around this? The authentication and user information currently uses Firebase, if I need to rebuild this app in Unity, how can I use Firebase? Thanks for the help.

Check out this: https://www.assetstore.unity3d.com/en/#!/content/58337
That is the firebase API that you can use within Unity,
I do also believe that Unity has some features available for UI so you should be able to build it completely within Unity. Also, you can write the scripts in C#, JavaScript but I don't believe Unity supports Java for scripting out of the box.
Edit
I also just realized, C# is pretty similar to Java, you should really like it.

Related

How to implement Gmail connection in Android games

I am a beginner Android developer and I am working on my first Android game
We all had the experience of Android games. When we enter the game, game ask us to connect via Gmail to it can save the progress of the game for us.
Now what should I do if I want to add something like this to my game?
You have to use google play services for this purpose. As there are many scenarios for login in and saving data from your game, it would be better you go through the following documents for sign-in and saving game data.
As you didn't mention that what you using to develop your game, the installation instructions can't be given specifically. For Android Native, you have to add a dependency on your build.gradle. For game engines, you may have to use packages/libraries developed for that purpose.

Emulate Android in Swing

I want to be able to run my Android code/app on Windows/Mac/Linux/etc. but not use an emulator, as they are slow/cumbersome.
I want a real Java SE app, but to reuse my Android code.
My idea is to make an Android emulator using Swing, read the layout files and create the widgets in Swing and map between the 2 UI event models, life cycle, and library classes.
Question is, does such a thing exist already, I googled it, but could not find anything.
Otherwise I will start an open source project for it myself. Anyone interested in helping is more than welcome.
So I created an open source project "Swingdroid" that lets you run Android apps and Java swing desktop applications.
You don't need to use an emulator or change any code. It loads Android layout files and activities and renders them using Swing.
On GitHub here,
https://github.com/BotLibre/BotLibre/tree/master/swingdroid
I totally agree with #muratgu. But, if you just want to parse Android layouts (views) xml files and render them using Java Swing, this is possible and this has already been implemented, before deciding to make your own implementation, you'd better check the wysiwyg feature of UI editor in Android Studio.

How to convert Tasker app to native app?

Using Tasker for Android (link: https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) and a widget-composing tool, Zooper (link: https://play.google.com/store/apps/details?id=org.zooper.zwpro ) I have automated my Android phone to automatically register certain data whenever the phone enters or leaves certain WLAN-covered areas or connects/disconnects to certain BlueTooth devices.
The registered data is kept in simple Tasker-variables and a widget simply displays (some of) the contents of those variables to the user - it is really that simple.
Together this system works like an ever running background application with an always-updated (simple) user interface (the widget).
I am so happy with what this system does that I now want to convert the whole thing into a real, yet very tiny Android app that can be download and installed from Google Play.
However, I never developed an Android app before (and not an IOS app either!). But being a professional C# developer (and former C++ developer) for Windows desktop applications and Windows services for many years now, I feel confident that I can also learn how to make such a simple Android app, even if it involves programming languages with which I’m not so confident by now (Java for example).
What I need is a few directions to get me started the right way:
Which tools do I need for making such a simple app?
Can it be done in Visual Studio, or do I need to use Eclipse or
Xamarin?
Can it be done in C# or must it be done in Java?
Do I need to buy licenses for development tools (other than Visual
Studio) or can it be done with free software?
How would you go about the whole thing?
Any input will be much appreciated!

Creating an android app from an Eclipse Java project

I know that questions like this have been asked before, and I have been sifting through them. So here is my situation: I have a decent amount of experience using Java, specifically Eclipse, and I have a game ready that from my current standards, could be uploaded to the Google marketplace.
However, I have the project saved as a Java project. How do I make this project into an android app? I have attempted using the ADT plugin for Ecclipse, and changing the nature of the project file but I am beyond confused regarding how to proceed.
Right now I can click: Run < Run as < Java application.
The goal is to be able to click: Run < Run as < Android application.
I don't know of a streamlined way of doing it. Is your game using Swing as a UI? JavaFX? Is it text?
Regardless, I imagine your game would need to be wrapped in an android activity in some way. e.g. The activity can invoke the browser to run your applet (if your game is an applet).
I'd first create an android project, then copy your source from the java project into the android project. The manifest (R) will be updated with the new resources, etc.
Then you have to finish wiring everything up.
It's going to take more than that. Android has it's own UI system and lifecycle that differs from raw Java. Depending on how you've written the game you may be able to reuse a lot of the drawing and logic code but you going to need to make a lot of changes to the input and allowing multiple screen sizes.
Without seeing your code I can say exactly what you'll need to do but I can tell you it's not going to be as simple as Run As... Android Application.
Although android apps are written in Java code, this doesn't means that it is possible to "translate" a java program or a game in an android app simply clicking a button.
If the game are complex I suggest that you rewrite the game using a framework for develop android game!! You can reuse some logic but sure you have to create all the graphics and readapt the game to run in android devices.
GOOD WORK!!
Be patient and star from here:
Androi Developers
It is not possible. You can implement the application logic in Android in the same way that you used in Java, but you cannot simply convert the java project into Android project. Some packages used in your java project (like swing) can't be used in Android.

Send email from game on libGDX engine on Android device?

In my debug version of game, I want to take actual information about game progress from many users on my email. As you know, code in libGDX is writing on native Java without Android context. What suggestions do you know for my problem?
See this page on the libgdx wiki: Interfacing with platform specific code.
What you need to do is create an interface with the methods you need. Then create a class implementing that interface in your Android project. (And other projects if needed, if not needed, just create dummy-files that do nothing)
Then instantiate that proper class where you launch your game, and pass in the object to the game and use it there.
Just follow the guide, and then you can use Android stuff in your game (through an interface).
You can try to use ACRA (Application Crash Report for Android). It automaticly sends you crash reports about every error in your application, that is very usefull by itself. And as I see it has method to declare your own varibles which will be send. That may be what you want. Also it's recommended by libgdx.

Categories

Resources