Basic Circle Chain engine using Gideros Studio

Read all posts about "" game

While Circle Chain is still waiting to score its 1000-th download in the App Store (download it! Remember I will give away the source code once I reach 1,000 downloads), I continue with my experiment of porting the game with various development tools.

Some days ago I showed you a basic prototype coded with lua using Corona SDK, and now I am showing you another lua-driven prototype, this time made with Giderios Studio.

Giderios Studio is a complete environment for mobile application and game development. Using Giderios Studio you can write your code, manage your assets, preview your assets and see the console output of your application using an integrated IDE.

I am finding this tool very intuitive and interesting, mainly thanks to its built-in code editor which is really useful since there aren’t that much lua syntax highlighters.

While I will make a complete review of the software later, this time I am showing you the code needed to create the same prototype I made with Corona SDK

application:setOrientation(Application.LANDSCAPE_LEFT)

local background = Bitmap.new(Texture.new("background.png"))
stage:addChild(background)
local container = Sprite.new()
stage:addChild(container)

for i=1,10 do 
		local greenCircle = Bitmap.new(Texture.new("greencircle.png"))
		local randomDirection = math.rad(math.random(0,359))
		container:addChild(greenCircle)
		greenCircle:setX(math.random(0,479))
		greenCircle:setY(math.random(0,319))
		greenCircle.xSpeed = 2*math.cos(randomDirection)
		greenCircle.ySpeed = 2*math.sin(randomDirection)
end

function onEnterFrame(event)
		for i=1,container:getNumChildren() do
			local currentCircle=container:getChildAt(i)
			currentCircle:setX(currentCircle:getX()+currentCircle.xSpeed);
			currentCircle:setY(currentCircle:getY()+currentCircle.ySpeed);
			if currentCircle:getX()<0 then
					currentCircle:setX(currentCircle:getX()+480)
			end
			if currentCircle:getX()>480 then
					currentCircle:setX(currentCircle:getX()-480)
			end
			if currentCircle:getY()<0 then
					currentCircle:setY(currentCircle:getY()+320)
			end
			if currentCircle:getY()>320 then
					currentCircle:setY(currentCircle:getY()-320)
			end
		end
end

stage:addEventListener(Event.ENTER_FRAME, onEnterFrame)

I recommend to have a look at this official tutorial to set up your first application, and then test the code I am giving you.

I am also giving you the complete project folder to download.

Get the most popular Phaser 3 book

Through 202 pages, 32 source code examples and an Android Studio project you will learn how to build cross platform HTML5 games and create a complete game along the way.

Get the book

214 GAME PROTOTYPES EXPLAINED WITH SOURCE CODE
// 1+2=3
// 100 rounds
// 10000000
// 2 Cars
// 2048
// A Blocky Christmas
// A Jumping Block
// A Life of Logic
// Angry Birds
// Angry Birds Space
// Artillery
// Astro-PANIC!
// Avoider
// Back to Square One
// Ball Game
// Ball vs Ball
// Ball: Revamped
// Balloon Invasion
// BallPusher
// Ballz
// Bar Balance
// Bejeweled
// Biggification
// Block it
// Blockage
// Bloons
// Boids
// Bombuzal
// Boom Dots
// Bouncing Ball
// Bouncing Ball 2
// Bouncy Light
// BoxHead
// Breakout
// Bricks
// Bubble Chaos
// Bubbles 2
// Card Game
// Castle Ramble
// Chronotron
// Circle Chain
// Circle Path
// Circle Race
// Circular endless runner
// Cirplosion
// CLOCKS - The Game
// Color Hit
// Color Jump
// ColorFill
// Columns
// Concentration
// Crossy Road
// Crush the Castle
// Cube Jump
// CubesOut
// Dash N Blast
// Dashy Panda
// Deflection
// Diamond Digger Saga
// Don't touch the spikes
// Dots
// Down The Mountain
// Drag and Match
// Draw Game
// Drop Wizard
// DROP'd
// Dudeski
// Dungeon Raid
// Educational Game
// Elasticity
// Endless Runner
// Erase Box
// Eskiv
// Farm Heroes Saga
// Filler
// Flappy Bird
// Fling
// Flipping Legend
// Floaty Light
// Fuse Ballz
// GearTaker
// Gem Sweeper
// Globe
// Goat Rider
// Gold Miner
// Grindstone
// GuessNext
// Helicopter
// Hero Emblems
// Hero Slide
// Hexagonal Tiles
// HookPod
// Hop Hop Hop Underwater
// Horizontal Endless Runner
// Hundreds
// Hungry Hero
// Hurry it's Christmas
// InkTd
// Iromeku
// Jet Set Willy
// Jigsaw Game
// Knife Hit
// Knightfall
// Legends of Runeterra
// Lep's World
// Line Rider
// Lumines
// Magick
// MagOrMin
// Mass Attack
// Math Game
// Maze
// Meeblings
// Memdot
// Metro Siberia Underground
// Mike Dangers
// Mikey Hooks
// Nano War
// Nodes
// o:anquan
// One Button Game
// One Tap RPG
// Ononmin
// Pacco
// Perfect Square!
// Perfectionism
// Phyballs
// Pixel Purge
// PixelField
// Planet Revenge
// Plants Vs Zombies
// Platform
// Platform game
// Plus+Plus
// Pocket Snap
// Poker
// Pool
// Pop the Lock
// Pop to Save
// Poux
// Pudi
// Pumpkin Story
// Puppet Bird
// Pyramids of Ra
// qomp
// Quick Switch
// Racing
// Radical
// Rebuild Chile
// Renju
// Rise Above
// Risky Road
// Roguelike
// Roly Poly
// Run Around
// Rush Hour
// SameGame
// SamePhysics
// Save the Totem
// Security
// Serious Scramblers
// Shrink it
// Sling
// Slingy
// Snowflakes
// Sokoban
// Space Checkers
// Space is Key
// Spellfall
// Spinny Gun
// Splitter
// Spring Ninja
// Sproing
// Stabilize!
// Stack
// Stick Hero
// String Avoider
// Stringy
// Sudoku
// Super Mario Bros
// Surfingers
// Survival Horror
// Talesworth Adventure
// Tetris
// The Impossible Line
// The Moops - Combos of Joy
// The Next Arrow
// Threes
// Tic Tac Toe
// Timberman
// Tiny Wings
// Tipsy Tower
// Toony
// Totem Destroyer
// Tower Defense
// Trick Shot
// Tunnelball
// Turn
// Turnellio
// TwinSpin
// vvvvvv
// Warp Shift
// Way of an Idea
// Whack a Creep
// Wheel of Fortune
// Where's my Water
// Wish Upon a Star
// Word Game
// Wordle
// Worms
// Yanga
// Yeah Bunny
// Zhed
// zNumbers