Code Monkey home page Code Monkey logo

js13k-2023's People

Contributors

picosonic avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

js13kgames

js13k-2023's Issues

Make enemies chase you

When close enough to an enemy, change their state to make them follow you to attack.

If they collide with you, lose some health.

Make sure they can't move as fast as you, so you can at least get away from them.

Add key logic

When a key is collected it can then open all the doors.

So allow key to be collected, a state var is recorded that the player has collected the key, and then any closed doors visited become equivalent open doors, plus character enters the door which goes to a different level.

Logic for shop

Detect when you walk onto a potion

If enough money held, buy a potion and reduce coin count

Randomise treasure

When opening a chest randomise what you get, between coins, keys, potions

Add particle system

It would be good to have a particle system to render when interactions occur, like healing, killing rats, collection objects, e.t.c.

Only process mouse clicks from left button

When pressing right button, the context menu appears and the character starts moving towards the space under the cursor.
Also the middle button will be processed.

  • We need to disable further processing on mouse clicks using preventDefault() to stop the menu appearing.
  • We also need to only process player movement when the left button is pressed.

These both need to be put into settarget() function in the file inputs.js

Room name

When entering a house, write the room name at the top of the screen

Add inventory

Show all the items collected and allow them to be interacted with, e.g. dropped, or potions mixed

Will need to decide how to show/hide inventory

Report locked door

When trying yo go through a door which is locked, show something to indicate this

Heal bleeding villagers

When potion of same colour as a bleeding villager is held, and we run into a villager, heal them

Make some test levels with Tiled

Now that levels can be created using Tiled, imported and drawn in the game, we need to design some test levels which can refined as game mechanics are refined. I'll go through how to do this to make things easier.

Add sign logic

When over a sign post, put up the text which the sign post has on it until the character is moved away.

Show blocked cursor when over solid tile

When the mouse cursor is being shown (non-touch), the mouse can be moved around the screen and could change shape when over a solid tile. Since the player character can't be moved onto a solid tile.

Detection of solid tiles can be done by checking if the gs.tiles[] array has a non-zero and non-empty value for the equivalent row, column position of where the cursor is.

The issolid() function within the pathfinder.js shows how to detect if a tile is solid at a given x, y position.

Something similar is needed in redraw() within main.js at the end of the function where the cursor is shown.
Note - it currently always draws tile 60, the target box, but could draw tile 61 when what's underneath is solid.

Add stairs logic

When stairs are clicked on, they act like doors and take you somewhere else

Decide what to keep in the sprite sheet

The current used space out of the 13kb is 90% - most of this is taken up with the huge double spritesheet which includes tiles for both the village and dungeon sets of graphics.

So the next major task will be to cull it down to size by deciding what will actually be used in the game. This needs to be done before the maps are made otherwise the ids of the tiles/chars will all change and will require all the levels to be remade.

It would be good to at least halve the size of it. Perhaps just concentrate on the village sprites with the people from the dungeon set, then add a few ad-hoc ones as required and remove any duplicates.

Add framework for collision detection

For when the player collides with a non-solid space, i.e. one occupied by an object or another character, we need code to execute an action.

e.g.

pick up object

Rotation suggestion

Detect when running portrait and display a fullscreen prompt to get the user to rotate their screen to landscape.

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.