]> git.tdb.fi Git - libs/game.git/log
libs/game.git
7 months agoUse the auto type to hold the result of dynamic_handle_cast
Mikko Rasa [Thu, 6 Mar 2025 13:10:07 +0000 (15:10 +0200)]
Use the auto type to hold the result of dynamic_handle_cast

It's clear enough what the type will be so no need to repeat it.

7 months agoPut simple constructor definitions in headers
Mikko Rasa [Thu, 6 Mar 2025 13:09:04 +0000 (15:09 +0200)]
Put simple constructor definitions in headers

8 months agoRework virtual reality initialization
Mikko Rasa [Wed, 12 Feb 2025 16:48:12 +0000 (18:48 +0200)]
Rework virtual reality initialization

VR mode must now be requested when creating the Application object,
because it may need to interact with graphics initialization.

8 months agoFix .gitignore
Mikko Rasa [Fri, 31 Jan 2025 21:01:31 +0000 (23:01 +0200)]
Fix .gitignore

8 months agoUse the aligned form of operator delete
Mikko Rasa [Fri, 31 Jan 2025 21:00:34 +0000 (23:00 +0200)]
Use the aligned form of operator delete

By the language spec the form of new and delete must match

8 months agoClean up MeshRenderer when DynamicMeshSource is destroyed
Mikko Rasa [Fri, 31 Jan 2025 21:00:08 +0000 (23:00 +0200)]
Clean up MeshRenderer when DynamicMeshSource is destroyed

8 months agoAdd some missing VR calls
Mikko Rasa [Fri, 31 Jan 2025 20:59:45 +0000 (22:59 +0200)]
Add some missing VR calls

8 months agoRewrite the VR code to match changes in mspvr
Mikko Rasa [Thu, 30 Jan 2025 17:34:22 +0000 (19:34 +0200)]
Rewrite the VR code to match changes in mspvr

There now needs to be an entity tagged with a TrackingAnchor component
to designate the location of the tracking area within the game world.
A player character entity or something closely related should generally
be suitable.

8 months agoAdjust to different way of accessing VR::MotionController type constant
Mikko Rasa [Sun, 26 Jan 2025 23:21:17 +0000 (01:21 +0200)]
Adjust to different way of accessing VR::MotionController type constant

8 months agoExport TransformValues in the API
Mikko Rasa [Sun, 26 Jan 2025 20:49:01 +0000 (22:49 +0200)]
Export TransformValues in the API

8 months agoAdd missing includes
Mikko Rasa [Sun, 26 Jan 2025 20:48:19 +0000 (22:48 +0200)]
Add missing includes

8 months agoUse different allocation functions for pools
Mikko Rasa [Sun, 26 Jan 2025 20:47:12 +0000 (22:47 +0200)]
Use different allocation functions for pools

It appears using alignas with new is a gcc extension.

8 months agoExplicitly declare special members of certain classes
Mikko Rasa [Sun, 26 Jan 2025 20:43:06 +0000 (22:43 +0200)]
Explicitly declare special members of certain classes

MSVC tries to generate them for DLL export and that fails because of
vectors of unique pointers.

8 months agoAdjust for changes in mspnet
Mikko Rasa [Sun, 26 Jan 2025 18:43:41 +0000 (20:43 +0200)]
Adjust for changes in mspnet

8 months agoHide thread-local data behind accessor functions
Mikko Rasa [Sun, 26 Jan 2025 20:42:00 +0000 (22:42 +0200)]
Hide thread-local data behind accessor functions

MSVC doesn't like them as static members of classes with DLL interface.

8 months agoAdd a component for creating meshes via geometry definitions
Mikko Rasa [Sun, 26 Jan 2025 16:33:10 +0000 (18:33 +0200)]
Add a component for creating meshes via geometry definitions

8 months agoAdd a missing include and forward declaration
Mikko Rasa [Sun, 26 Jan 2025 16:27:37 +0000 (18:27 +0200)]
Add a missing include and forward declaration

8 months agoAdd virtual reality support
Mikko Rasa [Sun, 26 Jan 2025 16:26:37 +0000 (18:26 +0200)]
Add virtual reality support

8 months agoRework the relationship between renderers and the view
Mikko Rasa [Sun, 26 Jan 2025 16:20:03 +0000 (18:20 +0200)]
Rework the relationship between renderers and the view

A renderer can't just associate itself with the view in its constructor
since stages may get activated multiple times during the application's
lifetime and the renderer for each stage is only created the first time.

8 months agoInclude the input device in the LocalPlayerArrived event
Mikko Rasa [Sun, 26 Jan 2025 15:16:30 +0000 (17:16 +0200)]
Include the input device in the LocalPlayerArrived event

8 months agoAdd factory function from a matrix to TransformValues
Mikko Rasa [Sun, 26 Jan 2025 15:14:15 +0000 (17:14 +0200)]
Add factory function from a matrix to TransformValues

8 months agoRemove more unnecessary uses of std::ref
Mikko Rasa [Sun, 19 Jan 2025 10:08:33 +0000 (12:08 +0200)]
Remove more unnecessary uses of std::ref

These didn't get caught the last time since they lacked the namespace
prefix.

20 months agoAdd polymorphism discovery for systems
Mikko Rasa [Sat, 27 Jan 2024 09:19:54 +0000 (11:19 +0200)]
Add polymorphism discovery for systems

20 months agoCheck bases of intermediate base classes
Mikko Rasa [Sat, 27 Jan 2024 09:13:55 +0000 (11:13 +0200)]
Check bases of intermediate base classes

Without this iterating objects of such an intermediate base type does
not work.

20 months agoAllow reflection to detect polymorphic bases from a type alias
Mikko Rasa [Sat, 27 Jan 2024 08:59:11 +0000 (10:59 +0200)]
Allow reflection to detect polymorphic bases from a type alias

20 months agoImplement queueing for remote calls
Mikko Rasa [Sun, 21 Jan 2024 18:10:50 +0000 (20:10 +0200)]
Implement queueing for remote calls

This allows received calls to be dispatched in a controlled order during
a frame.

20 months agoConsolidate the remote call classes
Mikko Rasa [Sun, 21 Jan 2024 17:47:16 +0000 (19:47 +0200)]
Consolidate the remote call classes

Global and entity calls are now declared using the same class.  If the
entity type is void (the default), the call is global.

21 months agoAdjust network code for changes in the mspnet library
Mikko Rasa [Tue, 16 Jan 2024 21:15:35 +0000 (23:15 +0200)]
Adjust network code for changes in the mspnet library

21 months agoUse iterate_objects in Renderer::tick
Mikko Rasa [Sat, 13 Jan 2024 12:51:53 +0000 (14:51 +0200)]
Use iterate_objects in Renderer::tick

21 months agoCosmetic changes
Mikko Rasa [Sat, 13 Jan 2024 12:50:56 +0000 (14:50 +0200)]
Cosmetic changes

21 months agoCheck that clients only do calls on entities they possess
Mikko Rasa [Sat, 13 Jan 2024 12:30:05 +0000 (14:30 +0200)]
Check that clients only do calls on entities they possess

21 months agoMove an include to where it's actually needed
Mikko Rasa [Sat, 13 Jan 2024 12:10:40 +0000 (14:10 +0200)]
Move an include to where it's actually needed

21 months agoAdd some network state checks
Mikko Rasa [Sat, 13 Jan 2024 12:09:18 +0000 (14:09 +0200)]
Add some network state checks

21 months agoDon't filter by target players when sending from a client
Mikko Rasa [Sat, 13 Jan 2024 12:08:24 +0000 (14:08 +0200)]
Don't filter by target players when sending from a client

21 months agoRequire entity packets to have an entity_id field of correct type
Mikko Rasa [Sat, 13 Jan 2024 10:11:43 +0000 (12:11 +0200)]
Require entity packets to have an entity_id field of correct type

21 months agoAllow a custom protocol to be set for Replicator
Mikko Rasa [Thu, 11 Jan 2024 22:01:56 +0000 (00:01 +0200)]
Allow a custom protocol to be set for Replicator

It needs to derive from StageProtocol, which is now exported from the
library.

21 months agoFix an incorrect argument to key_error
Mikko Rasa [Thu, 11 Jan 2024 22:00:22 +0000 (00:00 +0200)]
Fix an incorrect argument to key_error

21 months agoAdd more kinds of remote calls
Mikko Rasa [Thu, 11 Jan 2024 21:53:34 +0000 (23:53 +0200)]
Add more kinds of remote calls

21 months agoAvoid sending a packet to the same connection more than once
Mikko Rasa [Thu, 11 Jan 2024 21:15:25 +0000 (23:15 +0200)]
Avoid sending a packet to the same connection more than once

To keep things efficient, player IDs are now stored as 32-bit quantities,
with the high 16 bits containing an ID for the client connection.  Only
the lower 16 bits are transmitted on the network to avoid leaking
information on which players share the same connection.

21 months agoStreamline the send functions in Replicator a bit
Mikko Rasa [Thu, 11 Jan 2024 20:55:17 +0000 (22:55 +0200)]
Streamline the send functions in Replicator a bit

Calling the targeted send function with a target of zero will now forward
to the broadcast function, avoiding the need to branch at call sites.

21 months agoTrack the sender of the current packet
Mikko Rasa [Thu, 11 Jan 2024 17:11:25 +0000 (19:11 +0200)]
Track the sender of the current packet

21 months agoAdd facilities to designate entities as player-controlled
Mikko Rasa [Tue, 9 Jan 2024 21:49:59 +0000 (23:49 +0200)]
Add facilities to designate entities as player-controlled

21 months agoFix errors revealed by gcc 13
Mikko Rasa [Sat, 30 Dec 2023 11:00:49 +0000 (13:00 +0200)]
Fix errors revealed by gcc 13

2 years agoRework Landscape to support replication
Mikko Rasa [Sat, 17 Jun 2023 22:09:30 +0000 (01:09 +0300)]
Rework Landscape to support replication

2 years agoAdd a dynamic cast function for Owned
Mikko Rasa [Sat, 17 Jun 2023 21:58:32 +0000 (00:58 +0300)]
Add a dynamic cast function for Owned

2 years agoAdd a callback when an entity is spawned over the network
Mikko Rasa [Sat, 17 Jun 2023 21:54:38 +0000 (00:54 +0300)]
Add a callback when an entity is spawned over the network

It can be used by the owner of the spawner to send additional packets
to initialize the entity.

2 years agoAdd a mechanism for replicating function calls to clients
Mikko Rasa [Sat, 17 Jun 2023 21:53:36 +0000 (00:53 +0300)]
Add a mechanism for replicating function calls to clients

2 years agoSupport custom lookup functions for retrieving setups in Spawner
Mikko Rasa [Sat, 17 Jun 2023 21:40:21 +0000 (00:40 +0300)]
Support custom lookup functions for retrieving setups in Spawner

2 years agoGive IDs to entities replicated over the network
Mikko Rasa [Sat, 17 Jun 2023 21:31:16 +0000 (00:31 +0300)]
Give IDs to entities replicated over the network

2 years agoOnly send spawns to the target players of the replicator
Mikko Rasa [Sat, 17 Jun 2023 21:03:54 +0000 (00:03 +0300)]
Only send spawns to the target players of the replicator

2 years agoSend spawns of newly-created entities in deferred_tick
Mikko Rasa [Sat, 17 Jun 2023 21:02:40 +0000 (00:02 +0300)]
Send spawns of newly-created entities in deferred_tick

Spawn info won't have been set in the component_create event for the
zygote.

2 years agoAdd a mechanism for spawning entities over the network
Mikko Rasa [Sun, 11 Jun 2023 19:22:34 +0000 (22:22 +0300)]
Add a mechanism for spawning entities over the network

2 years agoAdd interfaces for using Networking from the outside
Mikko Rasa [Sun, 11 Jun 2023 14:55:31 +0000 (17:55 +0300)]
Add interfaces for using Networking from the outside

2 years agoEmit events when the other side of a network connection changes stages
Mikko Rasa [Sun, 11 Jun 2023 14:03:11 +0000 (17:03 +0300)]
Emit events when the other side of a network connection changes stages

2 years agoRename Networking::next_id to next_player_id
Mikko Rasa [Sun, 11 Jun 2023 13:22:14 +0000 (16:22 +0300)]
Rename Networking::next_id to next_player_id

2 years agoUse Networking::set_state in start_server and connect_to_server
Mikko Rasa [Sun, 11 Jun 2023 13:21:12 +0000 (16:21 +0300)]
Use Networking::set_state in start_server and connect_to_server

This gets the event appropriately emitted.

2 years agoAdd string interning to the network protocol
Mikko Rasa [Sun, 11 Jun 2023 12:42:25 +0000 (15:42 +0300)]
Add string interning to the network protocol

This allows transmitting commonly used strings using short IDs.

2 years agoIdentify stages with a name
Mikko Rasa [Thu, 8 Jun 2023 08:29:07 +0000 (11:29 +0300)]
Identify stages with a name

2 years agoRemove unnecessary std::ref invocations
Mikko Rasa [Thu, 8 Jun 2023 08:26:48 +0000 (11:26 +0300)]
Remove unnecessary std::ref invocations

I got confused by the std::thread constructor, which stores its arguments
in a tuple and creates copies without std::ref.  It's not needed in these
cases since the arguments are just forwarded directly.

2 years agoPlace Networking after event things in Director
Mikko Rasa [Thu, 8 Jun 2023 08:21:08 +0000 (11:21 +0300)]
Place Networking after event things in Director

It uses the event bus, so correct order of destruction must be ensured.

2 years agoRename some events for clarity and consistency
Mikko Rasa [Thu, 8 Jun 2023 08:04:12 +0000 (11:04 +0300)]
Rename some events for clarity and consistency

2 years agoSupport adding prop entities to Landscape
Mikko Rasa [Fri, 19 May 2023 20:38:10 +0000 (23:38 +0300)]
Support adding prop entities to Landscape

2 years agoAdd support for shadows
Mikko Rasa [Mon, 15 May 2023 20:44:38 +0000 (23:44 +0300)]
Add support for shadows

2 years agoTrack destruction of individual components in Renderer
Mikko Rasa [Mon, 15 May 2023 20:38:04 +0000 (23:38 +0300)]
Track destruction of individual components in Renderer

2 years agoAllow clearing an Owned by assigning nullptr
Mikko Rasa [Mon, 15 May 2023 20:38:13 +0000 (23:38 +0300)]
Allow clearing an Owned by assigning nullptr

2 years agoMake Owned friendly to other template specializations
Mikko Rasa [Sun, 7 May 2023 17:34:26 +0000 (20:34 +0300)]
Make Owned friendly to other template specializations

2 years agoMake iterate_objects const
Mikko Rasa [Sun, 7 May 2023 17:32:43 +0000 (20:32 +0300)]
Make iterate_objects const

2 years agoChain certain pool operations to pools of derived objects
Mikko Rasa [Sun, 7 May 2023 17:32:02 +0000 (20:32 +0300)]
Chain certain pool operations to pools of derived objects

2 years agoKeep track of object pools for derived types
Mikko Rasa [Sun, 7 May 2023 15:07:41 +0000 (18:07 +0300)]
Keep track of object pools for derived types

2 years agoMake the destructor of PoolBase virtual
Mikko Rasa [Sun, 7 May 2023 12:54:30 +0000 (15:54 +0300)]
Make the destructor of PoolBase virtual

2 years agoMake pools non-movable
Mikko Rasa [Sun, 7 May 2023 12:53:07 +0000 (15:53 +0300)]
Make pools non-movable

I'm not actually using move semantics for them and they're of dubious
value due to polymorphism anyway.

2 years agoAdd a generation number to Reflector
Mikko Rasa [Sun, 7 May 2023 12:27:46 +0000 (15:27 +0300)]
Add a generation number to Reflector

2 years agoInclude generated headers from the installed location
Mikko Rasa [Sun, 7 May 2023 11:17:56 +0000 (14:17 +0300)]
Include generated headers from the installed location

2 years agoAdd game setup imports as transitive dependencies
Mikko Rasa [Sun, 12 Mar 2023 15:14:13 +0000 (17:14 +0200)]
Add game setup imports as transitive dependencies

2 years agoUpdate location of generated source files
Mikko Rasa [Sun, 12 Mar 2023 15:14:01 +0000 (17:14 +0200)]
Update location of generated source files

2 years agoAdd components and systems for creating terrains
Mikko Rasa [Sat, 11 Feb 2023 13:56:06 +0000 (15:56 +0200)]
Add components and systems for creating terrains

2 years agoMake Presenter store pointers to systems, not just renderers
Mikko Rasa [Sat, 11 Feb 2023 13:19:00 +0000 (15:19 +0200)]
Make Presenter store pointers to systems, not just renderers

2 years agoAdd a component for using dynamic meshes in entities
Mikko Rasa [Sat, 11 Feb 2023 13:18:20 +0000 (15:18 +0200)]
Add a component for using dynamic meshes in entities

2 years agoAdjust Bassteroids for the lighting changes
Mikko Rasa [Sat, 28 Jan 2023 20:54:12 +0000 (22:54 +0200)]
Adjust Bassteroids for the lighting changes

2 years agoCreate the rendering sequence dynamically
Mikko Rasa [Sat, 28 Jan 2023 19:59:09 +0000 (21:59 +0200)]
Create the rendering sequence dynamically

Sequence templates are a bit too rigid for games where it's desirable to
tune many different graphics quality settings independently.

2 years agoAdd components for creating lights
Mikko Rasa [Sat, 28 Jan 2023 14:28:47 +0000 (16:28 +0200)]
Add components for creating lights

2 years agoFurther refactor Renderer and MeshRenderer
Mikko Rasa [Sat, 28 Jan 2023 12:38:59 +0000 (14:38 +0200)]
Further refactor Renderer and MeshRenderer

The ObjectInstance is now hidden inside MeshRenderer and RAII is used to
remove it from the scene.  This limits the instance to being in only a
single scene, but I don't think that will be an issue.

2 years agoAdd a transform propagator to stages by default
Mikko Rasa [Tue, 24 Jan 2023 13:01:17 +0000 (15:01 +0200)]
Add a transform propagator to stages by default

This is possible now that system dependencies have been implemented.

2 years agoRefactor Renderer to pick up components instead of entities
Mikko Rasa [Sat, 21 Jan 2023 18:44:36 +0000 (20:44 +0200)]
Refactor Renderer to pick up components instead of entities

This makes more sense since there isn't an entity class which always
contains a MeshSource.

2 years agoHave MeshRenderer's constructor take a GL::Object
Mikko Rasa [Sat, 21 Jan 2023 18:39:20 +0000 (20:39 +0200)]
Have MeshRenderer's constructor take a GL::Object

2 years agoUndefine the API macro at the end of a setup header
Mikko Rasa [Sat, 21 Jan 2023 18:31:25 +0000 (20:31 +0200)]
Undefine the API macro at the end of a setup header

Otherwise it may interfere with other setup headers.

2 years agoAdd basic networking infrastructure
Mikko Rasa [Tue, 17 Jan 2023 07:52:25 +0000 (09:52 +0200)]
Add basic networking infrastructure

Currently it only allows running a server, connecting to it and creating
players, but no synchronization yet.

2 years agoDerive GameSetupDefinitions from TemplateFile instead of SourceFile
Mikko Rasa [Mon, 9 Jan 2023 09:27:16 +0000 (11:27 +0200)]
Derive GameSetupDefinitions from TemplateFile instead of SourceFile

Builder's InstallMap checks for that class to figure out the install
locations for generated headers.

2 years agoUpdate .gitignore files
Mikko Rasa [Sun, 8 Jan 2023 22:34:29 +0000 (00:34 +0200)]
Update .gitignore files

This includes pre-emptive changes for Windows build products.

2 years agoLoad the various setups through resources
Mikko Rasa [Sun, 8 Jan 2023 22:33:29 +0000 (00:33 +0200)]
Load the various setups through resources

2 years agoAdd dependency to mspmath in Bassteroids
Mikko Rasa [Sun, 8 Jan 2023 13:11:42 +0000 (15:11 +0200)]
Add dependency to mspmath in Bassteroids

2 years agoUse the setup generator to create setup structs
Mikko Rasa [Sun, 8 Jan 2023 13:08:08 +0000 (15:08 +0200)]
Use the setup generator to create setup structs

2 years agoSupport API decorations for setups
Mikko Rasa [Sun, 8 Jan 2023 13:01:17 +0000 (15:01 +0200)]
Support API decorations for setups

2 years agoPrefix C++ types with namespaces in the setup generator
Mikko Rasa [Sun, 8 Jan 2023 12:55:14 +0000 (14:55 +0200)]
Prefix C++ types with namespaces in the setup generator

2 years agoAdd import functionality for setup modules
Mikko Rasa [Sun, 8 Jan 2023 12:53:07 +0000 (14:53 +0200)]
Add import functionality for setup modules

Also install setup definition files so definitions from libraries can be
used.

2 years agoRefactor the setup generator to store types in modules
Mikko Rasa [Sun, 8 Jan 2023 12:50:45 +0000 (14:50 +0200)]
Refactor the setup generator to store types in modules

2 years agoCreate a builder plugin for the setup generator tool
Mikko Rasa [Sat, 7 Jan 2023 13:25:13 +0000 (15:25 +0200)]
Create a builder plugin for the setup generator tool

2 years agoRemove a temporary hack
Mikko Rasa [Sat, 7 Jan 2023 13:24:25 +0000 (15:24 +0200)]
Remove a temporary hack

The bug it was for is now fixed.

2 years agoAdd an include which is now necessary
Mikko Rasa [Sat, 7 Jan 2023 13:23:11 +0000 (15:23 +0200)]
Add an include which is now necessary

Changes in the Variant class require classes retrieved from a collection
to be fully defined.

2 years agoDecorate things which constitute the public API of the library
Mikko Rasa [Sat, 7 Jan 2023 13:19:47 +0000 (15:19 +0200)]
Decorate things which constitute the public API of the library