Todo:
	- Don't save parent entity's transform when saving entity archetype. Only save the transformation values for children
	- Save case sensitive file names when scene entity entries
	- Disbale all player actions when scene cleared dialog or scene restart dialog are active
	- Remove excessive repitition in scene and editor code that handles multiple entity types
	- Allow switching to editor mode when game is in pause mode
	- Rendering Additions:
		- Color grading
		- Shadow mapping
		- Cube mapping for sky dome etc
	- Fix rotate gizmo's origin not being set to the selected entity
	- Sky Cube maps
	- Scrolling textures
	- Apply the selected entity's transformation when duplicating an entity that has an entity archetype
	? Write entity flags to scene file or when saving entity to file?
	? Add scene init/de-init function hashmap that maps a function that should be called when scene is loaded and unloaded. Save this to file for every scene or map functions based on the name of the scene?
	- Release mouse when window loses focus and limit fps
	? When saving a scene entity entry, save the changed properties as well, that way when the scene is loaded, we load the base properties from archetype and the ones we changed per entry are saved when we saved the entity
	  this will prevent us from having needless amount of entities with only minor changes from one another 
	? Split up material declarations into their own separate files. Materials have a base material like Blinn or Unshaded and in the file we save an instance with modified properties.
      when we are assigning materials to entites, we assign the instance of a particular material to them.
	? Change hierarchical transformations from parent/child to an entity having attachments/slots where another entity can be attached or mounted. This way we can have hierarchical transformations and not have to store
	  a whole enitity hierarchy when saving the entity. When loading the entity, we load the entity and see which entites are attached to it and get references to those entity in the scene, if they are not loaded we could 
	  either load them there and then or complain to the scene that we couldn't find the attachements and just carry on as usual
	- Add editor undo for transformation operations
	- Show current filename of the scene we are working on and whether we have made any changes to it since the last time we saved
	- Fire an event when the game mode is changed so that editor camera state and other game related systems know when to update
	- Add config file reloading and fire event that notifies potential listeners to update values from the new config file
	- Command to reload entities only
	- Change mouse behaviour to lock cursor when looking around so as not to interfere with gui elements when in editor mode
	- Resource manager that loads/unloads/reloads all types of assets and caches them when required so that we don't end up constantly loading files from disk
	- Folder management api to create/delete folders when none exist. Dirent would suffice for our simple needs?
	? Entity creator window to create new types of entities and write them
	  to disk
	- Disable editor event recievers on game mode change
	- Key binding and function to snap editor camera to selected entity
	  location
	- Key binding and function to orient entity to camera orientation
	- Mouse warp to opposite side of the window when it reaches bounds
	- Add other axis combinations like YZ and XY to transform tool
	? Transformation space selection for translation, rotation and scale.
	- Add warning to genie build script when running on windows and WindowsSdkVersion cannot be found. This happens when the script is not run from vcvarsall command prompt
	- Change the way lights are set as uniforms to remove snprintf calls per frame for every light attribute
	- Command interface that allows applying commands to selected entity like r x 30 would rotate the selected entity or entities on x axis by 30 degrees
	- Space partitioning and scene handling
	- Get editor camera speed and other settings from config file
	- Recompile Soloud on windows to use static sdl2 backend
	- Refactor input sub-system to be the same as other sub-systems embedded
	  in game state.
	- Implement storing console's scroll location and restore it when console is toggled
	- Add fallback shader
	- Implement Game States
	- Store Materials in new format supported by parser
	- Add model description file which has the same syntax supported by parser and modify old blender exporter to conform to new standards
	- Remove hardcoded numerical values from sscanf and other format strings.
	? Wrap malloc and free calls in custom functions to track usage
	? File extension checking for asset loading
	? Only allocate hashmap bucket when required
	? Add marking or queuing up custom meshes for debug render with particular transform and color for rendering bounding spheres for example
	? Interleaved vbos for meshes and changes to blender exporter accordingly
	- Enumerate and save all the uniform and attribute positions in shader when it is added and cache them in shader object?
	? Better handling incase assets folder is not found
	- Implement HiDPI support
	- Shadow maps
	- Print processor stats and machine capabilites RAM etc on every run to log.
	- Do input maps really need to be queried by thier string names?
	- Validate necessary assets at game launch
	- Gamma correctness
	- Log and debug/stats output in gui
	- Array based string type comptible with cstring(char*)
	- Reduce fps on window focus loss or minimization
	- ???
	- Profit!

Improvements:
	- Quick scene filter and entity selection by popping up a menu which has list of entities and fuzzy matches them based on the typed name
	- Filter Scene hierarchy by search using entity name
	- Show Transformation deltas for example a line showing where we are to where we are going to be if we click and apply the selected transformation
	- Make selected mesh wireframe alpha in editor configurable
	- Better naming semantics for example, init/deinit for initialization and cleanup and create/destroy when memory is allocated or deallocated
	- Categorized entity list in editor for example different subtree for lights and static meshes
	- Depth testing for editor grid
	- Improve picking and automatically improve everything in editor
	- Improve culling
	- Allow scaling on all axes at once
	- Improve grid/immediate mode drawing by switching to glDrawElements instead of glDrawArrays. 
	- Investigate why transparency is not working for materials
	- Picking for other entity types like lights etc by specifically ray casting for them or in editor switching to pick-mode that specifies if we're picking lights or meshes etc
	- Implement displaying bounding boxes as a command which should work in game mode

Bugs:
	- Better handling of wav format checking at load time
	- Fix light rotation/direction bugs
	- Fix lights type not being correctly saved/loaded from file
	- Fix bounding boxes not aligning in editor
	- Investigate memory usage increase when window is minimized
	- Fix hang on fullscreen toggle
	- Fix axis lines not aligning with grid lines
	- Fix arc angles resetting when rotating
	- Fix shader preprocessor failing when the file in //include directive is empty
	- Fix bug with blinn shader reaching maximum uniform number on mac
	- Fix delete in editor not working when the cursor is hovering over scene hierarchy window
	- Investigate memory leaks caused by nuklear or opengl related operations in gui_update
	- Fix weird rotational bug when rotation resets or inverts after 180 degrees
	- Fix crash if player's mesh is deleted in editor
	- Fix camera not rotating if the cursor overlaps any ui element
	- Fix hierarchichal transformations in the editor when the entity being transformed is a child entity of another entity
	- Fix camera frustum creation/update 
	- Fix quaternion resetting/flipping
	- Fix aggressive frustum culling when camera looks up and the object right infront of the viewer gets culled
	- Fix crash when exiting from fullscreen mode
	- Fix arc/circle direction in im_draw based functions not aligning with entity's actual current forward direction
	
Done:
	* Input
	* Shaders
	* Geometry
	* change struct usage
	* change Array implementation
	* resolve vec-types sizes
	* Transform
	* Deltatime
	* Investigate about Exit() and at_exit() functions and whether to use them or not.
	* Fix readme markdown
	* Framebuffer and resolution independent rendering
	* A simpler build system without dependencies
	* Remove dependencies
	* Remove Kazmath dependency
	* Entity
	* Find a permanent solution for build system
	* Textures
	* Camera
	* Test render
	* Fix input lag and other framerate related issues
	* Materials
	* Mesh/Model
	* Add modifiers to input maps to enable combinations for example, c-x, m-k etc
	* Heirarchical Transforms
	* Materials with textures
	* Lights!
	* Fix problems with texture units
	* Fix problems with frustrum culling
	* Gui
	* Fix mouse bugs on windows
	* Configuration/Settings load/save handling
	* Fix mousewheel bugs and gui not responding to mousewheel input
	* Setup cross compilation with mingw or stick to msvc?
	* Toggleable debug drawing for meshes
	* Font selection
	* Font atlas proper cleanup
	* In second refactor pass, use entities everywhere, no need to pass in transform and model 	separately for example since they're both part of the same entity anyway
	* Show SDL dialogbox if we cannot launch at all?
	* Writing back to config file
	* Reading from config file
	* Variant -> String conversion procedure. Use in editor for debug var slots
	* Add strings and booleans to variant types
	* Fix Key release not being reported
	* OpenAL not working in releasebuilds
	* 3d sound using OpenAL
	* Fix frustum culling bugs
	* Array-based Hashmaps
	* Fix bugs with hierarchical transformations
	* Remove reduntant "settings" structures and move all configuration stuff to config variables
	* Log output to file on every run
	* Add option to specify where to read/write files from instead of being hard-coded assets dir
	* Fix input map bugs
	* Live data views in editor
	* Camera resize on window reisze
	* Resizable framebuffers and textures
	* Support for multiple color attachments in framebuffers?
	* Better way to store and manage textures attached to framebuffers
	* Variant type
	* Editor
	* Fix frustum culling sometimes not working
	* Compile and test on windows
	* Fix mouse bugs
	* Fix issues with opengl context showing 2.1 only
	* Improve this readme
	* Replace orgfile with simple text readme and reduce duplication
	* Fix camera acting all weird when right click is held
	* Fix README to conform with markdown syntax
	* Added video driver selection to make game launch under wayland or x11 on linux.
	* Separate game code into a dynamical library that can be reloaded at runtime.
	* Move game, common and game library related code into separate folders.
	* Fixed game crashing on exit after game library has been reloaded more than once.
	* Made game compile and run under windows with visual studio 2017 using GENie
	* Implemented file copy and file delete on windows and linux.
	* Implemented a work-around for dll locking on windows by creating a copy of the game lib at launch and when reloading,
	  unloading the current dll, deleting it and creating new copy of the updated dll and loading that
	* Added file copy and delete to platform api
	* Made dll reloading workaround compatilble on linux
	* Default keybindings as fallback
	* Implemented writing scene to file
	* Fixed space not being added after light entities are written to file by adding missing new-line
	* Fixed error caused by the way eof was checked in scene file 	
	* Camera fbo params are now written to file when entity is saved
	* Fixed several bugs with entity loading
	* Removed duplicate parsing logic
	* Fixed bugs in stripping key name for input map
	* Modify entity loading logic to use the new parsing code by parsing all entity properties into a hashmap first then recreating entity from that
	* Implmented writing to file through the new Parser and Parser_Objects
	* Changed Config to read/write using new Parser and Parser_Objects
	* Implemented Reading/Writing keybindings using new parser object
	* Replaced OpenAL with Soloud with SDL2 backend
	* Implemented sound/listener loading from scene file
	* Finished loading scene from file
	* Initial implementation of immediate-mode batched sprite render
	* Fixed bugs with shader include file pre-processor
	* Fixed bugs with editor's camera property viewer
	* Fixed bugs related to changing camera projection
	* Fixed bugs with sprite batch renderer not working with projection matrix
	* Fixed broken orthographic camera
	* Implement necessary changes to run Soloud on linux
	* Moved third party libs/include directories into root/lib and root/include. Put common includes like header-only libs into root/include/common and others which require platform specific stuff into root/include/linux etc.
	* Got rid of pkg-confg and system-installed SDL2 dependancy on linux and instead put custom compiled SDL libs in libs folder similar to how we're handling it in windows
	* Proper physics time-step and speed
	* Proper handling of rigidbody associated with an entity and notifying it of movement or collision
	* Added physics spheres and other primitive shapes
	* Separated collision shape and rigidbody
	* Implemented Getting/Modifying primitive physics shapes' values like length, radius etc
	* Update physics if entity position/rotation/scale etc are changed
	* Implemented Physics raycasting
	* Implemented immediate mode renderer that can draw arbitrary points, lines and triangles
	* Converted IM_Vertex array to only be used as temporary storage for vertices between begin and end calls
	* Implemented Debug physics mesh drawing for box and sphere primitives
	* Completed Phase 1 of codebase refactoring
	* Improved editor camera handling
	* Re-implemented showing all the entities in the editor
	* Player init, update, visual representation and movement
	* Switching between editor and game mode/cameras
	* In-game basis for scrollable console/log-viewer
	* Console log output
	* Console error/warning output
	* Implemented Auto scrolling to the bottom in console
	* Implemented screen coordinate to ray conversion and ray-sphere collision
	* Split todo and readme into two files
	* Replace all renderer_check_gl calls with GL_CHECK macro
	* Fixed Console bug when enabled in editor mode
	* Migrated from bitbucket to github and from mercurial back to git
	* Removed the game executable and game library split.
	* Event Subsystem
	* Fixed mouse button press/release behaviour by using event callbacks for editor mouse picking
	* Ray picking for editor
	* Highlight entity selected in editor in a specific color
	* Implemented showing a placeholder when an entity other than a static mesh is selected
	* Prevented ray casting when clicking on editor window and buttons
	* Implemented handling drawing other entity types that can be selected in the editor but are not static meshes
	* Implemented proper topbar
	* Changed config vars are used.
	* Changed all usages of bool types and nuklear causing buggy behaviour in editor code by using int instead of bool or by using variants of the functions that do take int as parameter instead of int*
	* Added Grid to editor
	* Added Editor settings window and grid configuration to editor settings window
	* Specific rendering mode for editor related rendering	
	* Editor modes for Transform, Rotate, Scale that operate similar to vim or blender.
	  Modes can be toggled by hotkeys and the operation will be applied to the selected object.
	  By default, we work on the ground axis i.e the xz plane and when we have alt pressed, we work in the vertical or y axis.
	* Move plane creation into its own function 
	* De-select object on escape key in editor
	* Vertical translation in translate mode
	* Axis selection/cycling
	* Axis switching and returning back to previously selected axis after releasing alt in translate mode
	* Display tool/cursor location in editor statusbar
	* Displaying camera position and tool transformation space in top bar
	* Display editor camera parameter adjustment in top bar
	* Display Transform mode selection in top bar
	* Display Axis selection in top bar
	* Immediate mode render order, drawing axis and helpers on top of grid
	* Draw coloured axes lines at world origin or grid origin
	* Make axis lines always follow the same colour scheme for consistency across all tools, red for X axis, green for Y axis and blue for Z axis
	* Toggle between relative and static grid i.e, grid that moves along with the selected object or grid that remains stationary at the origin
	* Implement circle drawing with immediate mode renderer
	* Implement arc drawing with renderer
	* Impement im_filled_circle
	* Draw rotation gizmo using filled circles to better reflect the underlying logic
	* Handle negative values in im_arc
	* Rotate mode tool widget
	* Complete rotate mode
	* Implement arc values greater than 360 or -360
	* Rotation degree snapping
	* Reset mouse cursor position to the center of the screen in editor mode after the right click is released
	* Remove fixed editor windows locations and bring back floating windows
	* Only show rotation gizmo for one axis at a time
	* Cancel tool action when right click is pressed in between
	* Rotate mesh along mouse movement or show what the rotation is going to look like by using a wireframe version of mesh when rotating
	* Match amount to be rotate with actual axes and the gizmo arc being drawn
	* Handle all other axes combinations
	* Fixed issue with picking not working when the other entity is inside
	  rotation radius
	* Removed all usages of tool_mesh_position 
	* Renamed editor modes to editor tools to make the code more
	  consistent
	* Implemented reverting back to previously selected axis when not
	  moving the camera any more and rotate tool is selected.
	* Scale Mode
	* Highlight if we are about to select an entity or perform the tool action like translate when mouse is hovered and an entity can be selected at that location
	* Display the projected position if we perform the action for example display what the new location would be right next to the tool mesh
	* Tooltips for current action or hovered entity
	* Fix broken spot light degree/radian conversions
	* Fix rotation arc starting and ending degree calculations
	* Fix releasing ALT in translate tool not reverting back to previous
	  axis
	* Disabled editor functionalites when console is toggled
	* Entity to file read/write
	* Added editor shortcut key to delete selected entity
	* Console command to read/write entity to file and add it to scene
	* Fix editor camera right-click behaviour
	* Moved #version definition from shaders to c code for easier control
	* Moved MAX_LIGHTS shader definition from inside the shader to be dynamically defined and added to the shader code when it is compiled 
      to reduce inconsistencies
	* Fixed symlink issue in genie for macos which interferes with fopen operations
	* Implement/Fix copying libraries to executable folder after build completes on mac os
	* Fixed all sound related bugs and completede sound to/from file
	* Implemented saving/loading entity children when reading/writing entity to file  
	* Editor functionality to add entity from specific file to scene
	* Finished mesh and material properties serialization to and from file 
	* Fixed issue of partial matches returning incorrect hashmap values
	* Implemented Static Mesh property viewing/editing in editor
	* Implemented contextual menu for re-entering diffuse texture name 
	* Implemented contextual menus for entering geometry and sound source names
	* Implemented entities storing a reference or name of file they've been loaded from to help when they're being saved
	* Scene read/write to file with scene file only containing names of
	  entity archetypes
	* Console command to read/write scene to/from file
	* Implemented flags that specify whether an entity should be written to file or not for example to avoid writing cameras and player to file
	* In editor, only show entities with specific flags
	* Fixed bugs with meshes being registered to uninitialized materials and not rendering
	* Added EF_SKIP_RENDER flag to allow entites to skip rendering
	* Save default entity archetype to be loaded when there is not other archetype or in case of an error as fallback
	* Ensure cameras are not initialized multiple times
	* Fixed cameras not resizing to current resolution when scene is loaded/reloaded
	* Added parameter to entity_load command that renames the newly loaded object to whatever the second specified parameter is
	* Implment/Test reading/writing scene that has a mixture of default entites and entity archetypes
	* Add simple player fps controls 
	* Fixed gimbal lock in fps camera by fixing the order of quaternion multiplication when getting absolute rotation
	* Fix hierarchical transforms not working in editor mode
	* Better, slightly accurate picking
	* Removed flickering from selection in editor
	* Debug Vars viewbale from game and editor
	* Console Command to display debug vars
	* Console command to set the location of debug vars location
	* Brought back debug variable display in editor and allow showing colours, textures etc
	* Shortcut key to toggle debug variable display and cycle locations
	* Move debug vars display settings to debug_vars struct
	* Command history in console
	* Added button to reset local transformations for selected entity in property inspector
	* Implmented renaming scene objects in editor
	* Implemented setting/resetting parent entity for entity
	* Editor functionality to read/write scene to/from file
	* Display the name of the hovered entity either as a tooltip under the cursor of in the top/bottom status bar
	* Debug drawing/variable display that also works in game mode. Can be toggled with a console command. Can show variable values or plots thier graphs or debug textures etc
	* Console command history
	* Console command help
	* Use actual selected entity's mesh for tool mesh when the entity already has a mesh and use a placeholder like a sphere when there is not mesh 
	* Implmented dialog for loading entities into the scene via editor
	* Implement behaviour that avoids writing normal entities that do not have children or parent to file to avoid inconsistencies when loading them
	* Implelement contextual actions for entites that are shown in scene hierarchy
	* For entities that have archetypes, check read/write them to the file they were loaded from when showing the save entity dialog
	* Duplicate with Ctrl-D
	* Display default mesh when selected entity type in editor does not have a mesh
	* Associate each scene with a file so that when C-s is pressed the scene is automatically saved to that file
	* Change the increments in the editor from 5 to 1
	* Separate entity types in entity hierarchy view by the entity type or use a tree view to show parent/child relation or use different colours for different entity types
	* Show archetype name in property inspector for selected entity
	* Write player camera clear colour when saving scene
	* Add uv tiling parameter to materials that can be serialized along with entities
	* Implement resetting complete transform or just rotation, translation
	  or scale for selected entity
	* Save transformation information when saving entity archetypes
	* Implement bounding box visualization
	* Fixed rotation gizmo for scaled meshes
	* Implemented ray-bounding box picking and determine whether that is enough for our needs or do we need to implement OBB
	* Implemented base and derived bounding boxes for all entity types
	* Imlpemented picking entities of all types in editor
	* Figure out the revision number and branching situation
	* Add links to Itch.io builds of the game in readme and on the blog. Add link to blog in the readme as well 
	* Show version number in editor and console
	* Save/Load base bounding boxes for entity types other than static mesh
	* Disabled picking when a tool is active in editor
	* Simplified rendering further and removed unnecessary intermediate fbos
	* We no longer keep geoemtry data loaded from files as it is not needed after data is passed on to opengl
	* Shift-A to add entity to scene
	* Fixed crash where if an entity is hoverd in editor and deleted, the game crashes because the hovered variable in editor doesn't know that the entity was deleted
	* Improve player collision by impelenting sliding along collision plane in case of collision
	* Brought back sprinting by fixing a bug where player movement related variables were written to file as floats but read back as ints
	* Move player movement related variables from function to player struct and load them from config file
	* Screen mouse coordinates to world-coordinates for aiming
	* Sound source entity functions that automatically track if handles are valid and create/update as necessary
	* Apply sound source properties to source instance whenever a new instance is created
	* Imlemented reading/writing enemy mesh and weapon sound to file and resetting it in code
	* Implemented on_load and on_update callbacks for enemies. Different enemy types have different callbacks that are assigned when they are created.
	* Added Scene reload command
	* Introduced fixed time step interval which can be configured and be used for movement and other physics related updates
	* Made movement framerate independent
	* Implement turret state machine
	* Fix Turret losing target at diagonals
	* Add turret properties to property inspector
	* Add another ambient sound_source entity as child to enemy entity
	* Add all sound source properties to propery inspector
	* Implement Triggers
	* Fix crash where if entity selected in editor is deleted in game mode and then returning to editor mode causes a crash
	* Add "Select Parent" button to property inspector
	* Remove ODE completely
	* Fixed console not working in game mode
	* Pause sound when game is in pause mode
	* Composite door entity made up of static mesh, sound entity and trigger. Door might require 0-3 keys in order to be opened.
	* Add door properties to property inspector in editor
	* Switched transformation in property inspector to show/modify local transform values by default and show absolute transform values as read-only.
	* Doors that open using the red/green/blue keys only as a way of progressing the level or cordoing off certain sections
	* Implemented player footstep sounds for walking, running and jumping
	* Player jump cooldown, don't allow jump until a certian time interval has passed, even if we're grounded
	* RGB keys to progress to next level
	* Visual indicator on doors corresponding to their key masks
	* Audio cues when player does not have the right key combination to open a particular door
	* Added saving scene init/cleanup funcs if there are any assigned when saving scene
	* Win/fail States
	* In-Game Gui
	* Pickups
	* Pickup sounds
	* Implemented flag for ignoring collisions with certain entities
	* Background music track per scene specified in scene properties
	* Fixed bug where child entities' absolute position does not change when parent rotates
	* Player weapon mesh and lighting
	* Added muzzle mesh to player
	* Add weapon flash, muzzle mesh to turrets
	* Enemies getting hit by bullets
	* Fixed crash when default entity type is loaded from file
	* Memory utils that provide allocation tracking
	* Game End
	* Save NONE when next_scene is not set and the scene is being saved
	* Add player start entity that specifies where the player must start at the beginning of every level
	* Fixed memory leak
	* Fixed frustum culling on player camera