Saturday, October 17, 2020

Summer is gone, pandemic still there

Weird summer, not crowded at all, but at least living on an island has some advantages...

This is a new release, main topics are:

  • New level includes the new concept Sectors
  • Better continuous collisions with sprites and tiles

Find binaries at download

HBF)
Changed (class as IInterface) with class.GetInterfaceEx(IInterface, intf)
New extra THook
New triggers ClosestHero(), ClearDialogs(), LockPlayers(), UnlockPlayers(), ActivateScript(), EnableTeleport()
New TActor properties, Counter, Phase, AutoFacing, QueueColor, NoCollisionTime, AutoContinuous
New mewthods TActor SnapTo(), TActor.InSight() 
Now NPC can be killed, can use vars in their text and can now ask questions
Added some silly NPC 
New method THero.Heal()
New property THero.MaxHealth
Class TElement removed
New abstract class TNonElement
Now MineBomb is self activated when hero is at certain distance if nothing is blocking
Now dialogs can include portraits
New method IGameServices.GetViewport()
Brachion improved so it does not get stuck in some situations (hopefully)
Now RotatingSpikes can be set horizontally from left or right
Now any actor can be solid, thus not passable
Now platforms can have a tape speed behavior
New level Sectoring
Now when keep pressed attack hero goes faster
Now platforms can be linked to other platforms as mutual exclusive, so visible is toggled among them
New TItems properties Consumption and MaxQuantity
Sounds from hero weapons also have HERO_SOUND tag so they can be hear from other actors
New property TArrow.NailBehaviuour
New game helper IMapSectors
Now when hero got the torch rather than see the whole screen, the light is twice the size
Continuous Tile Collision improved
New unit Enemy.pas, all base enemies are now located in this unit
New TSoundDispatcher .IsPlaying() and .PlayUnique()
Homing missiles target improved
Now TScepter uses segments from map 

BB)
New methods, TSurface SetText(), Box(), AreOpposite()
New properties TSprite IsTimeOut, Area
New method TAnimationSprite.AnimationTime()
New class TInterfaceCache
New method TMap.AsMinimap()
Now colors in TRGB record are no longer functions but consts, thanks to a record helper (nice trick)
New method TTimeHelper.AsTime()
New TCounters class to help the use of them in the game
New helper class TEquality<T>
New class TStackList, a list that resides in the stack rather than in the heap
Now TScreen.NewSurface returns TSurface rather than ISurface 
New methods TMath MultBy7(), Probability()
Method TSprite.CenterFrom() now takes into account CoordinateOrigin property
New rtti TValue record helper TValueHelper
TBufferHasher.Calculate() improved hash in order to avoid collisions
SpriteEngine.Find() changed to Engine.Find<T>()
New method TSpriteEngine.SpriteAt<T>(aX, aY: TFloat): T
Uses of ItemsLayer.GetItemAt() changed to TSpriteEngine.SpriteAt()
Uses of ItemsLayer.GetItemsAt<> changed to TSpriteEngine.SpritesAt<>
New property TScript.Active
New method TSound.Replay()
Now TCollision.IntersectionPoint() uses a faster approach
New method TFloatHelper.IsGreaterThanOne()
Starting to use Mormot for calculating hash values (does 4 bytes at a time)
Fixed a bug in TObject.DeleteObserver() where the double link was not properly removed (source of long time random AV errors)
Now TMap can have sectors 
New methods TMap AddSector() and RemoveSector()
New method TCells.Sort()
Now grouped scripts can be set to be executed in certain order

Map Editor)
Now it shows the configured sectors




Thursday, July 30, 2020

Summer release


Dear invisible friend

This is a weird summer, the good thing is that the confinement made our island look quite different, that is, cleaner landscapes, animals here and there and crystal clean waters. The bad thing is that economy sinks and stinks..., but at least I keep coding whenever I have time.

Please find binaries at  
 

HBF)
  • Princess position fixed
  • Many TDictionary changed to THashMap
  • New TTriggerDispatcher FreezeCamera() and UnlockCamera()
  • New level Scifi Movie!
  • Now cables are also affected by gravity
  • New element VerticalLight
  • Now Darkness works with Camera (panning and zoom)
  • New enemy FlyingEye 
  • Now Turret laser takes into account any possible actor and stops in in its path
  • All laser enemies now inherit from common class TEnemyWithLaser
  • Some minor optimizations in TColorTileHandler
  • TLavaEruption behaves better
  • Now if an enemy is sleeping and gets damaged it will wake up
  • Fixed some Z issues with Cables and Ropes when zooming with camera 
  • Now when arrows fall some particles are shown and ther arrows dissapear with alpha 
  • Now selecting level  has some flocking effects

BB)
  • Sprite quads massively improved 
  • THashEx.Generic() improved
  • New TMem.Move192BytesAligned(), Move192BytesUnAligned(), TMem.Move16Bytes(), TMem.Move20Bytes(), TMem.Move32Bytes(), 
  • THashMap<K, V> improved
  • 2D camera improved
  • New property TSprite.EmitterMask
  • New TFlocking class
  • New TVectorEx.Limit(), Magnitude() and Square(), TVectorEx.FastLength(), FastDistance()
  • New TMath.CenterOfTriangle(), TriangleHeight()
  • New TFloatHelper.IsGreaterThan(), IsLessThan()
  • New TRectF.Sort() and Round()
  • TPerspectiveCamera properties FOV, Distance and Limits seems accurate now
  • New TCamera2D.Move()
  • TMenuItem.Default now sets Option properly
  • New TScreen.SetScissor(), GetScissor() and RemoveScissor()
  • Sprites, Laser and Fluid drawing improved
  • New TCamera2D.FitToAreaWidth()
  • Little optimizations in loops here and there, making all vars local
  • New TRGB.HasAlpha()
  • Now TMessage.Data is a plain TObject rather than an interface
  • New types T8,T16,T32,T64
  • Now Cables and Ropes cast shadow 
  • Now Cables and Ropes occlusion against camera Z works better
  • Spring behavior is now more precise
  • Z occlusion test for particles improved
  • New TD3DDriver.SetViewport()
  • New TGraphicDriver.GetFullView()
  • New TFloatHelper.IsGreaterEqualThan() and IsLessEqualThan()
  • when drawing a layer, Glow applies only if not completely surrounded by tiles
  • New TRGB.CopyFrom()
  • New TVectorEx.CopyFrom()

Saturday, May 2, 2020

Confinement release, weird year this 2020

I hope you are all safe and well. Due to bloddy coronavirus thingy I had plenty of time to write code so here we go!

Found binaries at OneDrive, main changes:
  • New level Fear!
  • New boss Brachion
  • New weapon Amus
  • New element Cable

Here is the full list changes:

HBF)
  • New element TCable
  • Weird corrects its angle when taking a new path
  • IInteractive.Interact() implementation was crap, improved
  • New element OldLamp
  • THero.CanJump() improved
  • New THero.TileOnBottom()
  • Now Ropes use a better visibility test 
  • New TTriggerDispatcher GetResult(), ScriptCount() and SumVar(), Print(), ClearTileAt(), ClassCount(), CopyVar(), RemoveEntities(), SpawnClass(), AlphaLayer(), SetShake()
  • TGameSprite.SetGameServices() is no longer virtual
  • New enemy Brachion 
  • Now platform's angle is taking into account (not working 100%)
  • New Kurkani bitmap
  • Nnew Gatashi bitmap
  • TGameSprite.SetGameServices() is no longer virtual
  • New enemy Brachion 
  • Now platform's angle is taking into account (not working 100%)
  • TGamesprite renamed to TActor 
  • Actor.Master is now Actor.Host
  • New property TActor.AutoPriority
  • Game was not cleaning the sound cache between levels
  • New element PhoneBox 
  • Now Turrets show a think red laser when chasing players
  • New property TCotton.MinDistance
  • New property TLight.Animation
  • New property TParticlesWrapper.MinDistance
  • New property TBasicTurret.LaserColor 
  • New property TBrachion.LaserColor 
  • New property TSkeleton.MinDistance
  • New property TNPC.MinDistance
  • New property TPrincess.MinDistance
  • New IBaseItem.IsCollectible()
  • New THero.GetCollectible()
  • Now shop items are sorted by name
  • Now after entities are created, the cell attribute is cleared
  • Now shadow Z is calculated dynamically
  • TActor.CorrectGravityOrientation() improved
  • Now achievements are stored in a file and no longer internally
  • New TCable.Perturb()
  • Runes are no longer keep in the profile, TRunesHelper now keeps all runes information for the current game
  • New TTriggerDispatcher.Sleep() fixed
  • New class TEntityTracker that helps any entity to find the shortest path to a target
  • ExplosiveBarrel behaviour improved
  • New Actor property Range 
  • Actor.DestroyArea() improved
  • Hero can now go down from TwoWays (like clouds) platforms pressing down + jump
  • New attribute GRAVITY_UP so a map can have a different gravity deom design
  • New method TActor.GetPlatformFromCenter()
  • New TActor.ContinuousSpriteCollision() that helps fast moving sprites collisions
  • Now arrows adjust correctly their angles when gravity is up
  • New TActor.AdjustPositionToTile()
  • Now darkness can rotate lightmaps coming from entities
  • TMachineGun many fixes
  • Changed some Sin() and Cos() by SinCos()
  • New element IceSpike
  • New pickup TCollectible
  • Now some enemies uses new shadow queues 
  • New properties TEnemy.PainChance and PainDelay
  • All TStrings changed to TList<string> or TStrings<T>
  • New TTriEye properties ContinueAfter, FireAfter, ShootingProbability
  • TActor.ContinuousSpriteCollision() improved
  • New element SuperBlob 
  • New property TActor.InitialEnergy
  • New explosion with particles, I believe they are cooler
  • When bomber is going to be alerted now also checks that there is nothing solid in between
  • Now Arrows inherite from TBullet and fixed a bug where an arrow did not know that parent (ArrowSpawner) was Dead
  • New weapon Amus
  • Fixed a bug where an actor could die many times in the same frame 
  • New TSoundDispatcher.DelayedSound()
  • Now dynamic priority takes into account liquids 
  • Now when jumping the speed from platforms is take into account giving more inertia
  • Now sound system tries also to use the youngest sound when channel is full 
  • New achievements...
  • New enemy Rotating Spike 
  • New TActor.GetEdgeFromVelocity()
  • New property TActor.ExplosionTime
  • Seems BASS64.dll is modifying MMX overflow flag while playing, so a workaround was created
  • New effect to shake tiles
  • New ITriggerDispatcher.
  • Bat fixed
  • Scepter won't stop on solid items
  • Added lightness to levels
  • Now some shields can reflect a laser
  • New bridge elements 
  • Hidden doors are no longer shown in minimap
  • Up spikes are now correctly aligned
  • Poison was not recovering after 10 seconds 
  • Now fish when is out of water feels the gravity 
  • New Players.GetHeroes(TRect) that improves the performance
  • New shop/inventory item LastExecution that helps with cadency
  • New extra THomingMissile
  • Hero extras handling improved
  • Now hero uses a buffer jumping before falling
  • New generic modifying cube system
BB)
  • Now maps can have configured slopes
  • New ISprite.GetLayer(), DistanceXBetween(), DistanceYBetween()
  • TMem.Scan32() in the 64 bits version was flawed thus last 64 bits version of binary was broken
  • New TSurface.Tween()
  • Now triggers can have parameters
  • New TParticleEmitter properties AlphaFrom/AlphaTo 
  • Many functions in TSprite are no longer virtual 
  • TSprite.OnChange does not update collisions if collisions has not been created yet
  • New TSurface.Replace()
  • THashEx.Generic() optimized when size is multiple of 4 (four bytes at a time)
  • New TScreen.DrawSurface(surface, rect, z)
  • New TMap.ScriptCount(group)
  • New TScript property LinkedGroup
  • New TMemVar.Sum()
  • Many loop vars change from integer to NativeInt when used with pointers as offset so code generated is better
  • New TMem.AreEqual<T: record>(A, B: pointer; aSize: cardinal): boolean
  • New TSoundFactory.ToMono()
  • Now TSurface.FlipX is much faster
  • TD3DSurface.FillSurface() performance when no colorkey improved
  • TKinematic improved
  • New TSwap<T>.SwapContent(A, B: pointer)
  • New TMath.CenterOfPolygon()
  • New TMath.ThrowAngle()
  • New class TCameraPrimitives, for primitives with camera 
  • New TParticleEmitter.IsStarted()
  • A few optimizations in loops with field variables from object in many classes
  • TLayer.GetCellNoCheck() used in some functions rather than GetCell()
  • New TInterfaceHelper.Copy()
  • Now individual layer tiles can be glowed
  • New TLayer.GetDistance(), GetTileRect()
  • New property TLightSprite.Blur
  • New TRGB.Dolly(), Martinique()
  • New TParticlesTextureCache class
  • New ISprite.SetEngine()
  • New TColony<T>.Exchange()
  • New TCollision.CircleInRect(), TCollision.CircleInCircle(), TCollision.LineInRect(), TCollision.PointInTriangle(), TCollision.RectInCircle(), TCollision.TriangleInRect()
  • Now once per second system checks for "aged" buffers in pool in order to discard them (10 seconds at the moment)
  • TSpriteEngine.GetSurface() performance improved a little bit
  • Now a TKinematicArm can have many TKinematicSegment
  • New TClamp<T> helper functions
  • New TObjectHelper.CopyObject<T>
  • New TMath.Clamp(), DistanceManhatan(), NormalizeAngle180(), Atan2(), Log10(), Log2(), Sgn(), Ln2()
  • TPathResolver finally works 100%
  • New class TTickHelper
  • New TDirectionHelper.Rotate180(), Rotate90(), Rotate270()
  • New TMath.InverseNormalize()
  • Particles now handle much better when alpha changes with textures (dictionary of pool)
  • New TMath.NextPowerOfTwo()
  • New BB.Helper it contains all BB classes and records helpers
  • New TDummySprite.GetLayerPosition()
  • New TSurface.Copy(), MirrorX(), MirrorY()
  • Now Cadency in .ini, .extra are set as milliseconds
  • New TSprite.GetDelta()
  • Now the precise collision system supports FlipX and FlipX (besides zoom and angle)
  • New IObject.GetClass()
  • New TFloatHelper.Is1()
  • TCollision.TestBB() improved
  • TSurface.Rotate() improved
  • Now in looped maps the offset can be set (does not have to be zero)
  • New TParticleEmitter.Random
  • New TParticleEmitter.RandomRate 
  • New TSprite.GetCenterF()
  • New class TCPU
  • New TRGB.Gradient()
  • Now TSprite FlipX()/FlipY() also flips BoundingBox
  • TSprite.GetBBF() improved
  • Particles cache system does not longer need a group
  • New property TParticleEmitter.RandomAngle
  • New TMath.Normalize()
  • Many exceptions changed to asserts
  • sprites.CenterX/Y were not taking into account CoordinateOrigin...
  • Better management of particles 
  • New unit BB.E3D.Types
  • New Particle Emitter pool
  • New motion tiles has color property in .ini file
  • New TRGB.HasColors()
  • Updated to last version of bass.dll
  • New TCPU.LDMXCSR() and TCPU.STMXCSR()
  • New FloatHelper.InBetween()
  • Added moving slopes tiles in Maps
  • Fixed slope sizes when no colorkey
  • TStrings<T>.SetItem() was not working properly
  • New TGraphicDriver.OnClear event
  • TSpatialPartitioning.GetArea<T> improved when area occupies only one cell
  • TSprite properteis Painted and Locked removed
  • TSpriteEngine.Find<T>() casting improved
  • TSpatialPartitioning.IterateSprites<T> casting improved
  • Scripts rollback handling improved