# gameLibZero.js \[video game framework\]

**URL:** <https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269>\
**Category:** Libraries\
**Created:** [June 26, 2018, 6:03am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269 "2018-06-26T06:03:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [June 26, 2018, 6:03am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/1 "2018-06-26T06:03:58Z")

</div>

Hello, I am developing a library to make video games in p5.js

The library consists of basic functions to make a game in a very short time, is based on matter.js for collisions and has a nucleus that is responsible for painting and executing each frame the code of the sprites.

I am recording several tutorials to teach what can be done with it, in Spanish.

The library is for my use at work but I have decided to share it so that whoever wants can take advantage of everything that he brings and thus make games in a very short time.

Perhaps the most remarkable thing about this library is that it uses a frameBuffer where everything is painted and then this image buffer is presented on screen adjusted to the size of the window or to full screen, being a delight to program a game in a single resolution and being able to execute it in any device without worrying about how the result will be represented on the screen, it is always the same.

I have already recorded a video where I teach a very simple code on how to imitate the behavior of a breakOut or Arkanoid.

Anyone have any suggestions for the next video?  
Any suggestions to make a simple game with the library and show it on video?

Download link of the library; [https://github.com/LuislopezMartinez/GameLibZero/blob/master/gameLibZeroJS.zip](https://github.com/LuislopezMartinez/GameLibZero/blob/master/gameLibZeroJS.zip)

INSTALLATION  
https://www.youtube.com/embed/Vx8nj1-kZXc?feature=oembed&wmode=opaque&list=PLdAjzekZKCCbBvqvFbmgZ3XM75MMwPns6

SPRITES

[![](https://img.youtube.com/vi/NmzgVBC9TS0/maxresdefault.jpg "tutorial js sprite") ](https://www.youtube.com/watch?v=NmzgVBC9TS0)

SPRITES WITH PHYSICS

[![](https://img.youtube.com/vi/49Wt49-ngZs/maxresdefault.jpg "tutorial js sprite2") ](https://www.youtube.com/watch?v=49Wt49-ngZs)

COLLISIONS

[![](https://img.youtube.com/vi/KCGOqD6jHDQ/maxresdefault.jpg "tutorial js colisiones") ](https://www.youtube.com/watch?v=KCGOqD6jHDQ)

SCROLLING GAMES

[![](https://img.youtube.com/vi/SkSz0DQ48A0/maxresdefault.jpg "gamelibZero escenas") ](https://www.youtube.com/watch?v=SkSz0DQ48A0)

SHOOT EM UP EXAMPLE

[![](https://img.youtube.com/vi/VsqDHbLWeVM/maxresdefault.jpg "tutorial js juego de naves 00") ](https://www.youtube.com/watch?v=VsqDHbLWeVM)

[![](https://img.youtube.com/vi/pse7XB5K8VA/maxresdefault.jpg "tutorial js juego de naves 01") ](https://www.youtube.com/watch?v=pse7XB5K8VA)

MULTI LEVEL GAME EXAMPLE

[![](https://img.youtube.com/vi/U_sZ7pNnWVs/maxresdefault.jpg "gameLibZero tutorial niveles") ](https://www.youtube.com/watch?v=U_sZ7pNnWVs)

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [June 28, 2018, 8:55pm UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/2 "2018-06-28T20:55:13Z")

</div>

second tutorial ready!

Sprite class example.

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [June 29, 2018, 4:41am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/3 "2018-06-29T04:41:04Z")

</div>

Another tutorial ready! Sprites with physics and matter.js integration in gameLibZero.

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [June 30, 2018, 6:29am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/4 "2018-06-30T06:29:56Z")

</div>

Another turorial, collision() and collisionMouse() 😉

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [July 2, 2018, 6:06am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/5 "2018-07-02T06:06:20Z")

</div>

I am pleased to announce that I have just successfully completed the prefabricated floor detection routines for the framework.  
Now it’s as simple as being able to detect if you’re touching ground with the isContact method (angleA, angleB).

What this method does internally is a fuss but in the eyes of the user of the framework is very simple, two angles are indicated, the angle A and the angle B, and the method returns TRUE if there is a contact with this body between those angles, or FALSE if it does not exist …

This way we can know if the character can jump or not:

touching\_floor= this.isContact (-100, -80);

If there is contact between -100º and -80º toco\_suelo, it will be TRUE.

I think that simpler can not be done hehe.  
The tutorial with the side Scroller, scenes, and physics I guess tonight! I do not have more time in the morning XD … 🙂

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [July 3, 2018, 5:59am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/6 "2018-07-03T05:59:33Z")

</div>

New version and new tutorial, scrolling games in p5.js with gameLibZeroJS!

[![](https://img.youtube.com/vi/SkSz0DQ48A0/maxresdefault.jpg "gamelibZero escenas") ](https://www.youtube.com/watch?v=SkSz0DQ48A0)

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [July 14, 2018, 4:08pm UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/7 "2018-07-14T16:08:36Z")

</div>

Updated whith s Shoot en up example game!  
Video tutorial in Spanish al init post!

code example: [https://www.dropbox.com/s/xd33v5pvkpu1rnm/gameLibZeroJS%20-%2005%20juego%20naves.zip?dl=0](https://www.dropbox.com/s/xd33v5pvkpu1rnm/gameLibZeroJS%20-%2005%20juego%20naves.zip?dl=0)

NOTE: open with brackets.

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [July 16, 2018, 3:57am UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/8 "2018-07-16T03:57:55Z")

</div>

Hi people!  
Game library updated to new examples and many bugfixes.  
Enjoy it!

Last video tutorial:

[![](https://img.youtube.com/vi/U_sZ7pNnWVs/maxresdefault.jpg "gameLibZero tutorial niveles") ](https://www.youtube.com/watch?v=U_sZ7pNnWVs)

Download link at first post 😉

---

<div class="post-metadata">

**Author:** ![erkosone](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@erkosone](https://discourse.processing.org/u/erkosone)\
**Post date:** [July 28, 2018, 2:12pm UTC](https://discourse.processing.org/t/gamelibzero-js-video-game-framework/1269/9 "2018-07-28T14:12:32Z")

</div>

Hi, i.m working in a big update to add a simple and generic user interface for games 😉
