Thursday, December 22, 2016

Last entry of the year, glowing...

I've been playing a bit with glows and ropes, the result in this new version, merry xmas!!!

Found binaries at OneDrive 

What's new?

  • Lava throws now go always outside the magma
  • Lava trail is made by particles 
  • Now hero can be idle but facing left or right
  • Equipment upgrades are now activated by default
  • New triggers AddItem() and Deposit() and Concatenate()
  • Item is removed from Inventory just after execution (if applies) and not when has finished
  • New Item Shovel 
  • Coin is no longer Static
  • Focus is now centered properly
  • Now shop is shown differently, also some items are no longer available...
  • Liquid was sounding even when height was zero
  • Extras search improved
  • Items can yield coins 
  • New achievement "Full Equipment"
  • New achievement "Find the Soul of Ginkgo"
  • New achievement "Blue Green Red"
  • New achievement "Destroy the Balls"
  • Some achievements removed 
  • Better achievement visuals
  • Nuclear explosion from Bomb fixed (it was also killing the own explosions)
  • Hover get excited with lava or electricity 
  • Items.pas split into different files
  • Hero refresh the equipment at the beginning of every level
  • Hero steps back when pushed with an arrow and is having a shield
  • Added in some levels a new layer in front of hero (just eye candy)
  • Game over state is not set immediately after dying but after fading is finished
  • Now all entities can do a monologue 
  • New Rope element 
  • New lamp style
  • Cables can excite hovers
  • Fixed small issues when contacting platforms
  • When Hero crushes is got a new sound 
  • When Hero is not facing then it cannot attack 
  • Inventory screen easier to understand
  • Sound system now uses a dictionary rather that an array, also direct access to sounds are avoided since the sound system might desired to free a non used sound, therefore creating an AV
  • Spotlight now can be killed
  • Scores were not inserted properly
  • Now property TGameSprite.IsSlow
  • Remove TileSetFromSolid stuff in sprite factory, it was redundant
  • Rays collision element adjusted
  • Menu font now does some transparency
  • Rope are no longer simulated with bezier curves but with newton's physics 
  • New Volcano element  (experimental)
  • Menu preparation logic moved from game to menu screen
  • Sky stars are now random per game 
  • Snowball now also freezes ceiling (when gravity is up)
  • Sprites can be glowed
  • New labyrinth aspect
  • Exit menu, shop and inventory screens got a sound when moving cursors

  • Buffer hash is also constructed with Alpha
  • Fixed an error with particles alpha when using primitives
  • Particles alpha handling improved as rgba
  • Negativing TVectorEx was totally wrong!
  • Camera zoom is now taken into account
  • New style Inverse in particles 
  • New TSurface.ExtractAlpha() and Glow()
  • Bezier curves do not longer creates a result class per calculation but rathern reuse a global list

Sunday, November 6, 2016


Is quite funny to mentally visualize an item and then trying to find an use and a fit in the game

Found binaries at OneDrive

  • Big enemies now have achievements
  • Joy reading improved a bit
  • Boomerang will not get stuck in a wall
  • Many new extras like: potion, bell, magnet, ancient
  • Many new achievements like: "do magic on a key"
  • Now menu shows % of achievements
  • Some graphics changed
  • Lava eruption do not longer splash in the bottom of lava
  • Highscores fixed
  • Now there is only one key with Key property to select the type of key
  • Screen code cleaned
  • GameSprite new properties, DieText, SpawnItem and SpawnClass
  • TSpawner new property WaitingTime
  • New class TItemResolver, it helps creating items and entities when breaking walls
  • New THero.WeaponInUse()
  • All checkpoints are now in layer 2
  • Now FadeIn()/FadeOut() can be used properly in triggers
  • New enemy Triangle
  • Beetle now jumps when close to an edge
  • Now game has scoring
  • Fixed memory leak with ingame screens
  • Weapons also kill chandeliers
  • New TBouncingEnemy
  • Fixed an issue were a player could take infinite flying coins exiting/entering the levels continuously
  • Fixed an issue were a player could avoid having one less live when dying if level was exited immediately
  • New candle
  • Terminal show different scripts
  • Kurkani fixed
  • Fixed an issue replaying previous music

  • New Sprite.Locked property
  • TPolygon.GetHash() performance boost
  • Now screen buffers and sorted buffers are mixed into one unique queue
  • New TSprite.ClearTimers()
  • Fixed an issue when rotating the screen quad
  • Buffer rendering improved for some fix situations (like sprites...)

Sunday, October 16, 2016


 Every time I implement a new thing lots of ideas come to my mind, like with inventory, many new things were changed thanks to this new feature.

Found binaries at OneDrive

  • New inventory screen that can be accessed via return key or Y gamepad
  • Equipment is set via RTTI
  • Equipment code improved
  • New unit Items
  • Now Hero can have extras, like torch, horn, map, etc...
  • Screen exiting code improved
  • Coins now have a quantity property (default is 1)
  • Hero can wear an armor
  • New options for Continuous jumping entities like force and decay
  • New TJumpingCoin entity
  • New extras: Map, Bomb, Clock, Parasol, Horn, etc
  • Now Minimap works in any level
  • New item Double Shoes...
  • Coin classes renamed
  • Crepuscule lights move a bit...
  • New NPC property Thanks, be kind...
  • New chest element
  • Hidden levels are shown in main menu (if reached)
  • New property Gamesprite.AutoCenter
  • Finally all classes are created based on names (via RTTI)
  • HUD shows Runes in a frame
  • New Tucan bird
  • New action button, so that hero can use weapons
  • Some new graphics ...
  • Extra life shows a different graphics
  • Inventory is rendered in the HUD
  • Now inventory can have more than one unit of an item
  • Some changes in the expirable items
  • Post can have codified messages
  • New element Sparks
  • Bird chances reduced
  • New music achievement
  • NPC now properly says "a" or "an"
  • Princess now will be in a cage
  • New weapons...
  • Slope collision fixed
  • Magic?!
  • Fixed some bugs with collisions and no gravity elements (since it was not used...)
  • New method IInventory.FindByClass()
  • New achievements
  • Highscores now shows reached level
  • More versatile inventory
  • Fixed memory leak in shop screen
  • GameSprite IsMoving() improved
  • Many code lines "A mod B" changed to "A and B" when possible
  • Cadency now always works in milliseconds
  • Weapons volume is adapted to the distance to hero
  • Since new Windows 10 anniversary update game didn't restore once the focus was lost, weird but fixed
  • Huge performance boost in the creation of the object by name, by simply creating the context once and not on every call
  • Now Shop open/closes door
  • Jumping coins when created in the air do not initially jump
  • Updated to latest BASS library
  • NPC can have monologues...
  • Timer was started on a wrong event
  • New Terminal element
  • New achievements...
  • Game shows a menu when pressing escape or joy start
  • Extras can also yield coins

  • New T2DParticles properties AutoAngle and Elasticity
  • When a surface is destroyed and then the buffer, the search is faster
  • New helpers in TInputKeys.IsButton()
  • FFont.Render() now returns a boolean indicating whether it was painted or not
  • Laser ending was drawing even when no segments were set
  • Added thickness in drawer.Box()

The inventory

Weapons and Shields...

Thursday, September 15, 2016

Hero goes shopping

I always love games that allow you to buy items, games like wonder boy in monster land or black tiger, so this is my little tribute...

  IShopItem = interface
    function GetCost: integer;
    function GetDescription: string;
    function GetId: string;
    function GetType: string;
    function GetLevel: integer;
    function GetProperties: IMemVar;

  IShop = interface
    function Count: integer;
    function Exists(const aItem: string): boolean;
    function Enter(aInventory: IInventory): boolean;
    function Find(const aItem: string): IShopItem;
    function GetCategories: TList<string>;
    function GetItems(const aCategory: string): TList<string>;
    function Purchase(const aItem: string; aInventory: IInventory): boolean;
    procedure Remove(const aItem: string);

Found binaries at OneDrive

  • New Enemy Octopus
  • NPC talk is more accurate
  • Doors now can be hidden
  • All entities can have a Hint
  • Adding a shop
  • New inventory class
  • Now taken coins are shown and not left coins
  • When in finish screen, last level is not shown
  • New music when shopping
  • New element cauldron
  • When hero got a shield it can stop arrows
  • Render screens code refactored
  • NPC can yield coins
  • Hero can attack if proper item is owned (sword, axe and knive)
  • Enemy energy is now used
  • Now shop offers boots! (faster walk, jumping, slippery...)
  • Screen Prepare() method more handy
  • Blocks can contain hidden coins
  • New element Idol
  • GameServices.GetHero returns now IHero
  • Hero's shield is affected by arrows depending on its level  (pushed backwards)
  • Enemies killed with a weapon spawns a coin
  • Shopping menu slowly improved
  • During the same game, already taken coins do not appear again when revisiting a level

  • New TMasterDetail<M, D> class
  • Some functions changed parameters of type TDummySprite to ISprite
  • TLevels simplified
  • New TObjectHelper.CreateByName(), it creates any kind of class by name, very handy for the inventory

Hero with his sword and shield after purchasing them in the futuristic shop :-)

Monday, August 8, 2016

Say hello to Non Player Characters

In summer is not easy to find the necessary inspiration to tackle this project, but at the end I found interesting to introduce the so called NPC in the game. They are implemented in an easy way:

  INPC = interface
    function GetItems: string;
    function GetNeeded: string;
    function GetAchievement: string;
    function GetDelay: cardinal;
    function IsDeal(aInventory: IMemVar): boolean;
    function Interact(aInventory: IMemVar): TNPCResult;
    procedure StopWalking;
    function Talk(out aText: string): boolean;

 Just chatting, expecting some items and give new items..., nothing fancy

Found binaries at OneDrive

  • Minimap also prints teleport, enemies and doors
  • New class TDead for handling disintegrate effects
  • Blood has more colors in the same range
  • Door can take you to specific levels
  • Water can flow to already existing reservoir
  • New level Asphyxia!
  • Game now can have more than one door, so keys are related to door groups
  • Now doors can be upside-down
  • Better handling of door keys
  • Some pools are now based in lava
  • Liquid now have texture, Thrownrate, Sound and SplashCadency properties
  • class TSpawner improved
  • Lava can do ice heating
  • Quake is now done with camera
  • Birds spawning code improved
  • TDust now has orientation  (horizontal/vertical)
  • New TLiquid.IsResetable()
  • New bee (replacing bird...)
  • All Direction stuff removed, it was useless
  • Deadly liquid does not sound like water anymore
  • New class TFloater, barrel inherits from it
  • New element Boat, inherits from TFloater
  • Waterfalls streams work 100% now
  • New Achievement regarding waterfalls
  • Adding NPC
  • Now game shows inventory
  • New achievement related with NPC (talk to them...)
  • Menu option continue on removed, now when entering a level one can freely choose another level (if reached of course)
  • Optimizer now can load from multiple folders

  • Main engine render loop finally done in a proper way
  • Particles now have friction
  • New default buffer timeout is infinite
  • Triggers can be linked to other triggers, so until related trigger is not executed current one cannot be executed
  • Liquid might have textures (used for lava)
  • Fonts rendering improved
  • Fixed an error with buffer size increments
  • Liquid now has thickness
  • Liquid now is got some optimization when big areas
  • Particles now have emission type (continuous, once)
  • TLaser now inherits from TDummySprite
  • Trying to add some noise to the laser
  • Fixed some offset issues with some primitives
  • New TSpriteEngine.Find(name)
  • Now Triggers can target any entity that implement IExecutor
  • Liquid edges are shown properly
  • All sprites now can have texture offsets
  • Sprites can now also load from big File
  • Laser can now have a texture assigned
  • New utils.fmod (float modulo)

New secret and hidden level!

Old man giving me something...

Saturday, May 7, 2016

Fluids flowing

Time to post!, now that particles are used and abused, then I was playing a bit with liquids

Found binaries at OneDrive

What's new since the last update?

  • Dust and starfield are no longer split into render/tick, so looping twice is avoided
  • When hero dies in lava, particles are shown in a different color
  • Fireworks done with particles
  • Many Trunc() and Round() removed
  • Scepter does not appear in the same position as in the previous iteration
  • Replaced all possible TGraphicsDriver.Instance by new interfaces from IGameServices
  • Waterfalls are always fully developed since the very first frame
  • Ending changed a bit...
  • Runes class improved
  • Shunenbukaidesu improved
  • Since blood was everywhere now it got its own class
  • In final enemies energy is shown centered and with alpha
  • Kurkani also disintegrates and bleeds
  • Fireworks are now nicer (I guess...)
  • Platforms handling code moved from game to sprites
  • New elements AirBubble, Hit, LavaSplash  and Spark
  • New animation for scepter
  • New pickup Minimap
  • New explosion sprites sheet
  • When water finds a hole it flows
  • Barrel movement improved
  • Some name changes in levels
  • Sprites have now X & Y also as int
  • Particles now can have many emitters
  • Particles now have autozoom
  • New particle visible property
  • Now when screen buffer is overflow then it is skipped (avoiding AV)
  • Improved sleeping code
  • Surfaces can have gamma
  • TGraphicsDriver.Triangle() was not drawing properly...
  • Improved how sprites internally do Render() & Tick()
  • Internal list in SpriteEngine changed from TList<T> to TLinkedList<T>
  • Handled platforms in some cases were removed from list incorrectly
  • New animation property wait, used to change the cadency of the first frame (used in sceptor)
  • Camera2d adding zoom functionality... (WIP)

Friday, March 25, 2016

Particles everywhere...

Since 2d particles engine is now fast enough then I was happy playing around, the outcome is that  some parts now are based on particles.

Found binaries at OneDrive

  • New element Dust that can be propagated in Sphere and Cube
  • Dust is not rendered when parent is not painted
  • Starfield is not rendered when parent is not painted
  • Smoke in Ventilator looks better
  • Crepuscule, Candle, Lamp and Focus gets dust
  • Some more animations in background tiles (ice levels)
  • Teleports got some particles
  • When hero was entering a teleport and gravity was changed hero was not behaving properly
  • Now platforms might attach a FireWheel
  • if bird was locked by a web it was still using the bezier path
  • EffectDispatcher is less memory hunter
  • Waterfall is done now with particles
  • Snow is done with particles
  • New ice explosion with particles
  • Now rain is also done with particles
  • New magma particles effect (used in Lava Love)
  • Some map changes
  • Mirror was static..., cannot be otherwise laser would not bounce
  • Eye code improved a bit
  • Hero does no longer set the game state to gameover, that might caused AV!
  • New element Cortain
  • New bar for Gatashi live
  • New bar for oxygen
  • Gatashi disintegrates when dying
  • Horus makes sparks
  • Rain now uses wind
  • Fixed a weird glitch were hero could jump when graviting
  • HUD shows coins left in different way
  • The static class SpriteAttribute was not freed
  • The cloud sprite from menu was not freed

  • Fixed memory leak when surfaces were not cached
  • TParticle2D improved
  • TSurface.Noise() improved
  • Screen buffers aging code improved
  • Configuration .ini files can have any published property from sprites
  • New TObjectHelper.SetProperty(name, value)
  • Particles now use a linked list + dictionary, for insert + delete + iterate fits better than a simple list
  • Dictionary from Pool<T> removed, it was not really needed (consumer has to return used objects before clearing the pool)
  • New TLinkedList.DeleteCurrent()
  • Particle2d has more properties
  • Particles internally use now a Pool<T>
  • TPool<T> now internally uses a Linkedlist rather than two simple lists
  • Particle engine improved
  • New Events.AddTimer()
  • New sprite.GetAngleFromDir()
  • Minor cleaning in sprites
  • 2d particles improved
  • TSurface minor improvements
  • Shadow surface was not freed when parent surface was not Cached
  • The polygon created when rendering water was not freed
  • The polygons in TScene3d were not freed properly
  • New TSimpleLinkedList<T>
  • Collisions are now based on CRC and not artificial key

Sunday, February 28, 2016

First entry of 2016, it was about time...

Two months without updating the blog does not mean not doing anything..., here we go!

Found binaries at OneDrive


  • New TSpriteEngine.SpritesAt<T: class>(const aRect: TRect; aCallback: TSpriteCallback<T>): boolean; very helpful
  • Removed speed stuff from Camera2D
  • New TDummySprite.IsEmpty() true when surface is not created yet
  • New collision method with callback for detailed info
  • Added some optimizations to the collision system
  • New camera.Lerp() and CameraHelper ideas
  • New property TDummySprite.TickCadency (tick and render calls can now be different)
  • New CameraLerp helper
  • New TCamera2D SetWindow() and InsideWindow(), useful for camera lerp 
  • Maps now can indicate a custom colorkey 
  • Tiles outside the camera view are also update (not rendered)
  • Laser now can have zoom
  • New property TSprite.AlphaSpeed 
  • When a sprite is attached to another one, horizontal and vertical speeds are set to zero
  • TBigFile file search functions improved
  • Now .ani files can setup the bounding boxes (rectangle for collisions)
  • New TSurface.SetBB() to manually define it
  • New TRGB.Blend()
  • TAnimationSprite refactored, it was quite a mess...
  • Fixed a bug when saving a layer with assigned colorkey 
  • Debug property removed from SpriteEngine  and Sprite 
  • TLayer, when map has no width or no height it does not do anything
  • 2d particle engine finished
  • New TSurface.Desintegrate()
  • New TSurface.CreateChannels()
  • Nasty bug where textures already freed were used in screen buffers
  • Now Rectangles can have an angle 
  • Now Shadow property is assigned only when Engine is assigned
  • Static sprites do not reach collision matrix
  • Collision grid can now be shared among different engines
  • If a leyer, if an animation has only one frame and cell tile has changed then animation is updated with the new info
  • Z selection bar from TMenu is now taken from Z Font 


  • Heavy use of new function SpritesAt<T>()
  • Main menu is now easier to use
  • When beetle touches a mechanic enemy it changes its direction
  • Long silly bug, I was not counting rotating coins...
  • Music after pause could not be not recovered
  • Ticks also count when game is locked (not paused)
  • All screens can be skipped with jump Key
  • When game is paused messages cannot be skipped
  • Finally shadows are cast properly when no tiles behind
  • Coins and key info now is back to main game structure
  • Time achievement changed from 15 to 20 minutes
  • New concave collisions (experimental)
  • Fixed an issue with the collision of the balls
  • Improved triggering code
  • UFO has now a different texture
  • Side tiles do not cast shadows (avoids ugly shadows...)
  • When hero lands there is a quake 
  • New tiles arriving! :-) (big thanks goes to
  • Quake new parameter Intensity
  • Gatashi laser now uses the zoom
  • Weird enemy now properly works at any speed 
  • New element fly 
  • Now arrows when hitting mechanic or indestructible entities it will fall like it does when hitting arrows
  • Now arrows get nailed to entities when they are hit (and normal)
  • Steps in catchers can now be configured
  • New TGameSprite.Ready() to make easy "one time" calls (executed after all published properties are parsed)
  • Post do not way for input
  • Web and wheel textures changed
  • Bubbles rotate a bit while moving up
  • Bomb texture changed
  • New enemy Fire Skeleton (testing it...)
  • Fixed an issue when on platform and gravity changes
  • New hero texture (experiment...)
  • Game does not longer needs file
  • Now Horus looks different
  • The first level is no longer shown in the continue option menu
  • Foot steps on platforms and tiles is now calculated on the fly analyzing the bitmap
  • Weird texture looks different
  • New enemy rat
  • New enemy serpent
  • Now after a fight is win then hero gets immunity
  • Triggers can now make visible/invisible the layers and background
  • Door is got a starfield
  • Bubbles can catch mechanical enemies 
  • A level can have now many waterfalls
  • The music volume in the settings was ignored
  • When Gatashi throws its laser it creates a quake 
  • Gatashi stays one second without moving at the beginning of the level
  • Debug property added to TGameSprite 
  • Hero dies in a totally new way (I believe much cooler)
  • Hero dying code improved
  • New enemy Penguin 
  • Finally the game creates all entities via rtti and attributes (hooray!)
  • New element troya horse
  • Bat does not longer gets stick in walls
  • When hero lands on a platform the quake intensity depends on impulse
  • Now Gatashi also bleeds
  • Gravity can also affect pushable objects
  • Minor map changes
  • Doors can now be fake, beware!
  • Now ending is done in a proper way
  • Fixed an issue when in TSea splash was too heavy 
  • Scepter replaces book 
  • New blood textures
  • New enemy robot 
  • New element Rainbow 
  • Hud objects do not cast shadows
  • Some Z priorities changed
  • Fixed a bug with achievement "all runes"
  • New element Bell and achievement
  • When Gatashi heats an ice cube it changes to another tile
  • When HBF dies drowned particles are blue
  • Entities that emit light in darkness are properly tagged
  • Flash effect now takes a color as parameter
  • More background tiles
  • Focus can now point up and down 
  • Droid laser now also shakes
  • Lava kill spider web