Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
27. November 2019


I was just sent a Clockwork GameShell, it’s a build it yourself open source raspberry pi powered handheld computer.  What’s most appealling to me is how heavily focused on indie game developers this device is.  This is not a review of the device but instead a description of the build process (stay tuned for a proper review!).  So let’s take a look at the process from beginning to end and I’ll point out the few snags I encountered on the way.  If you are interested in getting one of your own, they are available on Amazon.

The underlying specs of hardware are as follows:

New ClockworkPi V3.1:Powered by Quad-core Cortex-A7 CPU, MaliGPU, Wi-Fi &Bluetooth, 1GB DDR3 Memory, 16GB MicroSD, HDMI output, GPIOs.

Keypad: Programmable Keypad and powered by an ATmega168P [email protected] with 30Pin Arduino compatibility GPIOs.

Audio: 2 Channel Stereo Speaker

Visual: 2.7-inch [email protected]

Rechargeable Battery: 3.7v, 1200mAh

Lightkey module: 5 independent IO extended keys for shoulder buttons

GameShell Shells: 1 front shell+2 back shells

MicroSD Card: 16GB

OS: ClockworkPi OS,Linux  4.1x

Debug cable: 14PIN GPIOs

Let’s look at what you get and how you assemble it.


The Box


This is a extremely minor point, but I was quite impressed with the packaging the GameShell came in.  Right away it’s generally just a higher quality of packaging and branding than I am accustomed to for these kinds of products, it does have a premium feeling as a result. Click any photo for a much higher resolution version.


IMG_20191127_112001IMG_20191127_112020



The Contents

The inside of the box is several other boxes and a collection of plastic punch out components.  In terms of equipment you need to do this build you are going to want a sharp knife at the very least.  A fine file and pair of side cutters to remove the plastic attachments are also recommended, but I got by with just a knife.


IMG_20191127_112146IMG_20191127_113033

Assembly

Now it’s time to start putting things together.  The instructions are IKEA style (but thankfully better than most IKEA!) step by step pictographic instructions.  The assembly is module by module.  The primary modules are the screen, the battery, the main system board and the controller as well as the speaker (not shown).

IMG_20191127_121439IMG_20191127_114819

IMG_20191127_115734IMG_20191127_121145

Once these 5 modules are completed, its its time to mount the modules into the backplate and connect the various power wires between the devices.  This is probably the trickiest part with one exception I will discuss in a minute.

IMG_20191127_125731

Finally it’s a matter of attaching the front plate, attaching two thumb screws and praying you did everything right.  And the final completed product!

IMG_20191127_130514

The Gotchas

Assembly was extremely straight forward with only two snags.  The first step is when creating the display module illustrated below.

ScreenStep

Notice the inset diagram shows the cable being bent backwards, while the layer diagram does not show this?  This is vitally important, you do in fact have to bend the display cable 180 degrees.

The second problem is actually around the same issue.  Connecting the display ribbon cable to the main board should be done *BEFORE* you close the case around it, making it insanely difficult connect unless you open it.

The only other issue I ran into is occasionally they mounted the plastic pieces to the plastic frame at less than ideal locations.  For example there was a mount point where the display cable needs to be fed.  I had to make a special point of filing down the excess plastic to keep it from rubbing against or puncturing the fragile ribbon cable.  It would be ideal if pieces were mounted slightly different, but its a small issue.



Now that I have the GameShell built, it’s time to start trying to develop games for it.  Stay tuned for that video in the near future.

General


2. April 2018

 

LÖVE 11.0 was released yesterday… yes, on April Fools day.  You may notice that GameFromScratch.com goes silent every April 1st I take a holiday from the internet to avoid the “humour”.  Turns out this was actually a real release and yes, they did in fact rebrand their versioning, by going from 0.11.x style numbering to 11.0 to represent that maturity of the product.  I personally agree with this change (although not the date of the announcement) as the low version numbers really hid just how mature a library love was. 

As to this release, there is actually quite a bit going on here.  Quite a few upgrades in the audio department, a move to normalized numbers for colour data as well as >8bit colour support.  The actual full list of changes is pretty massive, here however are the highlights from the forum:

  • Loads of audio additions:
    • Queueable audio sources
    • Recording support
    • Support for audio effects and filters
    • A simplified Source API
  • Added a love.data module, containing functions for encoding, hashing and compression
  • Added Transform objects to love.math
  • Added more ImageData formats, Image formats, and new texture types
  • Added support for depth buffers
  • Added a deprecation mechanism
  • Added automatic batching
  • Deprecated love.filesystem.exists / isFile / isDirectory / isSymlink / getLastModified / getSize in favour of getInfo
  • Changed colour values to be in the range 0-1, rather than 0-255
  • Changed love.run, to support co-operative multitasking environments

 

If you are interested in learning more about Love, be sure to check out our complete tutorial series available here.

GameDev News


1. November 2016

 

LÖVE is a popular Lua powered cross platform 2D game engine.   Its an accessible framework that I highly recommend to beginners, in fact it’s the framework I used for my GameDev For Complete Beginners tutorial series.  They just released a new version, 0.10.2, which is a relatively minor update.  One of the changes is the release of lovec.exe on Windows, which includes a command line console if one isn’t already present, a handy feature for debugging.

 

Other changes and fixes from the change log:

Additions
Deprecations
  • Deprecated undocumented Shader:sendTexture, Shader:sendMatrix, Shader:sendInt, Shader:sendFloat, and Shader:sendBoolean methods.
Fixes
  • Fixed love on iOS 6.
  • Fixed os.execute always returning -1 on Linux.
  • Fixed the love.lowmemory callback to call collectgarbage() after the callback has fired, instead of before.
  • Fixed love.math.noise(nil) to error instead of returning nil.
  • Fixed an occasional crash when a Thread ends.
  • Fixed a hang at the end of video playback with some video files.
  • Fixed the video decoding thread to not do any work when there are no videos to decode.
  • Fixed love.graphics.newVideo(file) to no longer error if love.audio is disabled.
  • Fixed a rare bug in Source:play for streaming Sources if the associated OpenAL source object was previously used for a static Source.
  • Fixed corrupted Font glyphs in rare cases.
  • Fixed stencils inside Canvases on some OpenGL ES 2 devices.
  • Fixed an OpenGL error in OpenGL ES 3 when multiple render targets are used.
  • Fixed love.window.setMode crashing when called with a Canvas active.
  • Fixed love.window.maximize to update the reported window dimensions immediately.
  • Fixed gamma correction of ImageFonts and BMFonts with colored images.
  • Fixed the default shader improperly applying gamma correction to per-vertex colors when gamma correction is requested but not supported on OpenGL ES.
  • Fixed text coloring breaking because of an empty string.
  • Fixed large burst of particles when dramatically increasing the emission rate of a ParticleSystem.
  • Fixed SpriteBatch:setBufferSize to keep old sprite data if it can fit.
  • Fixed MouseJoint:getBodies unconditionally erroring.
  • Fixed memory leak in Text:set.
  • Fixed incorrect kerning caused by using kerning information for the wrong character in some fonts.
  • Fixed ImageData:setPixel, ImageData:getPixel, ImageData:mapPixel, SoundData:setSample, and SoundData:getSample to properly handle non-integer coordinates.
Other changes
  • Improved performance of Channel methods by roughly 2x in many cases.
  • Improved performance of Shader:send when small numbers of arguments are given.
  • Updated love.filesystem.mount to accept a DroppedFile as the first parameter.
  • Updated Shader:send to do type and argument checking based on the specified uniform variable's information instead of the arguments to the function.
  • Updated Shader:send to accept a flat table for matrix uniforms.

 

Love is free and open source, available for download here.

GameDev News


22. March 2016

 

This page is in support for the video tutorial on using Sprites/Images in Love as part of the GameDev For Complete Beginners tutorial series.  It contains the code and images used in the tutorial.  There is also a copy of the tutorial embedded below.

 

Images

The graphics are from this pack of images, made transparent using this process.

ALC-17AttackChoppers

 

Simply right click and save to your project directory.

 

Source Code

Drawing an Image

local imageFile

function love.load()
    imageFile = love.graphics.newImage("ALC-17.PNG")
end

function love.draw()
    love.graphics.draw(imageFile)
end

 

Using a Spritesheet

local imageFile
local frames = {}

local activeFrame
local currentFrame = 1
function love.load()
    imageFile = love.graphics.newImage("AttackChoppers.PNG")
    frames[1] = love.graphics.newQuad(0,0,128,64,imageFile:getDimensions())
    frames[2] = love.graphics.newQuad(128,0,128,64,imageFile:getDimensions())
    frames[3] = love.graphics.newQuad(0,64,128,64,imageFile:getDimensions())
    frames[4] = love.graphics.newQuad(128,64,128,64,imageFile:getDimensions())
    activeFrame = frames[currentFrame]
    print(select(4,activeFrame:getViewport())/2)
end

function love.draw()
    --love.graphics.draw(imageFile,activeFrame)
--[[    love.graphics.draw(imageFile,activeFrame,
        love.graphics.getWidth()/2 - (select(3,activeFrame:getViewport())/2) * 2,
        love.graphics.getHeight()/2 - (select(4,activeFrame:getViewport())/2) * 2,

            0,
            2,
            2)
]]--
    -- draw image 4x size centered
    love.graphics.draw(imageFile,activeFrame,
        love.graphics.getWidth()/2 - ({activeFrame:getViewport()})[3]/2 * 4,
        love.graphics.getHeight()/2 - ({activeFrame:getViewport()})[4]/2 * 4,
        0,
        4,
        4)
end

local elapsedTime = 0
function love.update(dt)
    elapsedTime = elapsedTime + dt

    if(elapsedTime > 1) then
        if(currentFrame < 4) then
            currentFrame = currentFrame + 1
        else
        currentFrame = 1
        end
        activeFrame = frames[currentFrame]
        elapsedTime = 0
        end
end

 

 

The Video

Programming


14. February 2016

 

A new version of Love, the popular Lua based 2D game engine, was released today.  Release 0.10.1 brings:

Additions
Bugfixes
  • Fixed a Lua error in the no-game screen if the window's height is too small.
  • Fixed the default error handler to reset the mouse Cursor.
  • Fixed love.filesystem functions crashing when called if liblove is used directly without calling love.filesystem.init.
  • Fixed audio on Android to pause when the app is inactive, and resume when the app becomes active again.
  • Fixed Source:setRelative to set the relative state of playing Sources to the passed value rather than an old cached one.
  • Fixed the Video decoding thread hanging after Video:seek or when a Video finishes.
  • Fixed Video:isPlaying to always return false after it finishes playing.
  • Fixed RandomGenerator:random crashing if a nil 'self' is used.
  • Fixed loading BMFont files which have characters with 0 width or height (a space character, for example).
  • Fixed love.graphics.newFont causing crashes if FileData is passed in.
  • Fixed love.graphics.clear(colortable) causing crashes on OpenGL ES 2 systems when a Canvas is active.
  • Fixed love.graphics object creation functions (e.g. love.graphics.newImage) to error instead of crash, if called before a window has been created.
  • Fixed a driver bug on some Android devices which caused all objects to show up as black.
  • Fixed a driver bug on Windows with AMD graphics cards where love.graphics.clear would not always work.
  • Fixed Shader:sendColor incorrectly converting alpha values from sRGB to linear RGB when gamma-correct rendering is enabled.
  • Fixed love.graphics.newMesh(vertices) double-converting colors from sRGB to linear RGB when gamma-correct rendering is enabled.
Other changes
  • Updated the Windows executable to prefer the high-powered AMD graphics card on systems which have switchable Intel+AMD GPUs.
  • Updated love.touch.getTouches to return the list of IDs in the relative order that the touches initially happened (i.e. the first ID in the list is the least recently pressed touch that is currently active), instead of being in a random order.
  • Updated the error messages caused by invalid or bad arguments to ImageData and SoundData methods to be more descriptive.

If you are interested in learning more about Love and Lua I featured it in this multi-part video tutorial series for beginning gamedev.

GameDev News


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List