Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon

28. February 2013

I have decided to take a closer look at the Loom game engine that I mentioned recently, as I am an absolute sucker for new game engines, especially ones that are currently free.  You can consider these posts a cross between a diary and a review as I dive in to what it's like using Loom.  Of course, I am also documenting the process, so if you are just getting started with Loom hopefully these posts prove useful for you.

 

Alright, let's jump right in.

 

Quick summary to those that didn't read the above link.  Loom is a 2D game engine, based around a custom scripting language Loomscript, which is a bastard love child of ActionScript and C#. Behind the scenes it is written in C++ over the Cocos2D-x library (and others) and you can get full access to the source code. Full disclosure, I've never actually used ActionScript before, but I have a fair bit of JavaScript and C# experience as well as a copy of the book The ActionScript 3.0 Bible so hopefully I can puzzle things out as I go.

 

Getting Started -- Installation and creating your first application

 

First things first head on over to TheEngine.co site sign up and download Loom.  Be sure to use a valid email address and password, you are going to need them later.  Log in and download the version most applicable to you.

Loom1

 

In this particular case, I'm using MacOS, but it should simply be a matter of substituting the words "command prompt" wherever you see "Terminal".

 

Now that it's installed, welcome to an interesting part of Loom.  It is command line driven.  During installation it will have installed itself to somewhere in your systems path (/usr/bin/loom in my case on Mac OS), simply open a terminal/command prompt and change to the directory where you want to create a Loom project.

Now type loom login

When prompted for credentials, use the username and password you signup with.  If all went well you should see:

Loom2

 

If you don't get Login successful! well, good luck finding out if TheEngine.co has good support or not. :)

 

Now we actually want to create a project.  From the same terminal window type:

loom new ProjectName

like so:

Loom3

 

Voila, a new project should have just been created for you.

 

Now simply change into your project directory and type loom run

Loom will now download the latest SDK and compile your code like so:

Loom4

 

And assuming everything went well, your skeleton application will run:

Loom5

And you've just created and run your first loom application in about 4 minutes work.

 

Now for the first annoyance… for some reason, after calling loom run once you close your application window, the script is hung.  You need to CTRL+C to stop execution of the script in your terminal window.  Small oversight, but kinda irritating… at first it just seemed like it was simply hung up, especially as my LoomTest application didn't get focus on execution, so I wasn't even aware it was running at first!

 

Anyways, that's a pretty small beef and something easily fixed in time.

 

 

Setting up an Editor

 

Command line tools are all nice and good, but I am spoiled from years of Visual Studio development… I like working in an IDE or at least an editor.  Fortunately Loom has configurations for a very good one available, Sublime Text.

 

This part is completely optional, but I am now going to configure Sublime Text to work with Loom.

Initially all I am going to do is add LoomScript syntax highlighting, I don't really mind switching to a terminal window to build/run my application.  To do so, head over to this thread and download the linked bundle zip file.  I assume you have already installed SublimeText, if not, do so now.

Extract the zip file.  Inside the extracted folder is another folder called LoomScript.  Copy it.

(The following is MacOS specific)

Open Finder then hit Command Key + Shift + G

In the field enter ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/

Paste the folder LoomScript in this directory.

Now start Sublime Text and select File->Open… and navigate to the folder you created your Loom project in.  If should look like this with complete syntax highlighting.

Loom6

 

This mostly just gives pretty syntax, if you want closer to a full IDE experience, be sure to read this post!

 

TheEngine.co apparently have a full IDE in the works, but for now, IDE should prove a usable solution.  I am going to continue investigating getting code completion working though, a feature I really like.

 

Learning Loom

 

This part may not seem immediately obvious… so now you have your game created, how do you actually go about learning Loom?  

Well, there are two ways.  First off, there are a series of examples you can download and dissect from right here.

Second, in your terminal, change to your project directory and simply type loom docs 

The documentation will then be loaded in your default browser like so:

Loom7

 

Well, we are now setup and running with our first primitive app.  That's enough for now, in the next part I will get down to writing some actual code.

 

You can read the next part right here

27. February 2013

With the fundamental shift from a fixed to a programmable pipeline, finding modern style OpenGL resources can prove a bit tricky.  Therefore I have put this page together to show a collection of useful modern GL related links, books and materials.  If I missed something you believe I should add, please let me know!

 

Tutorials, Wikis and eBooks

 

http://www.opengl.org/wiki/Main_Page

The OpenGL wiki, probably the place you should start.  Contains documentation on most of OpenGL as well as complete references for both OpenGL functions and GLSL shader programming.

http://www.opengl.org/registry/

Specs and documentation for OpenGL.  Loads here but a bit… stark.

http://ogldev.atspace.co.uk/

A series of 40 OpenGL tutorials including lighting, shading, normal mapping, skeletal animation and more.

http://www.arcsynthesis.org/gltut/

Actually an ebook, covers most of OpenGL

http://open.gl/

Another series of OpenGL tutorials covering a range of subjects and bordering on being an ebook.

http://www.opengl-tutorial.org/

A series of OpenGL tutorials for OpenGL 3.3 and higher.  Broken into basic, intermediate and misc categories.

http://openglbook.com/the-book/

Another ebook on OpenGL, some on 3.3, some on 4.0.  Makes use of freeGLUT and GLEW.

http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/

A series of GLSL tutorials.  GLSL is the shader language used with OpenGL.

http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Table-of-Contents.html

An intro to modern OpenGL.

http://www.ozone3d.net/tutorials/

Ozone3d offer a range of tutorials on a number of OpenGL subjects ( as well as Direct3D tutorials if you are interested ).

http://www.opengl.org/sdk/docs/tutorials/TyphoonLabs/

Typhoon Labs GLSL tutorials ( PDF format ).

https://developer.nvidia.com/opengl

nVidia have a half dozen tutorials available at the above link, as well as a number of tools such as the NVIDIA PerfKit and Cg and FX Composer.

http://developer.amd.com/tools/graphics-development/

AMD's (ATI) developer page.  No tutorials, but a number of useful applications for developers.

http://sfml-dev.org/tutorials/2.0/window-opengl.php

Using OpenGL with SFML.

http://www.sdltutorials.com/sdl-opengl-tutorial-basics

Using OpenGL with SDL

http://lazyfoo.net/tutorials/OpenGL/index.php

LazyFoo's OpenGL tutorials.  Some are OpenGL 2.1 era while later ones are more modern style.

 http://antongerdelan.net/opengl4/

A work in progress series of OpenGL 4 tutorials.  Only the tutorials with working thumbnails currently exist, but certainly one worth keeping your eye on!

http://www.mbsoftworks.sk/index.php?page=tutorials&series=1

Another series of tutorials for OpenGL 3.3 (and higher).  Pretty good collection of materials covered from beginner to intermediate topics.

http://theorangeduck.com/page/writing-portable-opengl

The title says it all. Covers writing OpenGL code that can run on multiple platforms with minimal changes.

Code Samples

 

https://github.com/tomdalling/opengl-series

A series of code samples to go along with the tutorial series from http://tomdalling.com/.  Cover setting up Xcode, Visual Studio and Linux, as well as texturing, model loading, cameras, matrices and more.

http://www.gamefromscratch.com/post/2012/07/03/A-series-of-OpenGL-samples.aspx

A series of well commented modern OpenGL samples that make no use of an external library.  Includes some advanced samples such as a Voxel rendering engine.  Note, these tutorials aren't hosted on GameFromScratch, we simply provide a table of contents and description of each in one place.

http://sourceforge.net/projects/ogl-samples/

OpenGL samples from the author of the GLM library mentioned below.  Website explaining what is contained is available here.

 

Libraries

 

GLFW http://www.glfw.org/

GLFW is a cross platform open source library for handling window creation and management as well as dealing with input.

GLEW http://glew.sourceforge.net/

GLEW stands for OpenGL Extension Wrangler and it makes working with OpenGL extensions easier.  It makes it easy to querying if a device supports a given extensions as well as calling that extension a much simpler process.

GLUT http://www.opengl.org/resources/libraries/glut/

GLUT stands for OpenGL Utility KIt and it is for creating and handling Windows like GLFW as well as keyboard, mouse and joysticks in a cross platform manner.  It is not being actively developed, so other options are probably better choices.  The last release was in 1998.

freeGLUT http://freeglut.sourceforge.net/

Is an open sourced implementation of GLUT under more active development than GLUT.

SDL http://www.libsdl.org/

Simple DirectMedia Layer is a 2D game programming library that can be used to create windows and handle input, as well as simplifying many 2D graphic tasks.

SFML http://www.sfml-dev.org/

SFML is a 2D game programming library built over OpenGL.  Like SDL it can be used for window creation, input, audio and more along side your OpenGL library.

OpenGL Mathematics http://glm.g-truc.net/

Header file only C++ mathematics

 

As you may have guessed at this point, OpenGL has no facilities for creating windows or handling input, sound, networking, etc.

 

 

Books

 

OpenGL Programming Guide: The Official Guide to Learning OpenGL Version 4.3 (8th Edition)  (Safari Link) OpenGL 4.3

OpenGL SuperBible: Comprehensive Tutorial and Reference (5th Edition) (Safari Link) OpenGL 3.3

OpenGL 4.0 Shading Language Cookbook (Safari Link) OpenGL 4.0

 

 

Language Bindings

 

OGLPlus http://oglplus.org/

OGLPlus is a C++ wrapper for OpenGL 3.x and higher.

OpenTK http://www.opentk.com/ 

OpenGL, OpenAL and OpenCL wrappers for .NET languages such as C# and VB.net.

PyOpenGL http://pyopengl.sourceforge.net/

OpenGL, GLU, GLUT wrapper for Python.

JOGL https://jogamp.org/jogl/www/

OpenGL bindings for Java.

LWJGL http://www.lwjgl.org/

Lightweight Java Game Library, a Java layer over OpenGL, OpenAL, OpenCL as well as additional input support.

( There are many many many more language bindings/wrappers for OpenGL for dozens of languages.  These are some of the most common ).

 

 

See Also

 

OpenGL ES 2 http://www.khronos.org/opengles/2_X/

OpenGL ES 2 is the most modern reference implementation for OpenGL on mobile or embedded devices.  It's derived from OpenGL 2 and is very similar but varies in some ways from desktop OpenGL.

WebGL http://www.khronos.org/webgl/

WebGL is OpenGL ES 2 for the web, it is a JavaScript based library.  WebGL support in modern browsers is getting better, but is by no means universal, nor is the performance consistent between browsers.

Mesa3D http://www.mesa3d.org/

On open source implementation of the OpenGL standard, currently compatible with OpenGL 3.1.

OGLPlus http://oglplus.org/

OGLPlus is a C++ wrapper for OpenGL 3.x and higher.

26. February 2013

 

Just saw this pop up on Reddit and I thought I would share.  Yesterday a new engine was released, Loom.  (Nothing to do with the excellent game from LucasArts).image  Loom works on Mac and Windows and can target Mac, Windows, iOS and Android.

 

 

 

Loom is a new game engine 2D game engine, written in C++ and powered by their own custom scripting language, which is a mix between C# and ActionScript.  Looking at the code samples, this engine is obviously built over top of the Cocos2D game engine, which is one of those love it or hate it APIs.  Built around a command line interface, you can rapidly create and debug projects.  Additionally it includes a gameplay framework, UI library, Tweening library, Chipmunk physics, unit testing and more.

 

 

 

 

Licensees get the complete C++ source code and right now, licenses are free.  Eventually indie licenses will be 500$, and going up from there, so if you are interested, be sure to snatch up a license now.  You can read full details about the licensing here.

 

There are a good number of demos available with source code.  They also offer paid support, which is always handy.

 

You can learn more about the Loom engine at TheEngine.co.  Clever name that… Sign up for a free license here.

News

25. February 2013

 

Samsung and Chillingo have launched their 100% indie campaign.

image

 

Basically they are offering developers (initially) 100% of revenue of games sold in their app store.  As of writing, there are just under 7 days remaining to submit the (note, not your) application if you are interested.

 

I have a couple Samsung phones and I have to say, I never liked their app store. That said, if you are developing or developed an Android game, I can think of few reasons not to submit it.  Another sales outlet is always a nice thing, as of course are 100% royalty rates.

 

Very few details exist right now, so be sure to read the fine print… when you find it.  You can sign up here.

News

24. February 2013

 

A new beta release of the PlayStation Mobile SDK has just been released.

 

First off, it’s very important to realize this is a *BETA RELEASE*, meaning you can publish with this version.  This version also cannot be installed side by side with the release version.

 

Key changes in this version are:

 

Changes in Version 1.10.00

  • PS3(TM) wireless controller is available on PC Simulator.
  • Screen can be scaled and rendered automatically when actual device screen size is different from specified size in the program.
  • ADPCM format supported in Sound class.
  • New APIs added to SoundPlayer and BgmPlayer.
  • Camera and Location APIs added.
  • Improved CPU performance on PlayStation(R)Vita.
  • Fixed some issues of HTTP/HTTPS connection.
  • Fixed other issues.

 

Some pretty nice changes in this release.  The use of a PS3 controller with the Simulator was a huge missing feature, it’s nice to see it added as you can now test analog controls in the simulator.  Adding GPS and Camera SDKs is also quite nice, as of course are performance fixes.

 

You can read the full details here.

News ,

Month List

Popular Comments

Crashing when Diablo 3 patches? Here is a possible fix.
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


6. June 2012

 

I can always tell when Diablo 3 servers are being patched as I get an influx of visitors viewing this page.  I wrote that when I was experiencing crashes when they last patched the Diablo 3D3Boom servers.  It would appear the server patch crashes are still occurring.

 

To people having this problem, this post is a much more concise description of the problems I had, and the fix.  So if you are unable to log in to Diablo after a server patch, or the patcher is giving you “Diablo III is already running” or “Diablo III has stopped working”, this might be the fix to your problem.

 

Basically what it boiled down to is the Blizzard installer gave me the en-GB ( Great Britain ) installer instead of the en-US one.  This is all fine and good, until Blizzard releases a patch.  The problem is, the US patch is released first, causing all the people connecting to the US servers with a non-US client to crash until the other servers are patched.

 

It may be possible to work around the problem by manually editing the patch_url in your agent.db file, I had some initial success this way.

 

However, the *best* solution, is to reinstall using the client native the server you are playing on.  Granted, this is a giant pain in the backside, especially if your internet connection has usage caps!

 

That said, the actual BEST solution, is for Blizzard to fix this problem, or failing that, roll out all the patches at once!

 

Hopefully this helped a few of you get over the Diablo 3 patching woes!  If nothing else, it allowed me to create that Diablo mushroom cloud graphic. Smile

 

 

EDIT: For those that don’t want to re-install, you can try editing the patch_url manually.  Worst case scenario… you will have to re-install! Smile

 

To do so, follow these instructions.  Of course, these instructions are for switching to the Asian server, so substitute en-US for American, and en-GB for European servers.  Also, be sure to note that there are multiple copies of the file you need to edit, not just one!

Totally Off Topic

blog comments powered by Disqus

Month List

Popular Comments