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
    ['{D6EFA6AF-05C3-4A54-984E-37F6A4809FC0}']
    function GetCost: integer;
    function GetDescription: string;
    function GetId: string;
    function GetType: string;
    function GetLevel: integer;
    function GetProperties: IMemVar;
  end

  IShop = interface
    ['{93AD660B-79F0-4CED-A37C-EFE384228D51}']
    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);
  end;

Found binaries at OneDrive

HBF)
  • 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

BB)
  • 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;
  end;


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

Found binaries at OneDrive

HBF)
  • 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

BB)
  • 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?

 HBF)
  • 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
BB)
  • 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

HBF)
  • 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

BB)
  • 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

BB)

  • 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 


HBF)

  • 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 https://twitter.com/co_Opernicus/status/698463878703947776)
  • 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 graphics.data
  • 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




Wednesday, December 23, 2015

2015 is ending very soon, very intense year...

This is what I was able to change in the last month, let's hope 2016 is our year (and yours)

Found binaries at OneDrive

HBF)

  • Moving balls bounces when hero is on top and touches a wall
  • Electricity also kills enemies  (but only if camera is there to make it funny)
  • TGameSprite.IsBellow() is more accurate now
  • Grass shakes with any moving entity
  • Chandelier goes back to original position with a proper animation
  • Frogs jumps higher
  • Skeleton only throws bone when facing hero
  • Spider is now slower
  • Enemies are no longer stuck in non moving platforms
  • Clouds in menu are now red
  • Timeout was not reset when clearing screens, therefore after loosing a fight tunes would not appear anymore
  • HUD refactored
  • Spring improved
  • Snow ball now dies when is too small
  • Worm attack pattern changed
  • TryEnterVehicle moved from Game to GameSprite
  • HandleTeleports and HandlePosts moved from Game to GameSprite
  • Gatashi laser now shakes water if it is on the way
  • Game is rule by a proper state machine
  • Princess now "talks" to hero when close enough
  • Jump system improved
  • When skull is taken, crepuscule lights go away
  • New trigger functions TextSelection() and QuestionAndSet()
  • Dialog now has a color parameter
  • Firebug speed increased a bit
  • Head fire once option implemented
  • Cloud priority changed
  • Enemies can also now teleport and shield (although they don't do it...)
  • Achievements can be reset
  • Unlocked achievements are shown differently
  • Banners can now be horizontal
  • Dialogs can have portraits
  • Triggers are executed only when walking and flying
  • Messages can be waiting for confirmation
  • Screen code improved with machine state events
  • When hero dies colors are different


BB)

  • Layer removed from sprites (makes no sense)
  • New interface IBackground implemented in TBackground
  • New TMemVar AsBool, AsInt, AsString, AsFloat
  • TSimpleSprite AddTrigger now has a closure version (very handy)
  • State machine now includes the current value as param in events so it can be modified


Sunday, October 18, 2015

The never ending story?

While waiting for graphics, code is improved and refactored...

Found binaries at OneDrive

BB)

  • Now triggers define width and height
  • sprite Z always is ANDed with object id
  • TRandom.AImLuckyF(), Delphi cannot distinguish between cardinal and single..., WTF?!
  • Fixed a bug in data length with joystick buttons

HBF)

  • TrySpawnXXX now uses non float random functions
  • Full day/night cycle
  • Improved spring behaviour
  • Gatashi handles better the collisions (avoids slowdown)
  • New enemy skeleton
  • Skeleton throws bones
  • New interface for global vars, so they can be accessed from trigger engine (files is game.vars)
  • Jump method now has a power parameter
  • New element Circles 
  • Hero cannot enter door while on an item
  • After game over camera X offset was not reset
  • New enemy block
  • Teleport code cleaned
  • HandleMovingPlatforms() refactored
  • Teleporting is now a sprite state
  • More accurate handling of platforms
  • Posts cannot duplicate text anymore
  • All actions can now be done with joystick
  • New TBug element and achievement
  • New fireworks element
  • Posts rolls when pressing up
  • When Gatahsi dies fireworks are fired
  • Spiders web are removed after 10 seconds
  • New enemy Ram (not finished)
  • Only 5 sounds of same type at the same time
  • Bird does not longer die with blood when path is finished
  • Achievement system refactored
  • THud refactored
  • Profile is saved to disk on demand not when class is destroyed


Saturday, July 4, 2015

ChessKISS 1.7c, finally!

After three years I found some motivation to recheck the sources and try to play a bit, the version and date is not a coincidence at all.

These are the main changes:
  • Optimized TPiece.SetTo() and TPiece.GetColorPiece()
  • TMove, removed GetIndex(), optimized SetTo()
  • TMoveGenerator.GenerateCastlingMoves() fixed
  • TEvaluation, fixed some issues with outpost and corners
  • TBoard.States optimized a bit, no need for Index
  • New overloaded TUtils.Switch()
  • New TScore.Null()
  • TPiece.SetIndex() improved
  • New TMove.SetFrom()/SetFromTo()
  • TBoard, backup()/restore() improved, new PieceValue()
  • TBoard.IsPinned() removed
  • Now uses polyglot book 
  • TChessboard.CanTraverse() uses faster approach to get the offset
  • TMoveGenerator.GeneratePawnCaptures() and MovesToSquare() improved a bit
  • TSearch.AlphaBeta() improved a bit
  • Improved a bit the performance in history 
  • Trying to speedup the moving generation with new silly ideas
  • Now killers are part of the stack in search 
  • History is updated when the cache is hit (makes sense)
  • New see() approach, let's see, also now return zero when move is castling 


Found binaries and sources at OneDrive

Tuesday, January 20, 2015

First entry of the year 2015!

Happy new to year to you stranger!

What's new?

HBF:

  • Arrows code finally refactored
  • New TEnemyKiller class, this is an enemy that can also kill other enemies, now many classes inherit from it
  • When hero is being teleported controls are blocked
  • All screens are fine now at any resolution (up to 1920x1080)
  • Hover will wear a xmas hat if it is cold :-)
  • Kurkani code simplified
  • Snow effect is no longer static but part of the scroll system
  • Chandelier line can be cutted by hero
  • New triggers MoveEntity() and MoveHero(), used in Last level for tricky paths
  • New enemy worm
  • Stones break into pieces when crashing
  • Bat can relax again (bug fixed)
  • Blob jumps with different forces
  • Fixed some minor issues in Bird and Droid 
  • Head becomes white when shooting
  • Mine now can move and interact with bound attributes (only if Gravity equal gNone)
  • Now when discovering a new platform, State is set to ssWalking in order to remove weird behaviors
  • New interface IFloater that helps elements that might float with water
  • New element post, that's basically a signal that can be read by hero
  • New sprite state ssReading used for reading signs and entering teleports
  • Graphics are no longer read from compiler file but from graphics.data
  • Screen code improved
  • Game services now includes information regarding highscores, levels and bigfile
  • Fixed nasty bug where parent sprite was dead and children didn't have to render since it was going go be freed and therefore the render buffer would have a reference to it, therefore  a nice access violation error (only with enemies containing children not attached to an engine, like Droid and its laser, difficult to reproduce since hero needs its shield in order to kill parent sprite)
  • Now OnOff blocks can also move to other Positions
  • Gatashi now moves with bezier curves
  • Day and night effect 


BB:

  • Turn out that random functions were too slow...
  • New property for triggers RemoveWhenTake, default is true
  • Bezier decimal type changed from TFloat to Double
  • Dead sprites are not longer rendered
  • Triggers now can define width and height
  • sprite Z now adds ObjectId and 63 in order to avoid flickering with other sprites in same Z

Day and night effect




Thursday, December 25, 2014

Last post of the year 2014

There are some chances of getting proper graphics, hooray!

Binary can be download at OneDrive as HBF_bin.zip

What's new?

BB)

  1. Finally fixed a bug with the seamless backgrounds with H/V speeds
  2. New methods TLayer.AddAnimation() / RemoveAnimationAt()
  3. Sprite animation flow moved to Tick()
  4. BB Rect calculated now on demand in sprites
  5. SetDefaultBB removed from sprites
  6. Some more functions inlined
  7. Default screen quicksort buffer sorting changed from 31 to 63 (in order to make it stable)
  8. Some warnings removed
  9. New TLayer.AsRect
  10. New TLayer GetAnimationInfo() and NewAnimation()
  11. New TLayer MoveCell() and MoveAnimation()
  12. New TSprite IsMoving()
  13. Collisions rotations matrix not calculated if no angle
  14. Bezier curves finally working properly
  15. New TWater class in sprites  (based on springs)
  16. Collision matrix now check boundaries properly
  17. When drawing surfaces, if not angle set then rotation matrix are not calculated
  18. Layer cells with no tile but attribute also dispatch event OnReadCell
  19. TRandom.NextFloat(max) improved
  20. SpriteEngine.Render method cleaned a bit more
  21. TLayer.Render refactored
  22. Some important fields in sprites are now stored in variables (like width, height, bpp and colorkey), to make faster access
  23. More fields moved to TDummySprite so they can be inlined
  24. New sprite property Active
  25. TObjectEx now implements IData


HBF)

  • New element Lamp that emits some light
  • Ball now has bouncing delays
  • UFo's laser now shrinks properly with colliding against solid stuff
  • Coins can now be also affected by gravity
  • New enemy mild
  • New enemy torno
  • Ray optimized a bit
  • TrapDoor code was a bit messy
  • New enemy Bouncer
  • Falling blocks are activated when hero is close
  • New TGameSprite.IsVisibleWithCam() in order to reduce the overhead in entities
  • Spotlight hitting code improved
  • Auxiliary sprites also get the Paused property from parent
  • Trapdoor also kills enemies
  • Arrows stuff moved to Tick()
  • Arrows code cleaned a bit
  • Spider net code improved
  • Water will try to fill gaps
  • Collision code improved
  • Crushing code refactored
  • Removed duplicated code for exploding bubbles
  • Fixed some collision priorities with tiles and items when gravity is up
  • Snow falls slower
  • Collision against moving platforms with reversed gravity will work much better
  • Collision against left and right slightly modified in order to be more accurate
  • Blob was falling when it should not
  • Book info instance reference was totally wrong
  • More cases for collision against tile/item
  • Bubbles when exploding become inactive (they are not gone since exploding takea a while)
  • Only active platforms are checked
  • Now HBF can also display yes/no dialogs
  • Hero now always faces none when jumping
  • Runes index was not set properly
  • New class TNeutral
  • New class TLight put it on top of tiles to make cool effects
  • Blob and Weird now are gray based and then randomly colorized
  • New element barrel, the only special thing is that inside water it floats...
  • ApplyEnvironment removed
  • Now fishes collapses if no water
  • TNeutral = TStatic
  • Pause code is more implicit (pause <> locked)
  • New demos
  • Grass only moves when hero is close
  • New enemy Head
  • Water flow refined
  • Water/Lava improved
  • Generic platform code refactored
  • Bird moves are now based on bezier curves
  • New enemy firebug
  • Enemy thing now more stable
  • Liquid stuff improved
  • New gamesprite helpers SameRow() and SameCol()
  • Bird now uses some TFuture<> for calculations
  • GearWheel now detects properly slopes
  • Slopes can be seen in debug mode
  • Water now uses spring system
  • Weird now keeps direction when current block disappears (so does no longer gets crazy)
  • Now lasers also stops with items (not only tiles)


New dynamic water:


Some new traps:


Slopes...


Saturday, October 18, 2014

Focusing on refactoring code and new backgrounds

As usual some bugs fixed here and there but focusing on creating better code, why?, because it will be the base for the next game.


HBF)

  • Screens code refactored
  • New method IDriving. JumpTogether()
  • Added some fading in menus
  • Better use of IBubble rather than TTBubbleSpawner
  • Trail now has a timeout of 10 seconds 
  • More animated tiles in backgtounds
  • Fade speed can be adjusted via game property
  • Normal and mechanic enemies can now be crushed by moving items
  • Some class cast changed to IGameSprite 
  • Weird uses different colors 
  • All pickups now execute their specific code
  • Some pickup specific code moved to its corresponding class
  • New IDoor and IProfile interfaces
  • All own counters removed and now using Ticks
  • Gatashi flapping sound stops after he dies
  • Many new background s
  • More stuff moved into Tick() rathern than Render()
  • Fight sets zoom to 100 by default
  • New LaserGrid element, beware
  • Stone does not rotate when on top of a carry item
  • Achievements update is not called every frame but on certain triggers
  • Fixed an issue where an achievement could also be valid for next level  
  • Some maps changes
  • New interface ISettings 
  • TSettings is no longer a singleton class
  • Shadows are cast only if there is a solid block behind
  • Background effects, autofit, seamless, etc can be configured from editor
  • New class TVehicle 
  • TCardRide now inherits from TVehicle 
  • Fixed a bug while walking on top a vehicle
  • New enemy UFO 
  • New enemy Thing 
  • New enemy Horus
  • Any entity can use vehicles not just hero
  • New property GameSprite.Child, TVehicle uses it in order to know who is using the vehicle
  • New animation when hero is landing 
  • Cardride now set its own state properly
  • New status ssLanding, hero uses it
  • Fixed a bug where unlocking coin achievement could be applied to next level


BB)

  • Manual timeout is not override with value equal one  if there is no configuration
  • New property in Sprite ShadowZoomDelta
  • TSprite.HandlerTriggers() is now executed on Tick()
  • New Ticks counter 
  • Tick() is no longer attached to sprite engine but to the own sprite render 
  • New interface IData is related to ITag in order to pass info to objects
  • New interface ISpriteEngine 
  • New property TGraphicDriver.BuffersUsed
  • Removed all *2 variables for keeping values and now all is done properly when paused via Tick()
  • Tick() now also handles sleep/timeout/speed aspects
  • Beam size of Laser can now be adjusted
  • TLevels has now some new handy methods like Previous, IsCompleted, First, Last and Next

New backgrounds)







Sunday, September 7, 2014

Harmonizing the code

Since project is getting close to the end (hopefully), I'm trying to improve those parts of the code that I'm not happy, so this time it was about splitting render code into Render() and Tick() methods, before it was a bit of a mess.

what's new?

HBF)
  • New enemy Sam (not used yet)
  • HandlingMovingPlatform() finally uses spatial partitioning
  • Fire emit some light 
  • Some different backgrounds tiles
  • Cardride response to the changes of slope with proper angle 
  • Slope detection simplified a bit
  • New property TGameSprite.Sticky
  • Cardride now uses new sticky property in order to not move away from rails
  • Slope calculations are now more accurate
  • Removed some singleton classes and adding them as interfaces via GameServices 
  • Removed an extra explosion sound when bomb exploded
  • Gatashi didn't kill the screen sprite spawner when dying
  • Darkness detection code improved, old code was slowing down the performance
  • GameServices is now fully working, no need for extra information
  • Updating all elements to use the new Tick() rather than have all the code in Render()
  • New credits screen 

BB)
  • TSpriteEngine render method was wrongly assuming that all sprites were TSprite 
  • New interface IShadow
  • Heights for slopes are calculated on demand
  • It is possible to get the angle of the slope 
  • New closure event for rendering
  • Slope angle can be retrieved more accurately
  • Many fields changed to cardinal rather than integer
  • Slope initialization was wrong
  • New Tick() function that is called when sprites are not in pause 
  • OnRenderClosure() has a serious problem with the Die param



Monday, July 21, 2014

Summer is here!, too hot to code... (va por ti, para siempre)

What's new?

BB)
Items from Layers refactored and improved with spatial partitioning
Destroying sprites is now more reliable since it does not use AutoHandled 
TObjectEx and TComponentEx both implement ISelf 
TSurface.CalculateHeights() was not taking properly the alpha value
Some 32 bits masks fixed in surfaces
Items didn't have shadows, fixed
New ICamera2D.Follow() 
Making quicksort stable number set to 31 rather than 15
New TLayer.PopPropertyAt()

HBF)
Stones improved
New secret level! 
Arrows source  code move to enemies folder
New sprite dispatcher entity, it can dispatch any entity based on frames, proximity or randomness
Moving items can also fire triggers
Spike and arrows has more behaviors (not only cadency style)
Tiles can be marked as Movable 
New trigger ClearText()
Cruswall is now a TBasicPlatform
Using ISelf.AsObject to cast to objects (performance issues)
Mirror Tracing should be x,y not CenterX/Y
OnOff does not have to update when in pause 
OnOff has now a behavior: random, cadency and touch
OnOff has a new chances property, default = 0.5
Move accurate platform detection of bound attributes
Bat now use proper 3d play sound method 
CarryTile = CarryItem 
Eye enemy becomes red when using laser
Fixed an error when detecting collision with platforms while changing direction 
TRotatingCloud now works properly
Background X it is also scrolled (why I didn't do that before?)
TGameSprite.IsPushable() was always returning true, fixed
Pushable items set as IPushable 
Arrows also fall when colliding with mechanic or indestructible enemies
Card ride can move on rails and hero can mount it (use it in last level, still not finished)
Cardride dos not get stuck when colliding against a wall after jumping
Carride cannot jump twice
HBF.UpdateCamera() uses cam.Follow()
Thrown lava is not created when there is more lava on the top
Removed many calls to GetCollisionData() that were not needed since it is done automatically at Element level
Arrows are now properly cut when spawning them
GetCollisionData() now gets info from cells and items 
New enemy catcher (comes with different formations, used in Break It)
New Anemone element 
Bubbles are now pushable
All spawning entities now inherit from TSpawner
New enemy Catcher 
New enemy Trail 
Now all entities can create water bubbles (like Anemone)
Fixed a minor bug where hero was playing a splash sound in see level (you are already inside water...)

Mounting a card ride:

Some Anemones:



BTW, please help my friend visiting his new game page at Bloxland Story

Monday, June 16, 2014

Pushing tiles

Now hero is able to push many objects, making the game more interesting.

All binaries should be at skydrive 

BB)
New Layer property X and Y in order to do nice scrolling effects
Some bugs fixed in Layer when looping and moving around the X and Y
New method TCamera2D.Rotate()
Sprites react to the new previous method
TVector is now TVectorEx
Shaders can be also loaded from big file
Map items class can be defined

HBF)
Rays didn't have proper collision box
Planets can bound vertically among them
Runes inventory is shown while picking up runes
Hero impulse increased 0.2
New effect for high scores
Shaders are now also packed
When a rune not owned is taken, it visually moves to its slot
Hero was automatically taking dead runes, hooray!
Arrow code refactored
When arrows collide among themselves they collapse
Hero does not longer needs reversed animations
Items can be now pushed (starting to think about some puzzles)
Bounce enemies now also bound with moving items
Items can have now gravity
Frog has a sound when jumping
Pushing tiles does have a sound
New sound for lava
All important map items are now classes
When arrows are falling they cannot kill hero
New interfaces IBubble, ISolid, IPlatform, IBall, IBubble, ISpring, IIce and ISlope
Many VARS removed
New element card ride, it can be pushed
New solid tiles
Arrows are respawn after 1 second (also avoids the nasty repeating sound)
Fixed collision against items with same direction
Solid items do not rotate when changing gravity
Solid items are now affected properly by gravity
Items detect other items so they can be piled
New sound when entering the water
Grass and Cotton are now fix elements
Any item can now be tagged as ice
Now lava throw fires balls
New enemy stone
Bubbles can only be exploded once

Level X?


Monday, May 26, 2014

Bugs, go away!

How many bugs are unknown in your application by average?

BB)

  • Tile cache in maps was not clear after new level (didn't affect game play)
  • Fixed error when creating screen buffers, first thing should be always create material 
  • Buffer ent code improved (3d stuff)
  • Files searches in big file are now much faster
  • Fixed when rendering to texture and the surfaces were lost lead to an AV
  • Fixed a new collision weird assignation
  • Triggers can be executed from the code
  • Fixed an issue with module volume
  • Closure versions of Engine.Find() and Engine.SpritesAt()
  • Closure version of Layer.ScanAttributes()


HBF)

  • New element flower
  • New element star 
  • New element boom 
  • New cotton element 
  • New effect fire wall
  • Snow improved
  • New mechanic enemy beetle 
  • Now hero is pushed down properly from falling items
  • Reminiscence music for intro
  • New sound for last battle
  • Web fall after 1 second of catching a sprite 
  • Fire was moving when in pause 
  • New secret level 
  • Game could not be finished twice
  • Fixed some bugs in the platform bouncers
  • Code related to levels and profile cleaned
  • Issue with boss1 and its fire balls (compiler should warn about non initialized array)
  • Hero with shield is now not affected by web 
  • Platforms now also get default layer var
  • Candle light does not move when in Pause
  • Ray pillar colorkey was not correct
  • Dialog can be seen properly in darkness
  • Now boss1 fire balls emit light in darkness
  • boss1 = kurkani 
  • Snow should be now be more sparse
  • Runes and coins now collide with tiles/items on top
  • More type of candles 
  • New fire jumping ball
  • Crepuscule can be set from top
  • Start Z properly adjusted
  • All circular enemies collision shape set to csCircle
  • All rotating enemies do not longer react to the Reverse event
  • New interface IHud
  • Now Finish screen shows the number of lives 
  • When hero dies with gravity up it falls down
  • Now game uses the closure versions in some functions that are used quite a lot, meaning no overhead creating lists 
  • Fixed a collision when tile vs item when gravity is up
  • Fixed a gravity collision issue, it was not affecting beetles because of its height
  • Gravity color switch is now faster
  • Spider now correctly does not get too close to hero when he has immunity
  • Fixed a weird collision issue when the gravity change too close to a tile


Sunday, May 4, 2014

"Only" improving the graphics is pending

Thanks to JLG the sound/music part is almost done, great job men!

Now pending for the graphic part...

HBF)

  • Dialogs can be skipped pressing return
  • Removed some unused variables in focus 
  • Finally fixed some silly bat bug
  • Removed some unnecessary collision detections against hero
  • Fixed an issue with speed factor
  • Removed some unused units
  • Keys now rotate
  • Now all levels have music 
  • TScreen new property GameServices and refactoring
  • Ending more or less finished
  • Deleted some legacy 3d resources
  • Droid was not taking properly the orientation
  • New sound for the magical stuff
  • Enemies cannot hit hero when he is already dead
  • Highscores screen have a gradient background
  • New sound for balloons exploding
  • Source structure refactored
  • WrongPlace() now is much more accurate with for instance lava
  • Hit animation improved
  • World background is now different
  • All tiles are now 64x64 rather than 64x62
  • New sound when stalactite breaks
  • New TGameSprite GetDefaultHorizontalSpeed
  • TD3D Colorkey improved a bit 
  • Now hero has 5 lives
  • Shadows are "dynamic"
  • Die animation is much faster
  • Fight screen now takes the current view rather than a flat background 
  • All sounds are normalized 
  • Levels starts with a zoom 
  • Darkness is not so dark anymore
  • New colors for the finish level screen 
  • Transition musics are now coming from configuration
  • New screen when entering the game, deja voo!
  • Error with bubbles when in bottom of the Level
  • Using Bass rather than fmod 
  • Sound queue improved
  • Improved the use of GameServices in GameSprite leading to less code
  • Book sprites rather than egg
  • Rain is now diagonal
  • New achievement, kill all enemies (very tricky!)
  • New wind sound 
  • Dragon tail now cast shadow 
  • Layer 1 and 2 uses the same Z
  • Egg has been discarded, now a book it is used which makes more sense in the fight
  • When candles are off they do not emit more light when in darkness
  • New pickup Skull, beware...


BB)
  • New TSurface.key reference to related classname so it is easier to debug 
  • TSurface2Poly.Tolerancy should be an integer not a float
  • Removed some really silly $IFDEF in TSurface which makes really weird random errors 
  • Tag removed from some classes that already have them since they inherit from TObjectEx
  • TSimpleSprite.LoadFile() was not passing correctly the colorkey wo the stream overloaded version
  • Some really weird visual issues fixed
  • Now FillSurface() does all the job, move the data from the bitmap to the surface, does the colorkey and also the flipping, this improves the assignation of surfaces
  • New TSurface.SurfaceType field with options: default, managed and target
  • D3D specific classes improved a bit
  • Improving TSurface.Blit()
  • Added support to BASS sound system
  • TSurface.Blit() errors fixed
  • New engine.Exists() a fast function in order to check if a certain class exists 
  • New Layer.number property
  • Fixed a z shadow bug, it was not updated properly in TAnimationSprite
  • Trigger parameters can now be booleans
  • Items now also trigger the event OnReadCell()
  • Alpha tiles do not cast shadows 
  • Removed some warnings in BigFile

Thursday, April 24, 2014

Bug fixing, the never ending story

Fixing bugs, do they ever finish? :-)

All binaries should be at skydrive 

BB)

  • New Engine.Debug property (it set all related sprites to debug)
  • TLayer.Trace() could raise a AV since under certain conditions a cell can be null 
  • Events from sprites moved to their own new class TEvents 
  • Screen buffers size is now a property


HBF)

  • Final boss getting better
  • When final boss dies he liberates the key
  • Final boss has a new sound when flapping the wings
  • SpriteFactory now gets IGameServices rather than many properties
  • Arrows behave better against bullets
  • New enemy mine, it  has a gravity factor of 2 and kills Enemies
  • Finally rays have a pillar 
  • New trigger method ItemOffset() in order to change the current tile
  • Die sound is more calm (it was too loud)
  • New horizontal trap doors
  • Bomb has a gravity factor of 2
  • One can observe the rendered tiles (used in final boss for heating ice)
  • New method PreciseCollideAgainstTiles(): bool which tests 8 precise collisions
  • GravitySwitcher now publishes Flashing and Quake duration properties
  • Mirror checks for obstacles (if there is an obstacle then the sprite cannot be mirrored)
  • Stalactite, flame and wall now  properly check for collisions (not only for spatial partitioning)
  • Droid,eye and final boss heats the special ice cubes and also mechanic enemies
  • Eye now publishes initial angle and laser color 
  • Arrows are now enemies
  • Candle vanish slowly
  • New Focus element (used in Colors screen)
  • Focus color can now be set as and mask via DirectColor attribute
  • Spotlight now slows down also enemies
  • Published attributes can now also be enumerators
  • Spider web when touching sprites they get locked until the web disappears
  • SLOW_VAR removed, instead SpeedFactor is used
  • Runes are now shown in the achievements menu and not in the hud
  • Observers are cleared properly otherwise AV
  • Candle new property off so when true it won't emit light when in darkness 
  • A bit clever approach for the sounds pool
  • Fixed a small issue with the steps when taking the key 
  • Now when the default resolution does not work, the game properly restarts at 1024x768


Friday, April 11, 2014

"Close" to finish

Well, it is time to close this never ending project, so I'm just trying to focus on bugs and last boss level.

All files should be at skydrive  (well, sources not any longer)


HBF)
  • From triggers you are able to pause and continue the game showing some text
  • Trigger dispatcher now gets all the info from IGame
  • New interface IDialog
  • Mummy jumping areas detected more accurately
  • More music!
  • TGame.SpawnAttributes() refactored a bit
  • Rotated coins attributes are now published
  • New sources folder structure
  • Items bound not only when finding a bounce attribute but also when colliding with a solid tile
  • Items can also have set their properties (clouds, on/off, moving tiles, red ball and spring)
  • Last level boss fight! (wip)
  • New sound when balloons explode 
  • Bird does no longer appears from no where... (bug fixed)
  • New sound for eggs 
  • New sound for arrows
  • New sound  for rain
  • New sound for menu 
  • Now pause has a sound 
  • Some pickups have a new sound 
  • Fish animation is now PingPong rather than circular
  • Stalactite does not fall if hero is dead
  • Text dialogs fit a bit better
  • New menu Music
  • Platforms code refactored a bit

BB)
  • Font stuff moved to BB.Screen.Fonts
  • New method Layer.GetExtraAt()
  • Map triggers have a new property align which tells the system how to align the trigger (only for collision purposes since they are invisible)
  • ITag removed from some classes since they derived from TObjectEx which already implements that interface
  • TSprite IsOutOfScreen is a bit more consistent
  • Now the engine can be paused  (much more handy and easy than pausing all enemies)

The final boss


Monday, March 31, 2014

Attributing

Now it was time to apply values to attributes in real time in order to let the potential designer the power to desire the levels behavior (in this case the designer is me...)

Of course this is achieved via rtti and publishing all interesting properties, in our case:
  • Colorkey
  • Collision info
  • Effect (add, sub, multiply, inverse)
  • Filter
  • Angle
  • Color
  • Horizontal speed
  • Vertical speed
  • Zoom
  • Acceleration
  • Friction
  • Gravity
  • Facing
  • Animation info
  • Shadow info
  • Sleep
  • Timeout
  • Coordinate system
  • Group
  • Flip x/y
  • Visible
  • X/Y/Z coordinates
Also all special attributes from all entities in the game are published.

All files should be at skydrive  (well, sources not any longer)


BB)
  • Scanning polygon algorithm is now more accurate, I hope this fixes some weird collisions 
  • New TSurface.Target property used when rendering to texture
  • When calling TScreen.SetRenderToTexture() the system first render to a texture and then to screen 
  • Screen quad can be zoomed and rotated thanks to the rendering to texture
  • Fonts can be now loaded from big file
  • When setting a sprite as no colorkey the bounding box is also set to full rectangle 
  • One Trigger can now have multiple calls (before it was one trigger one call)
  • Many class properties are now published in order to be accessible from Map editor
  • TLayer has a new method in order to get information about properties called GetPropertyAt()
  • Map extras now cast shadows (like fire animations)
  • Shadows can now be assigned at any time, not only before assigning a surface
  • Sprites take by default the shadow from the engine (if available)
  • Attached engines in maps take the shadow from the Map
  • TSound keeps the name of the loaded song (useful for debugging)
  • Y shadow offset set by default to 4 (before it as +4)

HBF)
  • Enemies getting angry code refactored (now it is generic)
  • Spike ball now rotates according to its angle 
  • Fixed some platform code issues when gravity was up
  • OnPickup event removed, always use OnDie
  • Bouncing code refactured and tunned
  • Finally new "legal" music is coming (thanks to herotyc/xplsv^asynkro)
  • New crepuscule lights here and there
  • Enemies cannot longer activate moving platforms (only hero does it)
  • Now hero collides properly with moving items when gravity is up
  • When bubbles are exploded with head, the jump is not stopped
  • Stalactites now breaks items and kills enemies
  • Fixed a bug with camera where in some levels was showing stuff outside the map
  • More accurate balls bouncing (level severe gravity)
  • Fight now respects the current shader 
  • Dialogs can be paused 
  • Dialogs can be chained
  • Game now shows some dialogs while playing
  • Arrows now can have dynamic speed
  • More entities get published attributes
  • Now candle fades slowly 
  • Waterfall now has a sound 
  • Fight screen was stopping all sound, that's wrong now it pauses all sounds 
  • Outside there level does not longer cast shadows (since it does not have background)
  • New font 16x16 for dialogs
  • Blob speed set to 1.5
  • Spider leaves webs while walking
  • Droid collisions improved

Better sun lights