kelly-cs / asteroid-dodger Goto Github PK
View Code? Open in Web Editor NEWA 2D WebGL game written in native JS. Dodge the asteroids!
A 2D WebGL game written in native JS. Dodge the asteroids!
The program should be a green polygon with a blue background. Due to my lack of dexterity, when it comes to programming. I snagged. The rotating square as a template to be modified. I first added another vertex to the system. This vertex was shaded in such a way that it actually creates a 7 vertex polygon. I also wanted change the rotation button to one that starts and stops. this was implemented by merely adding another button in the html script, and adding another function to the program that sets out rotating flag to be one, and one to be zero To introduce a speed to the program. I created a variable. speed. This can be incremented by 0.0025 with another button, I created. You may also decrease the speed. the speed can never be less than 0, thus i put an if statement that makes sure speed can never be greater an zero. the function that keeps updating theframes is the move mouse key, also the jump function. I also set a stop and stop button that changes the speed to zero and the inital speed value. also the speed is initialized is set to 0 in the y component. and +.0025 in the x component. w,s,a,d also change the direction of the polygon, by merely switching on and off the speed, when the frames update in the render function this is known as stepX stepY, example: when stepX is 1 the speed will increase in the x direction -1 increase in the negative x direction, while stepY is 0.
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.