Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


26. January 2012

 

 

You may remember me discussing PlayN in previous posts, it’s a Google run cross-platform, open source game library.  Previously the most missing feature was iOS support and frankly that feature is still missing, but there is light at the end of the tunnel!

 

 

PlayN developer Michael Bayne recently made a post announcing he had successfully got the Peas demo running on an iPhone4. IMG_0935Without a doubt this progress is a “very good thing”, as iOS support is easily the most important missing feature of PlayN today.

 

 

Michael’s progress:

 

I got side tracked by trying to get things working on a real device.
The simulator runs the Mono VM in JIT mode (though with various
restrictions in place to ensure that you don't do anything that's
incompatible with AOT compilation), but actually doing AOT compilation
enforces substantially more restrictions. I had to "refactor" IKVM to
contain no references whatsoever to System.Reflection.Emit even if
they were never called. I also bumped into a Mono compiler bug and
spent some time digging into the internals of IKVM and mcs (the Mono
compiler) so that I could come up with a work-around and file a
sensible bug report. It turned out to have already been fixed in trunk
(which made my investigations that much more perplexing), but since
MonoTouch is commercial software, I was necessarily working with the
latest beta release, not trunk; annoying!

Performance of the Pea Physics demo is not stellar on an iPhone 4
(it's quite reasonable, it's just not silky smooth 60 FPS with twenty
or thirty peas moving on screen). It's pretty comparable to what I've
see on actual Android devices. Depending on what Box2D's interfaces
are like, there's a possibility that it could be improved by writing
an interface-compatible implementation of Box2D directly in C#. C#
supports value types, and in a physics simulator, being able to store
your Vec2s and Matrix3s directly inline, rather than separately on the
heap, can substantially improve cache performance. That said, the
Box2D implementation, as is, is not very data-oriented. Rewriting it
to store all of the entity geometry in big flat arrays and to perform
its calculations by iterating over those arrays, rather than following
a zillion pointers through the heap, would probably help a lot on
every platform.

Now that I've got things running on an actual device, I'll go back to
finishing up the platform implementation. IOSCanvas is substantially
done. IOSStorage is done (built on Sqlite). IOSTouch (and IOSPointer)
are done. I need to implement the font and text rendering bits of
IOSGraphics/IOSCanvas. Then IOSSound, IOSNet and other niggling bits.
I'm not sure what I'll do about IOSKeyboard. I'd kind of like an
additional interface for requesting a string of text from the user,
which would allow the keyboard to pop up in "edit a line of text" mode
so that the user can use the standard copy/paste and click with
magnification text navigation. Having the app respond to key events
and attempt to implement text entry directly is a massively bad idea
(on any mobile device), IMO.

 

 

Excellent news and great work Michael! 

 

So for the people looking to see if PlayN works with iOS, the answer is no, but it’s damned close!

Programming

blog comments powered by Disqus

Month List

Popular Comments

Welcome to the updated GameFromScratch.com
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


Home > News >

26. May 2015

 

I will admit, the end results look a heck of a lot like the starting point, but behind the scenes it was pretty much a complete rewrite of all the underlying CSS and a good chunk of HTML changes.  Sorry for the delay in new tutorials, but the end is finally here.  I ended up keeping a very similar over all layout and colour scheme to the original site.  I had a darker theme temporarily, but it was harder to read and caused me to receive a fair number of less than happy emails… ;)

 

 

So what’s new here?

 

The most immediately obvious is the old interface has been stripped away.  Outdated menus to obsolete tutorials no longer clutter the site.  Behind the scenes, the HTML is optimized and the page should load better.  The biggest changes are highlighted below.

 

Responsive and Mobile Friendly site

 

This was the number one reason behind the rewrite.  Basically Google tied their search rankings to the mobile friendliness of a site.  I could (and did) turn on the mobile theme for the site as a temporary workaround, but having separate styles for different browsers was ugly.  The new site now scales better across a broad range of devices, from high resolution monitors to small mobile screens.

 

Here for example is the site running on my HTC One mobile phone.

GFS

 

The layout is such that an iPad in portrait mode will get the mobile site, while turning to landscape will get you the full UI.  Use the icon in the top right corner to bring down the site menu.

 

New Getting Started Page

 

A lot of people arrive here with no prior experience.  I have set up a new landing page to get them started with a series of simple questions.  I will be expanding upon and improving this area over time.

 

New Game Engines section

 

Over time I did “Closer Look at” guides for a number of game engines.  I have gathered them together into a single resource, and intend to start adding more guides for more popular engines very soon.  Thing of this as an ideal resource for getting started choosing between different game engines.

 

New Tutorials Page

 

This area is still very much a WIP.  Basically I have done a number of tutorials for a number of different  gamedev topic.  This page is going to bring them all together on one spot.  Once again, very much a work in progress.

 

image

 

Video Section

 

I’ve been producing more and more video tutorials, hosted on YouTube and linked from individual blog posts.  The video gallery is an attempt to bring all of these videos together in a single location.  Still very much a work in progress too.

image

 

Miscellaneous Small Changes

 

There were tons of small incremental changes… site actually has icons now, links to Digg removed, tags improved, font and colour changes, etc.  Most importantly though, Google is now happy and hopefully so are you all.

 

Hopefully you find the new site to be an over all more pleasant experience.  Some things are still in a WIP stage, but good enough IMHO that I can focus again on creating content while I slowly fix the rough edges.  There are bound to be a few bugs, so if you catch one, let me know.  Also, if you absolutely hate a change I’ve made, please also let me know!

News

blog comments powered by Disqus

Month List

Popular Comments