Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Pixelbox

Create 2D games in JavaScript, made easier · By Cedric Stoquer

Example projects

A topic by RocketStarGames created Apr 12, 2020 Views: 812 Replies: 5
Viewing posts 1 to 6

Are there any example projects we could open and learn from?

I created a map and then ran it, but it only showed black blank screen.

How do I create and place sprites?

Thanks.

(1 edit) (+3)

One of my old project MonkeyWarp (playable on itch)  is open sourced on GitHub. It might mot be the easiest project to dive-in, but if you have some questions I'll try to answer them.

I plan to create some tutorials and more simple demo projects

To draw things on screen, you need to add some code to the "src/main.js" file. For example:

var map = getMap('map'); // get the TileMap named "map"
draw(map, 0, 0); // draw map at position (0, 0)
sprite(153, 64, 32); // draw sprite 153 (from tilesheet) at position (64, 32) 

Full documentation can be found here

You can add png images in the "assets" folder of your project. Pixelbox will load these automatically, and you can draw them on the screen with some code like:

draw(assets.mySprite, 0, 0);
(1 edit)

I second that request - couple basic example projects would be awesome to get a hang of the engine.

In the meantime @RocketStarGames, you can look up github for the project, the basic API is there.
Edit: Seems that the author beat me to a reply by 39s :P

(+1)

I'm really interested in tutorials as well.

I interested in a tutorial to make a tracker with your program :)

I'm working on a simple camera tutorial. Where should I post it?