fractalbach / float-up Goto Github PK
View Code? Open in Web Editor NEWThe Balloon Game
Home Page: https://fractalbach.github.io/float-up/
The Balloon Game
Home Page: https://fractalbach.github.io/float-up/
DrawImage is kind of slow, and SVG can look weird in Firefox.
Identify fastest format to draw (image data? Canvas path ?)
Make a tool to convert the image files to that format and import them as a script.
yet another experiment with controls:
Keep the balloons further from each other so that there is less overlap
Use a "network first" service worker instead of "cache first". The performance boost isn't needed right now. Better to have it update automatically.
Can look into other methods later. Currently, a service worker isn't even necessary.
As a balloon approaches it's "popping altitude", have the balloon's color change (or provide some other form of visual feedback)
Show a "pop" after the balloon object is deleted. Player won't be able to grab the popped balloon, but an image will stay there for a second.
Game viewport = size of <canvas>
element.
Currently using a square for the game area.
Ideally, the game should be in portrait mode and take up as much of the screen as possible.
Golden ratio example:
https://github.com/fractalbach/golden-ratio-webpage/blob/master/index.html
Requires changing the codebase to separate between the game "world coordinates" and "viewport coordinates".
Would be useful to have to both coordinate systems anyway. That way there isn't a need for a seperate "altitude" variable.
Pause button upper right hand corner of screen when playing the game.
Line 157 in 3b5bb88
Use Object/Memory Pool
Initialize a bunch at the beginning of program,
Mark as "inactive" instead of deleting.
Reuse the object later.
The touchscreen controls are shit.π© They are unintuitive, confusing, and sometimes unpredictable. π€¨π²β Currently, they can cause players to ragequit within 20-30 seconds.π€¬
After experimenting with several different types of controls, there is no clear-cut solution. The only consensus is that "something's not quite right".
The way forward appears to be constructing a way to compare and contrast different controls schemes.
When given a bad control scheme, it's challenging to identify the "way it should be". It seems to be easier to compare 2 different ones, and say "this feels better than that".ππ
Able to swap between multiple different control schemes, and compare then on different scales:
For theπ Balloon Grabπ game, here are some of the control schemes to try. Can try different combinations and mix-and-match different parts together:
First screen, keep it simple.
title, author, Play Game, About Game
(Maybe recent updates)
Otherwise Add extra information in the About Game section.
Save canvas image data using
canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
Or just keep it as a png
This could effectively save the footage of the game.
Make a seperate tool to assemble the images into a gif or some video format.
tapping a location on the screen will result in the player "jumping to" that location. The player should always pass that location (if it's reachable).
Directional Move calculates the unit vector in the x-direction, and uses that to control the extent that a player moves, but it does not actually mean a player will jump to that location.
Lines 213 to 220 in 2e9ea7e
Lines 177 to 184 in 2e9ea7e
REQUEST_ACTION
, use a REQUEST_JUMP
.directionalMove
assumes that you are jumping, it should call jump.jump()
should take parameter jump(unitVectorY=1)
, so it defaults to a regular full jump in other cases, and when called by directionalMove
, it can include the unitVector.Lines 388 to 390 in f469ca3
Causes bug where the game does max fixed steps every single frame until the timers are back in sync. Noticable on phone when u close browser and come back after a little while.
REQUEST_ACTION
that is being turned on very often by the Up Arrow on keyboards being fired repeatedlyPresumably, This is a side effect of...
REQUEST_ACTION
calls both JUMP and GRABREQUEST_ACTION
This can probably be fixed by...
REQUEST_ACTION
, andREQUEST_JUMP
and REQUEST_GRAB
.A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.