Lots of pretty awesome news out of Xamarin ( the C#/.NET for iOS/Android guys )

22. February 2013

 

Monotouch and Monodroid ( long since renamed ) are two products that I have *almost* purchased half a hundred times.  If you’ve not heard of them, they are a native port of C# and most of the .NET libraries to iOS and Android.  They have been having a good run and are the underpinnings of a number of very successful projects, such as PlayStation Mobile and Unity3D.  I really like .NET too but… and there is always a BUT.

 

It was 400$ for the basic version.  That’s 400$ for each platform too by the way.  That’s a pretty hard pill to swallow, especially when most of the competing products are free.  Or frankly, you could pick up the full Unity package for less than that!  Monotouch always offered a trial version, but it was limited to the emulator/simulator and if you have ever used the Android emulator on Windows, you know how vile that is!

 

Well, great news! 

 

First off, there is now a free version available that lets you deploy to device!  That said, you can’t p/Invoke to 3rd party code.  I honestly am not sure how much of a limitation that is.  Generally that means you can’t run native code, but still can run .NET assemblies.  If that’s the limitation, it isn’t a huge one.  If it means no libraries though… well, that’s a bit more painful.  I wonder if you can run Monogame, libGDX or PlayN in the free version?  Will look into that and get back to you.

 

Second, there has been a price drop.  It’s now 299$ per platform, per year.  Somehow, that 100$ makes a huge difference for me.  I don’t really like annual subscriptions though, I really wish people would move back towards version releases…  All the same, cheaper is always nice.

 

Third, there’s a new IDE, Xamarin Studio.

382920489522

A little too XCode for my tastes, but I’ll be sure to check it out.  MonoDevelop is nice enough, but never really felt… comfortable if that makes sense.

 

Fourth, and this one is a biggie to many people.  You can build for iOS from Visual Studio on Windows.  Don’t get too excited, you still need a networked Mac to run the native toolchain, but you can do 99% of your work, debugging and testing in Visual Studio.

 

 

Very cool developments!  You can read more about it here.

 

EDIT:

 

A few points of clarification.

First is regarding the 299/year.  It’s not as bad as it sounds, the tools continue to work after a year is up, just no more updates.  That is much more reasonable and developer friendly.

Second is more details on the free version:

Xamarin Starter allows developer to build and publish simple apps, which contain no more than 32k of compiled user code (IL), and which do not call out to native third party libraries (i.e., developers may not P/Invoke into C/C++/Objective-C/Java.

Still not sure where that would leave Monogame, as it isn’t a native library, but it does no doubt make pInvoke calls to OpenGL.

General, News, Programming , ,




New HTML5 gamedev book, Pro HTML5 Games. Ever wanted to create an RTS?

4. January 2013

 

As you can see by the volume of posts here on GameFromScratch.com, I took a bit of a holiday during the, um, holidays.  During that time I did do a fair bit of reading.  One book that came up on Safari is Pro HTML5 Games  ( Safari link if you also subscribe ) that got my attention.  Now, there are a ton of HTML5 game books on the market, of which I’ve read quite a few, but this one is kinda special.  It actually shows how to create a Real Time Strategy ( RTS ) game in HTML5.  I don’t believe there has been a book on creating an RTS since the title Real-Time Strategy Game Programming way back in 1999.  A book I owned by the way and it was awesome… or at least according to my memory of 1999 it was.

 

Anyways, I haven’t completely finished the book, mostly jumped in and read a chapter here and there, but it is certainly an interesting title.  When I finish it, I might do a proper review.  Unlike most HTML books, this one is entirely about creating a single game… obviously an RTS title.  As a result, it covers pretty much every step along the way, as you can see from the detailed Table of Contents below:

 

 

 

Chapter 1: HTML5 and JavaScript Essentials


The canvas Element
The audio Element
The image Element
Animation: Timer and Game Loops
Summary


Chapter 2: Creating a Basic Game World


Basic HTML Layout
Creating the Splash Screen and Main Menu
Level Selection
Loading Images
Loading Levels
Animating the Game
Handling Mouse Input
Defining Our Game States
Summary


Chapter 3: Physics Engine Basics


Box2D Fundamentals
More Box2D Elements
Tracking Collisions and Damage
Drawing Our Own Characters
Summary


Chapter 4: Integrating The Physics Engine


Defining Entities
Adding Box2D
Creating Entities
Adding Entities to Levels
Setting Up Box2D Debug Drawing
Drawing the Entities
Animating the Box2D World
Loading the Hero
Firing the Hero
Ending the Level
Collision Damage
Drawing the Slingshot Band
Changing Levels
Adding Sound
Summary


Chapter 5: Creating the RTS Game World


Basic HTML Layout
Creating the Splash Screen and Main Menu
Creating Our First Level
Loading the Mission Briefing Screen
Implementing the Game Interface
Implementing Map Panning
Summary


Chapter 6: Adding Entities to Our World


Defining Entities
Defining Our First Entity: The Main Base
Adding Entities to the Level
Drawing the Entities
Adding the Starport
Adding the Harvester
Adding the Ground Turret
Adding the Vehicles
Adding the Aircraft
Adding the Terrain
Selecting Game Entities
Highlighting Selected Entities
Summary


Chapter 7: Intelligent Unit Movement


Commanding Units
Sending and Receiving Commands
Processing Orders
Implementing Aircraft Movement
Pathfinding
Defining Our Pathfinding Grid
Implementing Vehicle Movement
Collision Detection and Steering
Deploying the Harvester
Smoother Unit Movement
Summary


Chapter 8: Adding More Game Elements


Implementing the Basic Economy
Purchasing Buildings and Units
Ending a Level
Summary


Chapter 9: Adding Weapons and Combat


Implementing the Combat System
Building Intelligent Enemy
Adding a Fog of War
Summary


Chapter 10: Wrapping Up the Single-Player Campaign


Adding Sound
Building the Single-Player Campaign
Summary


Chapter 11: Multiplayer with WebSockets


Using the WebSocket API with Node.js
Building the Multiplayer Game Lobby
Starting the Multiplayer Game
Summary


Chapter 12: Multiplayer Gameplay


The Lock-Step Networking Model
Ending the Multiplayer Game
Implementing Player Chat
Summary

 

 

If this book sounds interesting, be sure to check it out.  Keep an eye here for a possible upcoming review.

General, Programming




Refreshing Javascript JS file caching in Chrome during development

21. December 2012

I am not sure if a recent release has made it worse or it's always been this annoying, but Chrome does a lousy job of refreshing changes to JavaScript files.  It used to be you simply hit CTRL+F5, or CMD+F5 on MacOS to for the browser to reload with changes, but this simply doesn't work with Chrome, which is really really irritating when developing in HTML.

 

One option is to use a cache breaker, but this is an irritating process.  Basically you just add a random number to the end of your script inclusion script.

 

So instead of:

<script src="MyScript.js">

You do

<script src="MyScript.js?Num=21421423asdfsdf2">

 

Then you basically change the magic number every time you update the script, which WILL result in the new script being reloaded regardless to the browser settings.  In development, this is still a gigantic pain in the arse.

 

Fortunately there is a solution.  On a PC hit CTRL+SHIFT+i or on a Mac hit CMD+Option+i, to bring up the developer tools.  This will bring up the developer tools, now locate the gear icon in the bottom right corner:

Google Chrome Developer Settings Icon

 

Then under the General Tab, select Disable cache:

DisableCacheChrome

 

 

Voila, much more sane JavaScript development under Chrome.

 

 

General




Interesting book coming soon: Learn Lua for iOS Game Development

24. November 2012

 

Looking for the perfect gift for the geek who has everything?  Well, Learn Lua for iOS Game Development is coming out just before Christmas , plus it’s on sale for 25 bucks.  ( What’s with pre-release books already being on sale??? ).

 

 

Alright, hundreds of computer texts are released every year, dozens of them about game programming… so why the interest in this particular book?  You may remember a while back I put together  Battle of the Lua Game Engines: Corona vs. Gideros vs. Love vs. Moai and I actually enjoyed working with all three technologies.  Well this book covers using all three SDKs as well as Codea which I hadn’t heard of until this point.

 

 

Obviously the book isn’t going to cover any of those technologies in detail, each one could probably merit it’s own book.  It should however teach you the required bits of Lua and expose you to a little more detail than my comparison.  Lua is a wonderful little language, one you should certainly look into if you haven’t already.  This book may just be the right introduction, it releases on December 17th.

 

Here is the Table of Contents of Learn Lua for iOS Game Development:

Part 1 – Lua

1. Introduction to Lua
2. System Libraries
3. File IO
4. Math
5. Strings
6. Threading
7. Tips and Tricks   

Part 2 - Frameworks

8. CoronaSDK
9. Gideros Studio
10. MoaiSDK
11. Löve
12. Codea

Part 3 - Libraries
13. Libraries
14. 3rd Party Apps   

 

Most APress books end up on Safari Books Online, so expect a review shortly after this book is released.  It does strike me a bit odd that they would limit the title to iOS games, when Corona, Gideros and Moai all support Android as well ( without change in most cases ) and I don’t believe Love supports iOS at all…?  So if you are interested in Android development, don’t let the title put you off.

General , ,




It’s the end of the world as we know it: Redux! Steven Sinofsky leaves Microsoft

13. November 2012

 

Almost exactly one year ago today, I wrote this post discussing the impact a change in leadership at Microsoft had on all our lives.  The TL;DR version was, two senior VPs at Microsoft went head to head over the future of the company, one lost ( J Allard, father of the Xbox ) and one won, Steven Sinofsky.  Well, as of today, it is looking like Microsoft picked the wrong horse!

 

Simply put, after shipping Windows 8, Steven Sinofsky announced his departure.

 

This can have a pretty profound effect on future directions at Microsoft.  The fallout from J Allards departure were pretty massive.  From a developers perspective, lets see…  XNA has been axed.  Windows Phone 7.x has been axed.  Silverlight has been axed.  The Courier tablet was axed ( imagine the difference the world would have seen if Microsoft entered the tablet market *before* the iPad??? ). We now have Windows 8 as the target for every device, the Windows Store ( I have a feeling this one is an accountants decision, not Sinofsky’s ).  There have even been some micro-level changes as a result.  We have the increased focus on C++ and JavaScript at Microsoft, and the decreased focus on .NET.

 

What’s going to come next?  Who knows actually… and that part is kind of scary.  Agree with his decisions or not, Sinofsky got stuff done and had vision.  Is there a leader remaining?  It’s certainly not Ballmer, that man has been making epically stupid knee jerk decisions since taking the helm.  ( 34 billion for Yahoo?  8 billion for Skype?  )  I really don’t know what is coming next, but I will tell you one thing… up until about 8 months ago, I held Microsoft stock.  I sold it and if I held it today, I would be on the phone to my broker now.

 

That’s the shame too, as Microsoft has managed to recruit some of the best A-list programming talent in the world.  Too bad they can’t do the same thing for their management.  Then again, you aren’t going to fix management at Microsoft when you have an idiot at the helm… they tried that once bringing Ray Ozzie in and Ballmer pushed him out.

General, Totally Off Topic