RubyMotion and GameKit for turn-based game - game-center

I'm new to RubyMotion and although I found some good tutorial I cannot find anything about using RubyMotion with GameKit and GameCenter.
The Context: I have done a Tic-Tac-Toe game to learn RubyMotion. The game works fine locally, but I want to add multiplayer capabilities. That tutorial (http://www.raywenderlich.com/5480/beginning-turn-based-gaming-with-ios-5-part-1) in Obj-C is very comprehensive, but I failed to translate it to RM.
The app is very (very) simple, and very letterpresse"esque" (minus the design). It consists in a single tableview with started games and new game option, and the view for the Tic-Tac-Toe itself.
Does someone have experience with the GameKit framework in RubyMotion, or have found a tutorial on the subject? Actually, I cannot even make the first step of authenticating the user when the app loads (something like GKLocalPlayer.localPlayer leads to uninitialized constant and so on).
Thank you for your time!
P.S. It's my 3rd app (but first in RubyMotion) so I would think GameCenter and AppID, etc. are properly configured on iTunesConnect

Ok found it... I had to include the framework in the Rakefile.

Related

How to create a web application framework

I want to attempt creating a framework like Ruby on Rails but for Rust. I know it will take long and it's a lot of work but I figured it would help me better understand the abstractions that are used in frameworks and reasoning behind framework developers' decisions. By building a framework I will also get to learn lots about the framework I'm building. The only projects I've created with Rust is Philip Opperman's Rust OS, a Ray Tracer and a sudoku game using the Piston engine. Can anyone give me some tips/pointers on how to go about this project or where to start? I want to build it specifically for API development.

New to coding trying to learn JS and node . . . do I need an IDE or will Sails.js do it all?

I'm completely new to coding and I'm wondering if I will need an IDE or text editor if I'm using something like Sails.js (a real time MVC framework) in the attempt to build a node app. It seems like the IDE/text editor functionality is built into Sails.js. For more on Sails (http://www.sailsjs.org/#/).
Btw, I'm not looking to grow into a CTO but rather I'm a DiY entrepreneur that wants to build an MVP and go about building a team or raising money with prototype in hand. I care nothing for learning great practice or fundamentals of programming besides what's pragmatic for the express goal of building an MVP as I have no interest in being a career programmer. Having said that, I'd like my MVP to work and I don't want to do something dumb either.
Thank you for the guidance!
Sails is a web framework. You will need some kind of text editor in order to write code to handle each request. I suggest you start a level up and learn the basics of what a language is and how it plays into building an app before you select a framework or runtime.
Something like http://www.codecademy.com/tracks/javascript can get you started.

What is relation between openfl, flambe and awe6

I do know that all three can be used to make mobile games. And can create fast games. But i only know of openfl which i learned is something called nme but improved.
So i would like to know couple of things...first simply describe them and their relations..then their disadvantages plus advantages..and your preference and why.
Secondly, verify my assumptions...
you need to know haxe.
you need to understand openfl on top of ex. awe6?
Laslty can you summarize the workflow of how you go from idea to making app with openfl or and flambe/awe6...etc.
http://getflambe.com/
https://code.google.com/p/awe6/wiki/ProjectObjectives
OpenFL is not a game engine. It is a cross-platform tool based on Haxe and open-source implementation of Flash API. It allows to write and deploy applications to many different platforms from one codebase. Also you can find more info on OpenFL on its github page.
Unlike OpenFL, Flambe and AWE6 are game engines. They can be compared to HaxeFlixel, HaxePunk and other game engines based on Haxe. The main defference between these two is that AWE6 is using OpenFL to target platforms such as iOS and Adnroid, while Flambe is focused more on HTML5 and Flash games. It can be also used to target mobile targets, but native Android and iOS apps are packaged using Adobe AIR.
you need to know haxe.
Yes, but if you already have some experience with Flash API and you are using OpenFL, the learning should be very easy.
you need to understand openfl on top of ex. awe6?
AWE6 is based on OpenFL, so yes, but as far as I know, only basics. The main workflow is wrapped by game framework.
And the answer is "no" for Flambe, because it is not based on OpenFL.

Porting Windows Phone game with Xamarin

I currently have a very simple memory game for Windows Phone that I would like to port over to iOS, Android and possibly Win8 using Xamarin tools.
I would like to centralize my business logic in one assembly and simply create the UI for each platform.
For the most part, the code is simple C#, but I do make use of Bitmaps to show the cards in the game. However, from what I've read, there is no standard support across the different platforms for using Bitmaps.
What would be a recommended approach to this problem?
I'm thinking I have to use something like MonoGame, but feel that is overkill for what I want to do.
You say your code is in C#. As far as I know Xamarin is the only way to get C# code to run on Android and iOS. Xamarin has a free starter edition that you might be able to use but your app will be size limited. Once you hit the size limit you'll need to pay for a license.
After you've decided to pay for a license there are no other costs involved if you want to use MonoGame for the port. If your game is already using XNA or you have some XNA experience I recommend using MonoGame. MonoGame is a port of XNA and is designed for making games, so many game related tasks are easier.
The alternative is to build your game as an app using the standard app building API. This is possible but I can't see any advantages doing it this way unless you are trying to save money by using Xamarin's free edition. If you plan to make more games in the future, you'd be better off biting the bullet and learning MonoGame.
Using bitmaps with MonoGame shouldn't be a problem. Although, you may need to convert them to PNG's first.
Centralizing the business logic in one assembly is sort of possible using Portable Class Libraries but due to the limitations of PCL's it's often easier to use file sharing. Basically you have a soft link to the files in each project. Updating the files updates them in all projects at the same time, but adding new files requires you to add them to each project individually. It's a little bit of a maintenance pain, but not much.
For sure, as a starting point you should separate UI and logic.
To reach this I highly recommend you to make console version of game. Using console it is possible only send commands with parameters to application. No mouse or real-time keyboards usages. All UI-related tasks will be left. Only business logic and commands to use will remain.
Then, you should try MonoGame. It's reliable enough for 2D games. Even more, If IL-code is not too much, it's free for iOS and Android!
Other way is... Unity 3D. Using that engine is depends of code you wrote. In some cases it's possible to use that game engine with shared business logic. Thanks to new Unity 3D policy, indie game developers could make and deploy their games for free.
In short, plan is:
Implement core functionality (with console I/O);
Then, choose engine and implement UI for target platforms.

HTML5 canvas and BDD - Cucumber

I was learning about Behavior driven development (BDD) recently, i see that its good for CRUD web application.
Is BDD tools such as Cucumber suitable for games, specifically are they good for HTML5 Canvas games?
Is there any other BDD tools for HTML5 canvas games? Or Is BDD only for CRUD applications?
I've just recently been experimenting with BDD and Games Development. But I'm building on the .NET & XNA Frameworks with C#. I'm using Visual Studio as my IDE and testing with SpecFlow and NUnit.
SpecFlow is the BDD/Gherkin tool - and as a group we've been talking about the game and fleshing out some requirements and documenting them in Gherkin... and going from there. The key is designing the game to be testable.
We've abstracted the game engine away from main "game loop" implementation that XNA requires so we are able to load it up and inject all of the dependencies it requires. We then run the tests on the engine and make asserts on the code afterwards to make sure that it is behaving correctly.
We decided early on that Graphics/Drawing/Sound/etc were out of scope of the testing... if they were broken in the end product, it would be very obvious. The test suite we've managed to build up just gives us the confidence that the mechanics of the game itself are working as intended (i.e. is game object A in the right location? does game object B die when hit with projectile C? etc. etc.).
So far it has been quite a good experience.
The question is: can you think of ways to interact with the canvas-based game in JavaScript?
Practically, could you open the JS console and interact with the game from there? Can you fire clicks at the right coordinates, can you press keys and most importantly, can you make assertions on what's being output by the game?
If the answer is yes, then you are able to automate the game in JavaScript and either Cucumber or Cucumber.js can definitely be used on top of that.
If the answer is no and you can't figure out a way to automate the canvas content in a similar fashion than what described above, then I'm afraid no automation tool could do the job.
To answer your second question: BDD has absolutely nothing to do with "CRUD" applications. It's about describing behaviours and automating examples that illustrate those behaviours. You can therefore take a BDD approach on virtually any types of application.
Shouldn't you find a way to automate your application, you could still consider writing scenarios to document the (expected) behaviour of your app. The automation phase is not mandatory, contrary to common beliefs :)

Resources