Introduction
"Paper Down Hill" is a 2D soap-box time-trial game where up to four players can take part either as a cooperative team, or working against each other.
The game is aimed at the "All-In-One" platform and the corresponding "Games"category.
Overview
The game starts by taking 3 pictures of the players (up to four) using the built-in web-cam. These images are later used for the cart-driver's head in the game as shown below.
The main game then consists of a number of trials selected by the group.
Each trial consists of 2 phases, a 5 second setup phase where everyone gets to adjust the shape of the cart (the size of the wheels, the position of the seat, how fat the driver is).
Then the driver is picked at random and they have to try and make it down the hill as fast as possible without falling out of the cart.
The other, non-driving players help or hinder the driver by throwing objects at them.
A link to a video showing some of the 2D physics in action can be found here.
Development
The game is being developed using App Game Kit (AGK) v108, utilising the Tier 1 command set. AGK's basic Tier1 language enable rapid development for a single develop like me, but also enables easy access to the deeper features within the hardware, such as multi-touch points, the accelerometers, gyros, etc.
For example; the following few lines, cover the image capture and processing:
dim NewHeadImg[2] as integer
dim ModHeadImg[4,2] as integer
ImagesTaken = 0
if GetCameraExists()=1
for p=1 to totalplayers
repeat
repeat
ShowImageCaptureScreen()
repeat
sync()
until ISCAPTURINGIMAGE() =0
NewHeadImg[ImagesTaken]=GETCAPTUREDIMAGE()
until NewHeadImg[ImagesTaken]>0
ImagesTaken = ImagesTaken+1
until ImagesTaken>2
ImagesTaken=0
repeat
HeadMemBlk = CreateMemblockFromImage(NewHeadImg[ImagesTaken])
imgW = GetMemblockInt(HeadMemBlk,0)
imgH = GetMemblockInt(HeadMemBlk,4)
a# = 120.0
b# = 200.0
for row = 0 to imgH-1
for col = 0 to imgW-1
r# = abs(row-(imgH/2.0))
if (1.0-((r#/b#)^2))>0.0
clim = trunc(sqrt((1.0-((r#/b#)^2))*(a#^2)))
climlo = (imgw/2)-clim
climhi = (imgw/2)+clim
if (row<(0.125*imgH) or row>(0.875*imgH) or col<(climlo) or col>(climhi))
rem *** Calculate offset to alpha value ***
offset = row*imgW*4+col*4+15
SetMemblockByte(HeadMemBlk,offset,0)
endif
else
offset = row*imgW*4+col*4+15
SetMemblockByte(HeadMemBlk,offset,0)
endif
next col
next row
ModHeadImg[p,ImagesTaken] = CreateImageFromMemblock(HeadMemBlk)
ImagesTaken = ImagesTaken+1
until ImagesTaken>2
next p
endif
The initial points of the game are already constructed although there are still large parts to work one such as the majority of the artwork, multi-player and multi-touch implementation. The idea is relatively simple with a lot of scope to expand on, such as drawing your own hills, or cart components.
Points of Interest
The game will utilise the multi-touch functionality of the AIO, allowing players to directly drag and through their own sprites around the screen.
The game also utilises the built-in web game to place the players inside the game .
History
[2013.07.27] - Initial draft.