Hello Guest

Author Topic: Otter Updates  (Read 158264 times)

0 Members and 1 Guest are viewing this topic.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #30 on: November 01, 2014, 02:54:52 AM »
I see what you're saying, I'll have that in the next update.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #31 on: November 06, 2014, 06:54:45 PM »
Some dev branch updates:

* Added BitmapFont

* Font stuff is a little different now to support BitmapFont

* BitmapFont is only usable by RichText

* DataSaver updated to write default values when using Get___OrDefault functions

* Various minor tweaks and fixes

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #32 on: November 19, 2014, 12:31:07 PM »
Dev branch updates have been happening a lot lately!  Here's the run down on some recent stuff.

* Changed how Entities are Added to the Scenes.  The Entity's Added() method now fires when the Entity is actually added to the Scene at the end of the current frame.  The Added method also fires after all Entities in the adding queue have been added.

This means that if you're adding a player object, and then an enemy object afterwards, and the player object needs to reference the enemy object in its Added() method it should be possible to do so.

* In a similar fashion the Components have been changed in regards of when their Added() method is called.  Components in the add queue are added at the beginning of Added, UpdateFirst, Update, and UpdateLast, and their Added method will fire when they are actually added to the Entity from the queue.

* GetComponent can now return Components that are still in the adding queue if none are found on the Entity itself.

* GetComponents() returns a list of Components of a certain type.

* Axis now has access to Up Down Left Right buttons. Very handy for having to check for button presses on an Axis and not having to create 4 separate buttons to do so.

* Repeat has been changed to two bools RepeatX and RepeatY.

* Util.Log() now behaves like a format string call (similar to Console.WriteLine())

* BitmapFont support is coming along and now supports data for three different bitmap font generators, as well as support for standard monospaced fonts.

* RichText characters can now be accessed and manipulated individually.  This means you can do stuff like animate properties of characters yourself instead of relying on the mark up in strings.

* Other minor clean up and fixes that should make stuff better overall.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #33 on: February 04, 2015, 05:11:27 PM »
I've been neglecting this thread, but the dev branch has been undergoing some updates over the past month or two!

* Color.AddCustom() and Color.Custom() added.  This is a handy way to define custom colors by Enum and later retrieve them.  I didn't like making my own static colors class for each project to keep track of my custom colors, so I added some functionality to the Color class.

* BitmapFonts have been almost finalized.  They should be usable now for the most part and you should be able to import fonts from a handful of different editors.  You can check out what editors are supported in the class itself with the Enum BitmapDataType.

* RichText has been updated and fixed once again.  I guess I've been doing kerning wrong all this time and I think I finally have it corrected.  RichTextCharacters also have some new values to play with like their X and Y offset positions, scale and rotation and more.

* Added Enum.HasFlag() as an extension method.  This is a handy way to check if an Enum with a [Flags] attribute contains a specific flag.  I guess you can use this if you're not comfortable looking at the bitwise operators or whatever they're called (I sure am not!)

* Shader.AddParameter() is now available to register your shader parameters as an Enum. Now you can just define it once and use the Enum everywhere which should reduce pesky typos when working with shaders.

* StateMachine has been scrapped and StateMachine<> has been upgraded a little bit.  It's now possible to use a stack of States in a StateMachine<> and it will run the top most state.  Also now if you call ChangeState (or if you push and/or pop states) during a StateMachine's update function the StateMachine will wait until the update has finished before applying the state change!

* Fixed a typo in the Shader class whoops (SetParamter?)

* Surfaces now have their Display() function exposed.  This is crucial in using a Surface that doesn't render at all, like if you're using a Surface as input to a Shader. Without calling Display() the texture will be upside down.

* Updated Collider and Entity and Graphics with more stuff like SetPosition(), SetOrigin(), and other handy stuff.

* Surface.SaveToFile() will now automatically save with a timestamp file name as a png if you don't specify an output file path.  Handy for taking a bunch of screenshots during a session.

* NineSlice has some new utility functions like SetBorderPadding.  I found it easier to define the areas of a NineSlice object in this way instead of trying to figure out what the bounds of the rectangle inside the texture was.

* RichText now will always round its origin since setting the origin to a 0.5f value results in blurry text!

* Fixed a bad bug in the PolygonCollider which resulted in the collider not using the transformed polygon for collision checks.

* Added 3D Audio support thanks to Fruckert.

* Lots of little bug fixes and tuning changes here and there.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #34 on: February 18, 2015, 03:19:17 AM »
Merged in the dev branch today to make version 0.9.8!  Almost to 1.0, not really sure what I want to get into 1.0... I think it might be just bug fixes and some other clean up and then maybe it's good to go!

BitteWenden

  • Member
  • Posts: 13
    • View Profile
Re: Otter Updates
« Reply #35 on: February 26, 2015, 02:27:48 PM »
You could rework the UI System for Version 1.0. Would be great!

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #36 on: July 11, 2015, 01:44:13 PM »
* OnAdded() timing has been changed for Entities. When an Entity is added to a Scene the OnAdded() method is now called after the Entity has updated its component lists. This is so that a component can register with the Entity's OnAdd method before the Entity is added to the Scene.

* Added GetTopEntity() and GetBottomEntity(). These methods allow you to pass in a bunch of Entities and find the top most and bottom most entity in the rendering.

* Added GetComponent() shortcut methods to Component.

* Added CollideEntities<T> method that will return a list of a specific type of Entity.

* Possible graphics changes. I want to explore the possibility of reworking the rendering system to allow for multiple transformations to be applied to graphics. This would possibly allow easier parent to child relationship transformations and more. Mostly because I noticed when working on games that I want to have multiple scales, rotations, and translations applied to graphics at times, and it would be nice if Otter had built in support for it.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #37 on: September 17, 2015, 12:21:46 PM »
* OgmoProject has a lot more utility methods now like GetValue() and GetLayerData(). If you need to check out level data before actually loading a level into a Scene this can be pretty useful.

* Added OgmoProject.RemapAsset() for when you need to assign a different path for an asset being referenced in your Ogmo projects. For example if you need to take the path of a tilemap from the ogmo project and reassign it to something else when being loaded into the game.

* Fixed a thing that I broke in SetHibox on Entities.

* Util.Clamp now supports Vector2 input and output.

* Added shortcuts to Scene methods like GetEntity<> on Entity just to make code a little bit less verbose at times.

* Added Button.LastPressed and Button.LastReleased. These are both timers that will count up since the last button press and release respectively. Pretty useful for doing input buffering type stuff, or waiting until an input has been released for some amount of time before changing state, and all that kind of stuff.

* Added GetFillRect() to NineSlice.

* Made Debugger.RegisterInstantCommand() public and added Util methods to go along with it. You can now add debug commands that can be used immediately instead of executing them at the next update. Also fixed some bugs in the debugger related to this.

* Fixed the rendering of GridCollider (it was too large by 1 pixel for each cell.)

* Added GetTileIndex() to Tilemap and GetIndex() to TileInfo.

* Texture.CopyPixels now actually works (warning: blittng operations are very slow.)

* More Collider parameter options in all of the Collide, Overlap, etc methods.

* Added Scene.GetEntitiesWith<> which is a weird way to grab a list of Entities that have a specific set of Components. This is probably very slow and should be used sparlingly, but it might be useful to some folk.

* Various small fixes and tweaks that don't really effect end users.

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Otter Updates
« Reply #38 on: December 22, 2015, 05:41:15 PM »
* Fixed a bug with rendering a BoxCollider with a width or height of 1 or 0.

* Fixed a rendering bug caused by changing the font size of a RichText object at runtime.

* Added flags for Sound and Music to check if they're currently playing audio. Sound.IsPlaying and Music.IsPlaying will be true if they're playing back audio.

* Added Color.Shade(float) which will return a color from black to white with the specified float. For example Color.Shade(0.5f) will return a gray color where 0.5f is set for red green and blue.

* Fixed a bug in Input.CharToKey() (a key was missing...)

* Fixed a bug in CollideEntities where an Entity could collide with itself.

* Added Collider.Overlap(x, y, px, py) which will do an Overlap test with a specified point (px, py) Very useful for doing UI stuff and checking for a point overlapping a collider.

* Fixed a bug with LastPressed and LastReleased timers on Button.

* Added Util.ListCombine<T>() to take a bunch of lists and combine them into one list. I don't know if this is already a C# thing so whatever.

* Added Color.FromBytes()

* Added Axis.Reset() to totally clear an Axis's input state.

* Added Button.Reset() to totally clear a Button's input state.

* Fixed a bug where Gradient wasn't blending with its Color.

* Added DataSaver.FileExists().

* Added Particle.ActiveCount but I'm not totally sure if this works as intended.

* Fixed a bug where creating a Text object would not accept an SFML.Graphics.Font.

* Added MouseDeltaX and MouseDeltaY to get the mouse movement since the last update. Mostly used for locking the mouse inside the game window.

* Util.GetFieldValue works for static fields now.

* Added Scene.CameraFocus which if set to an Entity the Scene will then follow that Entity.

* Added Rand.IntXY which returns a vector2 of ints.

* Reworked EventQueue component into EventStack and EventQueue.

* Added GraphicList which is a Graphic type that is a list of graphics.

* Added Anim.OnNewFrame() which is invoked whenever the current frame of an Anim changes. Useful for tying code to specific frames of an animation.

* Huge debugger api changes which uses attributes now instead of RegisterCommand with CommandTypes. Check out the example here to see the new style.

* Added a bunch of stuff to the Debugger like tab auto complete and parameter help when typing in a command.

* Entity.UpdatedOnce is now public (private set.)

* Scene.RemoveNextFrame(Entity) will remove an entity with a one frame delay.