offline/standalone architecture

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
casperjeff
Posts: 19
Joined: 12 Aug 2013, 22:21

offline/standalone architecture

Post by casperjeff »

Let me preface this by saying that I am a longtime Java developer - 12 years of writing server-side java applications - both web and batch.
The idea of writing game logic in my "native" tongue makes me giddy with excitement.
That being said, my team is developing a turn-based Unity client game with SmartFox as it's backend gameserver (as an authoritative server - but no physics/gameobject stuff)

I have been handed certain requirements to allow so elements of gameplay (including a basic game against AI opponent) to be allowed 'offline' (when using mobile device client).
:(
grumble.
While I am certain that I can contain the necessary abstracted "business logic" in a core set of functions, I have zero desire to maintain in both Java (for smartfox) and C# (for client-side standalone).

My original idea was to encapsulate this core business logic in a C# dll and use on both unity client and server-side as appropriate - but knowing what I know about the .NET CLR, this is probably a non-starter -
I can't use JNI/JNA as the C# stuff isn't really 'native' - and if I could, I don't know how performant or scalable it would be with SmartFox.
Any other thoughts?

I am currently leaning towards java-only solution using a build script that could produce a smartfox extension as well as an android plugin that can also be used on Android clients (which rules out IOS clients)

Any other advice or thoughts?

(and no - I have no desire to use one of the C# based server solutions like Photon or uLink - they have their own drawbacks - not the least of which is their LACK of support for my language of love - Java)
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: offline/standalone architecture

Post by rjgtav »

Hi,

I'm sorry for the delay, got some problems with my pc this previous week...
Well, I've not much experience with Unity yet, but I've already played with Java plugins and they did seem to run quite well.

If the business logic that you want to implement on both sides is not much intensive, then I'd certainly go with the Java plugin way, as it will enable you to develop once and deploy on both sides at the same time.

I think my only tip is to, what takes to Android, to support the lowest API level possible, so that you can reach more user base.

Hope this helps
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Post Reply