Coder Social home page Coder Social logo

arenags's Issues

Basic CT system for timing

  • Each actor as a CT associated with them that decreases as actions are taken
  • Engine cycles all actors increasing until one hit a limits and goes
  • Some player actions will not consume a turn (cancel for example)

Animation

We should animate the following at least:

  • Projectile skills

And possibly the following

  • Characters moving

MapTileVariant Optimizations

MapTileVariants is looking up the byte [] in a dictionary for every cell. This isn't super fast.

However, since the mapview gets a "new" map every draw, and does not know if it has changed or not, it is hard to safely do much faster without getting ugly.

We should improve this if it becomes a bottleneck.

Mouse support

  • Movement to start out with, then all new features as they happen

Refactor references to GameState

Right now we have ugliness like this:

		Skill skill = character.Skills.First (x => x.ID == script.SkillID);
		state = state.WithReplaceCharacter (character.WithReplaceSkill (skill.WithCooldownReduced ()));
		character = state.UpdateCharacterReference (character);
		skill = character.UpdateSkillReference (skill);

		if (!skill.UnderCooldown)
		{
			state = state.WithRemovedScript (script);
			if (skill.Resources.RechargedAmmoOnCooldown && skill.Resources.CurrentAmmo < skill.Resources.MaxAmmo)
			{
				state = state.WithReplaceCharacter (character.WithReplaceSkill (skill.WithIncrementedAmmo ()));
				character = state.UpdateCharacterReference (character);
				skill = character.UpdateSkillReference (skill);

				if (skill.Resources.CurrentAmmo < skill.Resources.MaxAmmo)
				{
					state = state.WithReplaceCharacter (character.WithReplaceSkill (skill.WithCooldownSet ()));
					skill = character.UpdateSkillReference (skill);
					character = state.UpdateCharacterReference (character);
					state = state.WithAddedScript (Generator.CreateCooldownScript (0, character, skill));
				}
			}
		}

with the root of the problem being stale references to characters / skills after the game state mutates.

This is ugly, error prone, and almost worst than if it was all mutable.

The plan is as follows:

  • Create a type safe ID holder, so we don't confuse ID with ID, since they are all int under the hood.
  • Convert most/all internal APIs used on the engine to take ID instead of character/skills/etc.
  • Rename Collections on GameState from Foo to FooCollection. Create nice APIs to easily lookup the object based on ID.
  • Nuke UpdateFooReference APIs
  • Convert tests to use them in most cases. Where it can't, we can use {} to limited scope.
  • Reevaluate as we go.

Secondary Resource System

In addition to the ammo/cd system, should we have secondary resources systems?

  • Combo points
  • Builder/Spenders
  • Procs for abilities

Optimize More

  • MapTileVariants is terrible in allocating byte arrays \ rng
  • MapThemePainter is allocating a string for every map tile when we look it up. :(

Optimization Pass Needed

How wasteful is the immutable gamestate?
How many GCs are we running when you run across the room?

Simple Actions

Since there are no bump attacks, for basic interactions we'll need

  • Action bar
  • Targetting

Basic AI

We'll need enemies to chase the player.

Characters ref going out of sync after update is ugly

We have test code like this:

	state = state.WithEnemies (state.Enemies.Select (x => x.WithAdditionalCT (Time.CTNededForAction)).ToImmutableList ());
	closest = state.Enemies.First (x => x.ID == closest.ID);

Where we have a enemy of question, update the world, and have to re-get them to do stuff. If we forget, we get stale data. This is terrible.

We need to resurface all Skill and Physics APIs to take an actor ID, not the reference itself. We also need nice APIs on GameState to look up via this ID.

Add serialization support

  • Serialize state and load back
  • Write save file in OS friendly location
  • Close window saves before exit
  • Startup looks for save and loads it if exists (and then deletes)
  • Allow "quit" button to quit without saving

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.