Reviews

 

 

 

This is where I will gather the various reviews GameFromScratch publishes. True, it is a little sparse at the moment, but expect that to improve in time!  If you have a product you want to learn more about, let me know!  Did you make a product that would be handy to game developers and want it reviewed, again let me know.  Sending me a copy won’t guarantee you a good score, but it will almost certainly get you a review; from there the quality of your product determines the result!

 

 

 

Applications

 

 

 

 

Photoshop Touch for Android Tablets

 

Could it be the first real contender for the undisputed Photoshop throne comes from its 10$ little sibling?  Well no, but it comes damned close!  If you have an Android tablet ( or as of Spring 2012 and iPad ), I highly recommend you read this review! Read on…

 

 


 

 

 

Daz3D's Hexagon 2.5

 

Hexagon is a 3D modeling application, primarily geared towards creating assets for DAZ’s Studio application.  It is a full featured modeler, loaded with potential, but burdened with some very serious flaws.  Read on…

 

 


 

 

 

MacInCloud.com

 

MacInCloud.com provides on demand Mac computers in the cloud that you can remotely control.  They are pre-configured with all the software most game developers would want.  Much cheaper than buying a full Mac, but does it work?  Read on…

 

 

 

 

 

Books

 

 

 

 

Unity Book Roundup

 

Not actually a review, instead a comprehensive list of all currently available and upcoming books covering game development using Unity.

Read on…

 

 


 

Javascript: The Good Parts & Javascript: The Definitive Guide


This is actually a pair of reviews in one.  These two Javascript books couldn't be different, but both are extremely good reads for vastly different reasons.  If you are developing in Javascript, you should check them out.

Read on…





blog comments powered by Disqus


Day 0 With Moai: Setup and Hello World

Day 0 With Moai: Setup and Hello World

22. August 2012

 

SDK is downloaded and installed.  For some bizarre reason, you need to sign up before downloading the SDK ( which… is freely available in source code form on Github… ).  Once you’ve signed up and signed in, head over to https://dashboard.moaicloud.com/download.php and download it.  Personally I am using the August developer snapshot, because apparently, I am crazy like that.  Once downloaded, unzip somewhere, I went with C:\ because I am a lazy lazy man.

 

So, this is genesis…

 

image

 

Pretty sparse over all.  The docs contain a handful of PDFs, but they appear to be seriously out dated.  MoaiProjectSetup.pdf is certainly worth the read though, it’s got the most technical details that still seem relevant.

 

For now, I simply care about getting a Windows host working, iOS, Mac and Android can come at a later date.  No sense adding an unnecessary layer of complexity right now.  Moai provides a sample Windows host based around GLUT, you can load the source code for Visual Studio 2010 at C:\moai-sdk\hosts\vs2010.  It has already been compiled at C:\moai-sdk\bin\win32 as Moai.exe.  To make life a bit easier, I am going to add this to my PATH environment variable.  This is completely optional, but I tend to find it makes life easier.  To append MOAI to your PATH environment, from a command run:

setx PATH “%PATH%;c:\moai-sdk\bin\win32”

Oddly enough, permanent environment variable changes do not apply to the current session, so you need to exit and start a new command prompt.  Now you can change into the directory of and run one of the samples.  Let’s try that now, open a command prompt and type:

cd \moai-sdk\samples\hello-moai

moai main.lua

 

If everything is configured correctly, you should see:

image

 

Well, that was easy enough, up and running a sample in about 10 minutes including download times.  Until we actually need to extend the functionality of the client, the default host should be good enough.  You may also noticed, there are .bat and .sh scripts in each example directory if you don’t want to bother setting the path to moai.exe.

 

Now to give creating a new MOAI project a shot.  Obviously Hello world seems a sensible enough place to start, in fact I believe it is the law.  Therefore we are going to create a simple application that creates a window and displays “Hello World” centered.  Create a new folder somewhere and create a file main.lua in your favorite text editor.  You need to copy a .ttf file named courier.ttf ( or rename it in the code to match ), I simply copied mine from c:\windows\fonts\. Now enter the following code:

 

MOAISim.openWindow("Hello World", 800,600)

viewport = MOAIViewport.new()
viewport:setSize( 800,600)
viewport:setScale( 800,600)

layer = MOAILayer2D.new()
layer:setViewport(viewport)

MOAISim.pushRenderPass(layer)

chars = 'DEHLORW'

font = MOAIFont.new()
font:loadFromTTF('courier.ttf',chars,120,72)


text = MOAITextBox.new()
text:setString('Hello world')
text:setFont(font)
text:setTextSize(120,72)
text:setYFlip(true)
text:setRect(-400,-300,400,300)
text:setAlignment(MOAITextBox.CENTER_JUSTIFY,MOAITextBox.CENTER_JUSTIFY)

layer:insertProp(text)

Basically we:

  • create a window
  • create a viewport for that window, sized at scaled to 800x600
  • create a new layer and set its viewport to the viewport we just created
  • tell Moai we want to render our layer
  • create a series of chars represent the characters in HELLO WORLD
  • create a font loading from the file courier.tff ( which I stole and renamed from c:\windows\fonts )
  • created a MOAITextbox, set it’s text to ‘Hello world’ and font to our newly created font, at 120 font size and 72 DPI
  • we then flip it, as for some bizarre reason, the default text is inverted, and position it in the center of the screen, relative with (0,0) repesenting the middle of the screen, so our dimensions our – 1/2 x,y to + 1/2 x,y
  • finally we tell the text to draw centered vertically and horizontally within the TextBox
  • Finally we add our textbox to our layer with a call to insertProp()

 

Run it and:

image

 

All told, a little complex for a typical Hello World application, but nothing too outrageous.  There are some oddities, like the inverted text, but as you can see, there was also a great deal of control.  Considering this is an application that will run on many platforms, all told, that wasn’t too painful of an experience, was it?

 

 

As to the SetYFlip() question, there is an answer of sorts here:

One thing to note about “setYFlip.” While all other props in Moai will automatically assume a world style coordinate, a textbox will assume a window style. To get the textbox to render with world style, you set YFlip to true.

Clear as mud? Winking smile

General ,







blog comments powered by Disqus