Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”
This article has participated in the “Digitalstar Project” and won a creative gift package to challenge the creative incentive money.
This mosaic-style expression is exactly 13Kb, someone can make a game out of an expression size space. I don’t believe you can write a flower in such a small space. Can the game be fun? Because these games are ready to play, I played them for a while with the mentality of trying them out.
As it turned out, my ignorance limited my imagination, and these 13kB games weren’t as crude and boring as I thought they would be. They not only have rich graphics, but also music, physics, gravity system, including shooting, puzzle, skill and other different categories of play, the variety of my eyes!
Below I’ve put together a list of three games I found fun, along with the online address and GitHub source code.
Play with the games and we’ll talk about which open source projects they use later.
Space Huggers are Space Huggers.
Shooting games, eliminate all enemies. Multiplayer with external gamepad for up to 4 players. Not only that, there are enemy and item systems, as well as particle systems like rain, snow, blood, explosions, weapons, and water. Mobile terminal operation requires external handle.
Operation:
- WASD or arrow keys: Move, jump and climb
- Z or left click: Shoot, most things will break, some will burn
- X or medium key: roll, brief invincible state, but also can extinguish fire
- C or right click: grenades, 3 per life
- Also can connect up to 4 cooperative games!
Enemy type:
- Recruit (green) : Dull, takes 1 hit
- Soldier (blue) : Normal speed, requires 2 attacks
- Captain (red) : Can climb walls and jump more frequently, requires 3 attacks
- Expert (white) : Jumps and rolls frequently, takes 4 attacks
- Explosives Expert (purple) : Throws grenades without catching fire, requires 5 hits
Demo: js13kgames.com/games/space…
Source: github.com/KilledByAPi…
2, Black Hole Square
Puzzle games, remove all blocks pass.
- Action: Swipe left to start the game, click on the block will move in the direction of the arrow, block into the “black hole” is cleared
- Mobile terminal support
Demo: js13kgames.com/games/black…
Source: github.com/Quinten/bla…
3, PACKABUNCHAS
Puzzle game, using the provided shapes to form a specified shape,
- Action: Click to rotate and drag graphics
- Mobile terminal support
Demo: js13kgames.com/games/packa…
Source: github.com/MattiaFortu…
What is Js13kGames
These games are part of the 2021 Js13kGames, an annual competition that requires participants to create an HTML5 game in JavaScript that is less than 13kB in size over a period of 30 days. It’s not hard to make a game in JS in 30 days, the hard part is getting the game to be less than 13kB.
There are four ways to shrink a game:
- The game engine
- The compression code
- Images and Sounds
The open source projects described below can be found in many of the entries from Js13kGames.
Ga (Game Engine)
A lightweight, tiny (6.5kB), easy-to-use JavaScript game engine that can be used to make HTML5 games or any 2D action game.
Github.com/kittykatatt…
Kontra (Game Engine)
It focuses on a small JavaScript mini-game engine, which is small but provides the core functions of controls, events, loops and so on that are commonly used in games.
Github.com/straker/kon…
The compression code
Compressing code usually reduces the size of the code by eliminating unnecessary content such as whitespace and line breaks.
Google Closure Compiler: github.com/google/clos…
MiniMinifier:github.com/xem/miniMin…
Piskel (Image)
Easy to use online pixel image creation tool.
Github.com/piskelapp/p…
MiniMusic (Sound)
Projects that convert sound effects to JavaScript, reduce the “volume” of sound in this way, and support online visual manipulation of editing and generating sound effects.
Github.com/xem/miniMus…
Are you ready to write a little game?
The last
With the development of technology, storage space is no longer “tight”, we do not have to “calculate every ounce” when coding. But now I see a bunch of geeks trying to figure out how to make a game in 13kB. I went from being curious and incredulous, to marveling at their programming skills when I saw their games and source code, to reflecting on how little I had thought about performance and wastage when coding. Thanks to these open source projects, I have opened my eyes and discovered my shortcomings.
This issue recommended open source project code is not much, suitable for beginners to learn and start game programming, interested readers can try to use them to write a small game.
The above is all the content of this article. If you are interested in the recommended open source projects in this issue, please like and forward them, so that these excellent open source projects will be discovered and liked by more people. Here is HelloGitHub sharing interesting, entry-level open source projects on GitHub. Feel free to share open source projects with me in the comments
Github.com/521xueweiha…