Adding a second player to the game means many aspects of the game have to be modified, like who enters the Shop, how Items are split, some enemies need to decide the proper victim, how to handle when heroes are far away from each other, what do to when one die, change the behavior of the Door, who enters the Fight, rewrite most of the input system, etc.
That was as usual very funny. The most difficult part was to handle the Camera and order of sprites, so I decide so change the 2d engine to be more 3d (visually still the same), so now Camera can play with Z axis, then many Z issues appear..., so I had to revisit all game.
But anyway, the work is done after some tough weeks :-)
Found binaries at OneDrive
HBF)
- Now two players can play the game, big improvement
- Now when a coin is taken it executes a different particle
- Now levels starts differently
- Item cross code improved
- Sprite.AttachedSprite code improved
- New emerge particle
- Now Focus element blinks
- New FadeIn() styles
- New HUD layout
- Keys code is now handled directly in the inventory class
- Now checkpoints are handled in the player class
- Camera now needs to cover correctly all situations (when one hero dies and checkpoint cannot be covered by camera when in two players, etc)
- Now doors still closed when taking the key and can only be opened by the owner of the key
- When in two players, if one player looses of lives, then he releases all inventory so that the other player can take it
- When in two players, if one player looses of lives and the other player has already entered the door, then the level finishes
- Input reading code optimized
- Now Fight, Shop and Inventory can only be used by the player that activate it
- Shop/Inventory/Items code improved
- Fight changed a bit
- New heart item
- New class TPlayers
- New extra TPresent
- New EntityType Magma
- Scepter is no longer spawned in Lava
- If hero looses the Rune Fight he also looses his coins
- Now when finishing level, camera focus and zoom on Door
- Now aspect ratio can be selected (4:3, 19:9, 16:10), so game should fit properly with all resolutions
- Camera Lerp now also takes into account Z
- Drawing air moved from hero to HUD
- Now heroes are able to push many blocks in a row either vertical or horizontal
- Some interfaces were not set to nil on destroy
BB)
- Doing a render to target and losing the surfaces does not work, it raises an AV, why?!
- Sleep properties in Particles now talk about milliseconds rather than steps
- Lightmaps now also interpolate alpha channel
- Some internal array improvements (aligned to next power of two)
- Surface.Blur() quality improved
- TArrayEx<T> improved
- Now the 2d engine is completely dine in 3d, so that one can freely play with the camera
- Fonts performance improved
- New TCamera2D.Rotate()
- Shadow silhouette improved (a bit of blur applied)
- New TMenu.Find() in order to find menu items and optionally be able to modify them
- New events for particles OnBefore/OnAfter Create/Tick
- gamepad set to DISCL_NONEXCLUSIVE
New aspect ratio option)
HBF now is accompanied by his partner ABB (say what?)
Camera zoom out to fit both players (until a certain point)