GithubHelp home page GithubHelp logo

leonie-jan-app's People

Contributors

crianonim avatar laleonie avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

laleonie

leonie-jan-app's Issues

Remove Service Worker Code

The initial create react app code has a bunch of service worker stuff we were meant to remove unless you are actually using it.

I'm 80% sure you aren't using it, but if not I'd like to know what you are doing with it!

Submit button on first screen

Very minor thing.

But if you were usertesting this with me I d say I am confused why the submit button is still there after I have already selected who I want to be. Feel like the button could disappear or the wording of it could change.

Game Play Ideas - Levels / goals

Char size
As well as multiple people appearing you could also have levels where on the first level the characters are much smaller in radius so it is easier to avoid them. then they get bigger as you get better.

Points
You could make the character have to traverse the field to reach a goal and score points or finish a level. Or perhaps they could pick up stars.

State Treats
There could be interesting things to try and hit like an invincible treat thing that gives them 10 seconds of being invincible and the other characters don't affect them. Or something that makes all the other characters explode.

character speed - Acceleration and deceleration??

The character seems to be quite jumpy and doesn't always move when I hit the button and also moves very slow.

You could give some more acceleration and deceleration components.
So when I hit left once the character moves at one pixel per second left. if i hit twice two pixels and it goes up to a max of say 5 pixels per second.
Then you can also add a deceleration constant that means it slows by one pixel per second every second

(actual values completely stupid so test and make appropriate)

Try multiple effects

React.useEffect(() => {

This effect function is pretty long, and actually has two responsibilities: setting up a keydown event listener and starting the interval to increment the score.

Since you can have as many useEffect calls as you like it's nice to have one per "concern"

Page length

white border appears at bottom of screen when Github image is entered

image

multiple ifs could be represented as switch

if (event.key === "ArrowUp") {
setCoords(c => {
const changed=[c[0], Math.min(Math.max(c[1] - speed,0),height-mobSize)];
setFollowers(followers =>
followers.map(follower => ({ ...follower, playerCoords: changed }))
);
return changed;
});
}
if (event.key === "ArrowDown") {
setCoords(c => {
const changed=[c[0], Math.min(Math.max(c[1] + speed,0),height-mobSize)];
setFollowers(followers =>
followers.map(follower => ({ ...follower, playerCoords: changed }))
);
return changed;
});
}
if (event.key === "ArrowLeft") {
setCoords(c => {
const changed=[ Math.min(Math.max(c[0] - speed,0),width-mobSize), c[1]];
setFollowers(followers =>
followers.map(follower => ({ ...follower, playerCoords: changed }))
);
return changed;
});
}
if (event.key === "ArrowRight") {
setCoords(c => {
const changed=[ Math.min(Math.max(c[0] + speed,0),width-mobSize), c[1]];
setFollowers(followers =>
followers.map(follower => ({ ...follower, playerCoords: changed }))
);
return changed;
});
}
};

This could be a nice use case for a switch statement.

Also the multiple ifs without elses when the conditions are mutually exclusive feels a little loose to me - would be nice to be explicit if you do stick with the else/ifs.

Constants as strings

When using strings as constants - e.g. with your page state ("LandingPage", "GamePage" etc), a common / nice pattern is to have these defined as variables and then use the variables.

e.g.

// PageConstants.js
export const LandingPage = "LandingPage"
// etc...

This is because, if constantly rewriting strings you can end up with confusing bugs by putting typos of the strings in - "LnadingPage" would work, and set the state with that string, but you have no page to match it. If you miswrote LnadingPage, LnadingPage would be undefined / and undeclared variable and maybe be a bit easier to debug.

Amazing!!

Great game Leonie/Jan. Very sleek and professional layout. Brilliant CSS design

Fun

The game is super fun!!! Bravo!!! ๐Ÿ‘๐Ÿ‘๐Ÿ‘๐Ÿ‘ I can't stop playing hahaha

input name

If you don't change the input name of Laleonie by default, the picture doesn't appear.
When you change name, the field has another default 'Your Name' but I can't anything anymore...

Tests for `animateFollower`

The animateFollower function contains complex logic - and is kind of a big part of the way the application works.

I would expect to see tests for this kind of thing.

Custom README?

I know thw focus of the project is react, but it would be nice to have a custom readme with some info about the project rather than just the auto-generated CRA one.

Clean up

Might want to clean up your files, everything related to:

  • whatwg-fetch
  • serviceworker
  • react info(logo/css...)

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.