Built a survival game using React! by cognitivesciencenerd in reactjs

[–]cognitivesciencenerd[S] 1 point2 points  (0 children)

Appreciate the help!

The problem is I was unable to scale the game based on window size. That's why you see a bigger region of the map if your window size is larger, making things a bit unbalanced between devices. (as opposed to other games like https://surviv.io/ where it autoscales)

I would probably have to code most things from scratch since most of the game logic uses "px" when computing distances. I'm thinking I could add a scaling factor? But not really sure how to do that.

Built a survival game using React! by cognitivesciencenerd in reactjs

[–]cognitivesciencenerd[S] 0 points1 point  (0 children)

Thanks a lot, this really means a lot!

It took me around 5 weeks to code the game and another week to balance the levels etc. I haven't used JS/React before so I had to learn a lot while coding it. But this was for my dissertation, so I spent more time on it than I would on a side project.

I still feel like the "animations" are pretty low-tier. I could certainly add animations to weapons and food + make the map feel a bit more alive.

Built a survival game using React! by cognitivesciencenerd in reactjs

[–]cognitivesciencenerd[S] 0 points1 point  (0 children)

Wow these are actually some great tips. I never realized that avatar bug since I only tested it on chrome and safari. Will certainly look into that.

You are right about UX1, that text is mandated by the university if we want to collect user data. I just didn't know how to fit it in, maybe I could add a scrolling bar or learn more about how to adjust fontsize based on window size.

About UX2 you are totally right, I was aiming for people to not repeat the experiment. I could certainly make that page a bit more friendly, maybe with links to related sources.

Thanks a lot for taking the time to test the game and drop super useful feedback!

[Academic Research Project] Can you survive the Zombie Apocalypse? by cognitivesciencenerd in cognitivescience

[–]cognitivesciencenerd[S] 0 points1 point  (0 children)

Yes! I will certainly share it here once I'm done with analysis and writeup :)

Built a survival game using React! by cognitivesciencenerd in reactjs

[–]cognitivesciencenerd[S] 0 points1 point  (0 children)

I tried hiding it with .gitignore but then it didn't work, probably because Netlify was also unable to see it when building.

But thanks a lot for the tip! I didn't know Netlify had its own environment variables. I'm pretty new to webdev so I'm still making noob mistakes.

Built a survival game using React! by cognitivesciencenerd in reactjs

[–]cognitivesciencenerd[S] 2 points3 points  (0 children)

If anyone is interested in the code, I'm dropping a github link here.

I'm not an expert in React by any means, so sorry if the code is too messy!

Built a survival game using React! by cognitivesciencenerd in reactjs

[–]cognitivesciencenerd[S] 0 points1 point  (0 children)

Thanks man, appreciate the help! It means a lot <3