Giter Site home page Giter Site logo

pedestrians's People

Contributors

jefflunt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pedestrians's Issues

BUG: Rendering speed changes with scroll position

The further down, and to the right I go, the faster rendering gets.

  • If I only go to the right, then that speeds it up a little
  • If I only go to the bottom, then that speeds it up a little
  • BOTH right and bottom, gets the fastest speed increase
  • moving only PARTIALLY along the x-, y-, or both axis, increases rendering by an equivalent linear amount

Is collision detection affected by the scroll position? This is the only thing I can think of that would affect this.

Popular desitnations

Implement the ability to add "destinations" in the game - places that pedestrians will gravitate toward when they want to be entertained. Having 1,000 wandering pedestrians causes some issues in terms of illogical pathfinding.

Hey, I'm walking here!

Pedestrians should modify the blocking map in real time as they move around the world, in order to prevent them from running into one another.

The Wanderer

Pedestrians should wander about randomly when not given any particular direction.

Persistent tile map

Have the tile map's state be saved between runs. In fact, have the tile map save itself automatically every 5 seconds to default.tilemap, and default.tilemap.backup

Pedestrian position histories

Pedestrians should keep a full record of the physical position, and direction in which they were heading, up to the last two minutes.

When the mouse goes over the far right, or bottom of the screen, it crashes

The reason is because of an IndexOutOfBoundsException. Basically, this is happening because the 800th pixel column, or 600th pixel row, when divided by the tile size, returns a value that's out of range.

The real answer to this is to simply modify the methods that get block coordinates such that they ignore out of bounds values.

Arbitrary number of pedestrians

The number of pedestrians on a tile map should be flexible, rather than static, limited only by the maximum memory limit that we want to support.

I am a ghost no more

Pedestrians should not be able to walk through obstacles. That is, they should have predictive collision detection. Right now they just blindly follow paths, even through obstacles.

If a Pedestrian runs into a wall they should try to steer around it.

X-ray vision

Implement a key that allows you to turn on/off the rendering of paths for Pedestrians.

The well-traveled path

Investigate the feasibility/memory footprint impact of having either pedestrians or the pathfinding code cache common paths in order to save on recalculating the same path over and over.

Simulation variable controls

Variables within the simulation (e.g. the formulas, config values, etc.) should be adjustable at runtime.

What we'll want to do is wrap this information in some kind of "ConfigValues" UI component with sliders, input boxes, etc. for adjusting things to allow the user to change variables in the fly for experiment/fun.

Infinite spin

Sometimes, when just the right vectors are applied to a pedestrian, they start to go into an uncontrollable spin, or freak out. At some point they seem to snap out of it, but it, but sometimes it takes several minutes.

I believe I've fixed this by changing the Vector code so that the direction is always normalized to a value between 0 and 2*PI.

Move on over

Pedestrians should be able to request that other pedestrians move out of their way. Whether or not they comply is up to them.

Arbitrary tile map sizes

We should be able to support arbitrary tile map sizes, up to a certain maximum (as defined by the upper memory limit we want to support).

My soul is revealed

Give every Pedestrian a unique rendering color, above a certain brightness, so we can visually distinguish it from others on the movement field.

Save/load for Pedestrians

Implement the ability for a Pedestrian to save their state/history, and for it to be restored from disk/database, whatever.

Memory leak?

Over time, the amount of memory used, as displayed in the app, increases. The application also slows down within 30 seconds or so. After 20 minutes or so, the frame rate drops to 9fps.

JIP (Java Interactive Profiler) should be able to shed some light here.

Specify art direction

Work on the list of technical details (look/feel, image dimensions, animation requirements, etc.) for the art work

Vitals

A pedestrian's vital statistics, things that keep them alive:

  • body temperature (0-100: 0 = has a severe cold, 50 = perfectly balanced temperature, 100 = has a severe fever). I low body temperature can make you susceptible to illness.
  • rest (0-100: 0 = exhausted - can barely move, 100 = very well rested - full of energy - ready to go go go!). I low state of rest can make you susceptible to illness.

Threading the quantum needle

Pedestrians should not be able to path diagonally between the infinitely small gap between the corners of two obstacles.

Reset pedestrians

Allow the removal, and regeneration of all pedestrians. This is especially helpful if you want to build a custom tile map, and you need to wipe out the pedestrians, and start over after changing the map.

Congested walkways

Calculate congestion (i.e. relative number of pedestrians in a given tile), and allow the user to press a key to show/hide current congestion values.

Implement obstacles

Pressing the letter "o" while hovering over a given spot should allow the user to enable that block an obstacle, such that Pedestrians will find paths around any blocks that are currently obstacles. Similarly, the "c" key clears obstacles.

Sensor-based steering

Rather than the current method of exponential decay for making pedestrians turn and adjust their speed, what you need is a way for pedestrians to simply sense their environment, and then react to it.

Life

Your basic hit points-based attribute. 0 hit points = dead pedestrian. Anything > 1 is living, to various degrees.

Put path finding on its own thread

Put the the path finding code on its own thread, outside of the "logic, render" loop. This will allow, among other things, for the calculation of extremely long paths without the need that it all happen within the space of a single rendered frame. Calculating a very long path, even over a space of 2-3 seconds, is probably more than fast enough for more pedestrian tasks.

Multiple pedestrians

Now that we have pedestrians wandering around, and we've solves the most pressing pathfinding issues, it's time to put multiple pedestrians on the same field, all wandering around.

I've got a twitch!

Pedestrians suddenly turn to the left, then correct back toward the path for some reason.

Scrollable map

With larger tile maps, we'll need the ability to scroll around the world.

Slow down

The current walking and running speeds (45/120 pixels/sec) are fine for testing, but they're really much too fast for the real world.

Be polite to those around you

Pedestrians, when they see they might collide with someone, should figure out between themselves who is going to go ahead. When that happens, the other pedestrian(s) should stop, and let that person go ahead of them.

Implement a simulation time-of-day clock

The clock keeps track of the current time in the simulation. The game runs on a 24-hour clock, and a 7-day week. Months, etc. don't apply here. At this point all we're interested in is the following:

  • Time of day (pedestrians have a routine, they go to work, come home, etc.)
  • Day of the week (pedestrians have a weekly schedule, with days off, etc.)

More accurate rendering: insertion sort

If you so an insertion sort on the pedestrians, with lowest Y, lowest X priority, the result will be that pedestrians in the upper-left portion of a tile will be rendered first when the rendering loop iterates over them. This means they will not longer 'pop' in their drawing, due to the ord in which they entered the tile.

Money

How much money the pedestrian has

Implement pathfinding

Basic pathfinding needs to be in place.

What we want to do is implement into the demo, a Ctrl+Click function that when the user Shift+Clicks on a spot on the screen, that the Pedestrian will Pathfind their way there.

Cutting corners

After the path finder has found the basic path, it should then go in and try to optimize that path, to make it shorter and more efficient. Due to elements that are specific to A*, and the way the applied heuristic works, you sometimes get strange, non-sensical paths.

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.