Sunday, October 22, 2017

HBF can now be played on a LAN with up to four players!

Not because there are no news it means I'm doing nothing,  I was focus on net playing, not an easy topic, but as usual I love the concept "learning by doing", so this is the result of that process.

What's new in the game?

  • New unit Camera, all camera code moved from Game to new unit
  • New achievement "Finish the Labyrinth with a partner"
  • Now bat moves faster
  • TPlayerHandler.GetClosestHeroAt() fixed
  • When a platform is pushed, some particles are rendered
  • Stalactite has now some alpha
  • Fixed an issue with casting interfaces (suddenly it crashes...)
  • Mine now rotates a bit
  • Fixed offsets of lightmaps in darkness
  • Minimum resolution is 1024x768
  • All release inventory code moved from Game to Hero
  • Hero can have a partner on top of it
  • Monologues are now created on demand
  • Now when loosing a fight, owned runes are released, beware!
  • New Mine.Shake property
  • New trigger Follow()
  • New service GameService.GetEvents
  • When hero touches the ceil it liberates some Particles
  • Camera lerp enhancements to make the usage easier
  • Now Liquid might have a Tide
  • Rays colors changed in order to look better
  • Now Camera does all movements with interpolation, new method for lock/unlock
  • New Weapon properties Range and Quantity
  • Now Camera can focus any entity
  • New property TGameSprite.Triggers, so that any entity can execute any trigger/s
  • Doors can now be closed after being opened
  • Fixed an issue with the stalactite particles
  • New property Items.IsAutoso can be auto activated after they are taken
  • New triggers: AchievementDone(), ExecuteIfEqual(), ExecuteIfNotEqual(), KillAll() and Focus()
  • New Weapon.Maximum (as bullets)
  • New weapon Bow
  • Now extras can be automatic applied (like live)
  • Entities can execute triggers OnCreate, OnDestroy and OnTake
  • Monologues are delayed
  • Better Door states
  • Annoying bug changes have been fixed
  • Camera follows hero in a more stable manner
  • New inventory functions ActivateFirst() and Push()
  • New change action (to cycle weapons)
  • Snowball generates different particles than before
  • Items are not draw when exiting a level
  • Game can now be set to fullscreen/window at any time with Alt+Enter
  • Background also tries to adapt to camera Z
  • New Item.Detail property
  • Bell item sounds more continuous rather than per volume
  • New golden bow and golder arrow items
  • Arrow can have now an angle depending on how long the action button is pressed
  • Scores moved from inventory to players class
  • Map read cells event improved
  • When in shop background is rendered as sepia to make contrast
  • Entity.Excite() code refactored
  • HBF now can be played remotely (new menu option)
  • New host/port settings
  • New hero property Scope: local, remote
  • New dialog type Abort()
  • New level...
  • Better handling of network delayed games
  • TCPClient/TCPServer connected properties not used during game (seems they they corrupt network buffers)
  • Entities inside a thread/task using random functions will take a local Copy
  • Closing dialogs won't unlock the game if still locking pending messages
  • Better control of locked situations (visual messages VS waiting network)
  • New TNetBuffer PeakX()
  • New sound when hero is underwater
  • New item Water of Rhand
  • Menus now can show dialogs
  • Session id is send in every message, so client can refuse their own messages
  • Coins moved from inventory to TPlayerHandler class
  • TPlayerHandler refactored, now it is easier to follow the code
  • Dialogs, question can persist after callback
  • SessionId is send in all net messages so that clients can ignore messages at their own discretion
  • Terminal animation is different
  • Now input is in the form of K;J1;J2;J3
  • New screen Sync
  • Input read improved
  • New Hero.JoyId
  • Inventory moved to Players class
  • Stalactite now also also falls when top tile disappears
  • TCameraHelper.CoversAllPlayers() now does not take into account heroes that have already entered then door
  • New GameServices.GetImpersonateKeys()
  • Players iteration improved shorting edges (first/last)
  • Hero sessionId moved to Players class
  • New message to request the list of sessions
  • Now servers controls the maximum amount of players
  • Now game can be played with up to 4 players
  • Hero.Scope moved to Players class
  • New callback TPlayerHandler.GetPlayers()
  • New TPlayerHandler.MinPlayer() / TPlayerHandler.MaxPlayer()
  • Player removed from inventory
  • Added player Alias so when joining network games, players can be identified
  • New TPlayerHandler.FindPlayer(session)
  • New TNetBuffer Readstring & AddString, so now strings can me send in net protocol
  • if master leaves the game, then server finds a new master
  • New TPlayerHandler.GetSlots()
  • Game can now do multi-ping
  • NetworkPlayer concept removed (everything is in player and slots)
  • New TPlayerHandler.RemoveSlot()
  • More robust network control
  • Remote locks improved
  • New concept in network code channel (rq, all, target)
  • Max zoom improved
  • TPlayerHandler.GetDistance performance improved
  • Wand item now glows
  • Now when hitting enemies a white effect is done
  • Pushing moving blocks improved
  • When playing over net, camera focus on local player
  • Blind and Many players achievements are now configurable
  • New skin for player 2 (tough still ugly...)
  • Avoid Z players overlapping
  • Network locking simplified
  • Now HBF comes with a standalone server called GameServer.exe
  • Now dialogs are rendered correctly when title is short
  • Now network seed is taken from ticks and not from network, this makes the game more deterministic
  • Server now sends back the available slots
  • Network input is stored in a buffer so if we receive more than one packet all packages are processed in order
  • Reading joy process improved
  • Now game check if there is enough input devices
  • CheckPoint is back to Hero class
  • More control over disconnected sessions
  • Now TSpriteEngine uses TColony<T> as a main iterator class
  • Cannon had a AV when hero is dead
  • New THUd.Visible
  • New TPlayerHandler.RandomPlayer()
  • Now when entering Door a red flash is shown
  • When no lives and going to main menu, the in game menu will not be displayed
  • Falling controller is not always created by default
  • Some non used songs deleted
What's new in libraries?
  • DirectZ removed from sprite properties
  • Map does not longer creates a default camera
  • In TSpriteEngine.SpritesAt() there was an overloaded version that didn't use the spatial grid, speed boost!
  • Particles adaptive view fixed
  • TArrayEx<T>.Delete fixed
  • Object names are no longer used in release mode
  • Now maps have infinite loops again
  • Now sprite quads have a default Tag
  • TSpriteEngine.Find(name) was not working at all!
  • Maps now use frustum to check boundaries
  • Improving frustum in 2d maps rendering
  • New Map.FindTrigger()
  • New Trigger Context, so that engine knows when to execute the trigger (create,destroy,taken)
  • New buffer default size
  • New TPerspectiveCamera and TBasicCamera
  • Sprite engine searches are faster
  • New particles property RandomDirection
  • TInput now can keep track of now many frames a certain button was pressed
  • TSprite.SetAngle() now does not apply matrix if camera is not set
  • New inline TRGB _R(), _G(), _B() _A() and _32()
  • New laser aspect
  • Horizontal and vertical gradiants now take into account alpha channel
  • Blur() performance improved
  • TLayer now have a Glow property so that tiles can be glowed
  • New TRandomHelper useful for threads, otherwise random generators are corrupted and net game is not deterministic
  • Particles use their own random generator
  • TSurface.AverageColor() fixed
  • Now when creating Direct3D, flag D3DCREATE_FPU_PRESERVE is used
  • Many raise moved to their own function (performance)
  • Fixed a Lock() issue in TSound
  • New TParticles.IsSystemDown()
  • New classes TRingBuffer<T>, TSet<T> and TColony<T>
  • Now system can handle up to 4 gamepads
  • TInput improved
  • New TJoyData.JoyReleased()
  • Now levels are loaded with rtti
  • Triggers now can have a counter (executed when counter = 0)
  • Finally joy direction pressed are no longer simulated
  • Shadow and Glow helpers classes are not created by default
  • Queue particles are not created by default
  • Collection iterators improved



And that's all folks.