cyanskies / hades Goto Github PK
View Code? Open in Web Editor NEWA 2d game framework
A 2d game framework
add support for scripted components and systems. these will be running in angelscript.
they should be able to be specified by manifest.
Change the input loop to skip input if the GUI used any of the input events?
ability to command a sprite to load an animation, with a fallback default animation.
an animation contains the texture reference it needs, plus all the data needed for that animation,
these are loaded from yaml
animation:
player_jumps:
texture: texture_id
length: how long the animation should last in game time
frames: [each frame is a set of 4 coordinates + a relative frame time]
This causes 500ms waits even when no joystick is being used. newer version of SFML fixes this.
See: https://github.com/SFML/SFML/pull/1195/files
this will allow the workers to sleep in-between job batches.
Load unloaded resources the first time they're requested with get<>()
yaml dependencies need to be checked before they can be assumed
Seek won't necessarily work for example.
currently applied to mod paths when loaded, should be applied to all file activities, in as_raw.
the result is that debug paths are erroneously applied to usercustomdirectories like %documents%.
includes a few simple terrain generators:
also includes functions for drawing terrain straight onto vertex arrays without a tile map:
either wait for sfml to support this directly or add the following features.
need to catch invalid_argument and out_of_range from std::stoi
This should handle cleaning passing input to game states, states register actions(like MOVE) and receive them along with context(joystick number and state, or key state). This should be exposed to the console for macro rebinding and needs to be saveable/restorable and exposed to be edited easily in game menus as well.
a sprite batching system, needs to manage different groups of textures/sprites and support automatically moving a sprite between batches, if it's animation isn't on a single texture. with some form of key for accessing the sprite.
Probably should be thread safe as well. as it would be modified by the client controllers.
We'll need to add TGUI loaders for image, texture and font types, so that tgui themes will work correctly with the data manager.
Support a hard-coded file/name manifest.
files added to the manifest by the engine are in the /common directory
files named in the C++ manifest are expected to be in the root /game directory
files in the scripted manifest are expected to be in the same folder as the manifest file
example
define the manifest.
all files will be loaded and kept in memory after this point
in main() { //it is a total failure for a manifested file to be missing resource.addtxture("texture_tank", "filename"); }
before the game starts, assign all the files from the manifest global names, so they can be referred too.
scripted manifest item will have global names generated.
struct textures { //manifested files are read only const texture tank = resource.texture("texture_tank"); }
manifests should support adding extra stuff too, like unique identifiers for game elements, or yaml for new units?
manifested types should contain extra info to easy their use.
textures -> expected dimentions
audio - > expected length
custom asset types will need to implement loadfromfile/loadfrommemory
class asset : public resource::baseAsset {}
//before reading manifests
auto assetTypeId = resources->register asset type("typename", loadfilefunc, loadmemfunc);
//for a compiled manifest(in hadesmain)
resource->addCustomasset(assetTypeId, "name", "path");
//at the start of the gamestate
asset* custom= resources->(assetTypeId, "name");
custom types must be registered before loading any assets. or external manifests
Add support for a built in server with connection and curve syncing functions
a server consists of a Server/Trunk and one or more server/branches.
only one trunk can be run at a time, and a client can only connect to one trunk.
branches represent sub-instances of the game, like different areas in diablo2. branches may communicate with each other through the trunk. and the trunk may be responsible for data that is persistent between branches(such as player data)
A collision base type, with support for comparing any of the the child types.
Axis aligned Rect,
Circle,
Point
collision_test(returns true if intersecting):
collision_move(returns a vector pointing from the objects current position, to it's final position,
this includes allowing the object to use up remaining move by sliding along no-colliding directions):
safe_move(returns the largest non-intersecting move):
collision_normal(returns the normal vector of a move that would result in a collision):
change refresh() to refresh(bool unloaded_only = false)
same for all the other refresh overloads
also add a clear command for the refresh list.
Make tile_work and terrain_work thread safe, by only accessing the datamanger through const or by sharing a shared_ptr to a mutex they both use.
current impl causes a race condition.
current implementation is overly complicated, and blocks out a few needed abilities.
we should be able to replace the curvemaps in GameInstance and the spritemap in Gamerenderer with transactional maps instead of maps of value_guard. after all thats the point of transactional map
A ninepatch class similar to this: https://github.com/Hapaxia/SelbaWard/wiki/Nine-Patch
should make doing a lot of gui stuff easier.
Zero == zero should equal false
This header should provide support for debug info overlays to be rendered on top of the game.
with the assistance functions
overlay* CreateOverlay
DestroyOverlay(overlay*)
This is basically for tasks that have been ejected from the Hades 2 target.
Current linux blockers:
may be due to false loading of non-present (0,0) textures for missing files.
A few components have been developed in ortho that need to be brought back into line with hades
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.