Giter Site home page Giter Site logo

kylios / beerrun Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 183.45 MB

Deliver beer to the party as fast as you can without dying or blacking out!

Dart 97.34% PHP 0.08% Ruby 0.12% Shell 0.08% Pascal 0.01% Puppet 0.03% HTML 0.34% CSS 0.15% Dockerfile 0.01% JavaScript 0.21% C 1.64%

beerrun's People

Contributors

draco24 avatar kylios avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

draco24

beerrun's Issues

Implement objectives screen

We need an objectives screen for the levels that tells the player how many beers they need to win and how long they have. This should be implemented as an abstract screen that can be created simply given certain numbers. It should be part of the Level abstract class.

"Sick dude, beers!" text appears at the beginning

The text "Sick dude, beers! We'll need you to bring us more though. Go back and bring us more beer!" shows up at the start of the tutorial. This text should only appear when the player delivers beer to the party AFTER going to the beer store.

Tutorial

The tutorial should be fully implemented in Level1. The steps we need are:

  • center on house
  • dialog - introduction to story
  • pan to beer store
  • dialog - request to bring beer
  • pan back to house
  • dialog - closing statements

Level 2

easy
12 beers to win
1:30 minutes
5 NPCs
4 cars

Make the bum smarter

The bum character should run out of the way of cars. It should honor the "blocking" property of level tiles. It should stay within certain boundaries and adhere to configurable movement parameters. It should be able to chase the player.

Compress audio data

Loading the .wav file takes too long. Compress this so loading takes shorter.

Create Cop AI

The cop should not move very much. It should move towards the player when the player gets nearby. Like the Thug, parameters of the Cops movement should be configurable.

Level 5

medium
16 beers to win
1:00 minute
6 cars
5 NPCs

Hook up non-download loading jobs to the progress screen

Some tasks like decoding levels and audio data take a significant amount of time at startup, but aren't recorded in the progress screen. Hook these tasks up so their progress remaining and complete is reflected in this screen.

Specify document elements using a config file, with a preconfigured set of required elements.

Rather than passing in a reference to each page element we need in the GameManager's constructor, let's use a config file. This will let the html frontend be super flexible if we ever drastically change the front page or try to integrate with other sites. How about something like this:

var pageConfig = {
"canvas": {
"ref": "div#canvas"
},
"stats": {
"ref": "div#stats"
},
"ui": {
"ref": "div#ui"
}
};

var page = new Page(pageConfig);
var gameMgr = new GameManager(page);

We can rework how the game manager consumes this information later. For now I think it'd be beneficial to easily allow for more references to page elements. Perhaps someday we can add a class to help interface with these better?

Finish all art

Sprites that need finished (or started..)

  • bum sprites (4 directions + walking frames)
  • road curves
  • fence connectors

Add a sign or a banner to indicate the party

Especially in level 2, if you didn't pay attention at the beginning, it's not clear which door is the party. There should be some sprite indicating where it is. Maybe a sign above the door, some balloons, or something like that. Spilled trashed party cups, blacked out kids outside the door, the crashed car, etc.

Create bum sprites

Need walk animations for a 64x64 bum character in the up, down, left, and right directions.

In Level1, vertical scrolling is not locked in the downward direction

In levels that are exactly as tall as the viewport, when the player walks lower than halfway down the screen vertically, black empty space appears at the bottom of the screen.

Expected results: the screen does not scroll with the player if the viewport is already at the edge of the level. The player should walk all the way to the bottom edge, and no black empty space should be exposed.

Player can walk off screen at the top edge of levels

The player is able to walk off the top edge of the screen. The top edge should instead act as a blocking object, and the player should not be able to move any further. This works on the bottom and side edges.

Car on level 2 hits you when you stand on the sidewalk

When standing on the sidewalk in level 2 just outside the house, the car comes up on the street and turns left, and it takes a life.

Expected behaviour: you are safe from the cars on the sidewalk.

  • Should probably just open a larger ticket to examine collision detection in general.

Create Thug class in dart

Lay the infrastructure for a thug character.

  • create the class
  • create a movement component, using simple movement logic to start
  • create data classes and load in the correct data
  • load in the appropriate spritesheet

Break these into separate tasks if needed.

Buld out REST framework

Postgres for relational data
Redis for key/value data
Scala for code

Super low priority. This is mainly to get a handle on Redis, Postgres, and Scala, with the goal of eventually running a level-generating game server, and maybe an MMO server for this type of game.

Investigate: rework the level data definition for NPC objects

NPCs are given properties in the level file corresponding to their position in pixels, where (row, col) coordinates would be more consistent.

We should also look into defining the width, height, and collision boundaries either in this class or in the sprite classes. Currently the width and height are defined as "0" in this class and these properties are obtained presumably by the sprite it uses. This is good but might be more elegant somehow? Maybe just extend the sprite class.

Redo fence images

The metal fence image is difficult to see. Darken the fence and make it more visible over the grass and sidewalk backgrounds. OR just redo it. It's not that big of a deal.

Create Cop (police officer) class in dart

Lay the infrastructure for a cop character.

  • create the class
  • create a movement component, using simple movement logic to start
  • create data classes and load in the correct data
  • load in the appropriate spritesheet
    Break these into separate tasks if needed.

Investigate only: quicken asset loading times

Loading assets still takes a while. First figure out why this is. Some ideas:

  • the audio is taking up most of the time
  • are assets caching correctly on the client?
  • are assets downloading in parallel?

Some ideas to fix:

  • load the audio in parallel to everything else. i.e. start it loading first and let the levels, data, etc load at the same time.
  • stream the audio instead of load it upfront.
  • don't load all the levels at the beginning, only as needed
  • serve files from real CDN

Build cookie system

Need to track user preferences and tutorial progress and stuff. Let's do this using cookies.

Level 3

easy-medium
20 beers to win
2:00 minutes
6 NPCs
2 cars

Create Thug AI

Finish the thug's movement component with the appropriate movement behavior. The thug should perhaps not move very much, unless the player gets close.

Convert GameEvents to Stream-based event system

Look at the Player class. All GameNotification events should instead be sent along streams. The GameManager class can simply decide what to do with the message that your buzz is wearing off. Look for other places we can do this... NPCs? This might turn into the GameObject, and eventually Component system overhaul we need...

Blocker for adding new NPC types.

Remove drawing from the update loop

// Eventually, it would be cool if drawing could be moved out of the
// main update loop.  How we do it, I'm not positive, but I'm thinking we
// could just call window.requestDrawFrame or whatever and pass in the main
// draw() function, and have update() called in an interval where we
// regulate the speed with an updatesPerSecond counter.  This would allow
// us to better control start/stops of the update loop too, and make it
// easier to pass in different update() functions for different modes of
// the game.

Probably not high priority for this project. Wanted to document this idea somewhere and remove the comment from the code. We should have separate threads for drawing and updating state information. I guess we should have some way to compensate if drawing gets too far behind? ...or does that just mean the player's on a slow computer so it starts to look jittery?

Anyway moving draw() out of update() would make it much easier to change modes for different scenes and would probably help our frame rate actually.

Cop sprites

Need sprites for a police officer character, 64x64, in the up, down, left, and right directions.

Thug sprites

Need walk animations for a 64x64 thug character in the up, down, left, and right directions.

Level 4

This is the level currently known as Level2. Please port that to Level 4.

medium
24 beers to win
3:00 minutes
3 cars
2 NPCs

New AI Behaviors

I want at least two:

  • "Bums" - act homeless and steal beers from you. They will chase you for a short while if you get too close.
  • "Thugs" - deduct a life from you if you get too close. Will try to stand their ground until you get too near them.
  • Perhaps add a third friendly NPC that simply talks when you get close. These could be integrated into the tutorial too.

NPC behavior should by default always avoid obstacles like cars and blocking tiles. They should revert to bored behavior when the player is not nearby, and then invoke their aggressive behavior when the player is nearby.

Level1

Level1 needs to be designed, implemented, and hooked into the game.

  • design
  • implement tiles
  • implement NPCs

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.