rickbatka / co-op-engine Goto Github PK
View Code? Open in Web Editor NEWA prototype engine for our planned co-op game. This is where we will make it work, make it network, and make it feel fun. No AI, level design, etc.
A prototype engine for our planned co-op game. This is where we will make it work, make it network, and make it feel fun. No AI, level design, etc.
This is really a placeholder for further discussion. I'm not 100% convinced any more that we will need many rectangles for colliding. Let's chat and maybe close this one out.
Hurray the networking framework is done, but there's a bit of codesplosion to clean up, mainly the rampant dependencies on the networking which would ideally just act in the background as a silent observer of all things.
We need a better camera than one that just locks on to it's follow target, it should sweep meaning it probably has this functionality:
character mechanics
Problem comes from objects not being able to be inserted into a quad during a split, seems to happen most often during a notify on a collision or phys update... it's transient and deep in recursion... so yay...
Game object will no longer have a weapon, instead it will have children which can be weapons of more objects.
Things to think about:
We should take some time and think this one out.
Games need sound! It must have these capabilities:
probably another candidate for a singleton or service
Decorative particle engine, important for feel
Quick discussion:
I started moving the creation of game objects out into factories and it seems the factories need to be coupled to the main game for several reasons. They need to get textures that the game has loaded, they need to put the newly built objects into the quadtree, and they need to put the new objects into the lists for update, as far as I can tell.
I was thinking, then, that each factory should get initialized with a ref to the main game in the game.init (or right after loadcontent or whatever). Then, each factory can expose itself via a GameService like we do for the ActorInformationService now. This way, different places can spawn things into existence, without knowing / carinng about the guts of hooking up textures and such.
Example: inside player brain, input notices we pressed the "Build" button and we determine we are in a valid state to build a tower. We call TowerCreationService.GetUnbuiltStandardArrowTower() and it's automatically wired into the game everywhere it needs to be.
Thoughts / concerns?
hybrid client / server / ad hoc: clients trust their own events, server controls the AI. server believes clients as well. server also controls game state / win conditions, etc. server basically controls everything except physics, interactions. server holds all objects.
Animation toolset must have the ability to:
Tower mechanics
Right now I have a hack that tints the gameobject red if it's in knockback mode. Should ideally flash the sprite white, but I can't figure out a way to tint the sprite white without writing a shader.
Task is to either write a shader or figure out some other way to tint white (or decide red is good and we don't want shaders )
Towers should have state objects like players. Tower building animation can then be an actual animation in the spritesheet and we can get rid of the hack in the renderer to make it look green. Also then we can simply not have a physics rectangle during placing the tower and it won't freaking shove the player around, which will be nice.
I'll take this one.
Meet up and agree on the desired look-and-feel of the game we will make. From there we can start discussing programming language / framework and begin to scope out the project.
Lets go back and take a look at all the things we marked to do later and keep a record here of what has changed
skill system
Things that were kinda pie in the sky for the initial pathfinding system.
A game needs states, like views or pages (start menu, gameplay etc.)
Drawing and animations have broken the physics somehow
stuff needs to stick around when game is closed.
State machines live on the gameobject and can be implemented/injected like components
weapon / attack: each character has list of things hurting them w/ cooldowns. cannot get hit by the same thing during that thing's cooldown.
Regarding pathfinding for game objects. This device lives outside the game and takes requests from objects for a path to their destination, this comes from the idea that pathfinding is CPU intensive and can ruin gameplay if included in the update/render thread.
Possible Once Implemented Check Out
Needs:
Bonus
Game needs numbers, bars, and menus
Bugs and inefficiencies are popping up and the new bottleneck is the tree traversal during collisions and notification of movement.
This is caused by the quad tree having to split and verify quite often, making it a deep tree. The remedy will be to flatten the tree to an adjustable amount.
Objectives:
idea for validate: give quadtree an update and have it do a depth first analysis of quads removing as it traverses
EDIT: added one last little thing
Went to implement weapon knockback, and I was having trouble getting a fast knockback. Realized all movement is clamped to global movement speed limit, also realized that everything walking around right now is basically moving at that speed limit.
Because of the way physics code is written, this means nothing can move faster than the player walking speed.
we need per-object speeds, but really, we probably need per-object-per-state speed limits. I hacked in a temporary speed limit increase for weapon knockback, but it won't allow for variable knockback for stronger attacks or anything like that.
It feels pretty hacky to say, oh I need a strong knockback, let's adjust the speed limit for a few MS and then set it back after knockback is done.
Moving on to other stuff, but this needs more thought.
This AI will have the following attributes:
If you un-comment the camera follow code (player brain), you'll see some pretty bad jitter in the sprites when moving diagonally. I tried making sure none of the numbers are getting cast to ints (like in the set position call), they aren't.
Is the camera transform rounding to exact pixels when the player is moving in sub-pixel amounts? If so, how the heck do we get a smooth camera follow?
Actually I don't think that's it because the camera follows smoothly when only moving along one axis.
Use the menu to select a level, have the game director spit out some enemies, and evaluate a win condition.
Decorators
Emitters
Misc
Edit: removed spin jitter, wasn't necessary
Object animations
Background Animations
Character state machine
CHANGING IDEA
gameplay logic
Mainly the method of disposing objects from the world:
EDITS: changed reqs to more match this objective and exclude other issues
Pathfinder is creating loops, looks like it might happen when target is switched in ai mid pathing, or when the object has been removed?..... hack in place to prevent the pathfinder from locking up so it's not gamestopping right now.
We need some basic sound assets, ones that we don't have to worry about licensing (homemade or freelance).
game needs a dynamic camera as well as things that stay static
From other case
Particle sandbox tool. Seriously, how cool would it be to have a little tool where you can change parameters with sliders, click on and off the various decorators, and craft sweet new emitters. *Note! Not as trivial as it sounds, there are a few gotchas. -Rick
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.