Skip to content
c  ɐ p ʇ a i ᴎ l ǝ ɘ 🏴‍☠️ o ᴙ g

c ɐ p ʇ a i ᴎ l ǝ ɘ 🏴‍☠️ o ᴙ g

  • 🏝 welcome
  • 🖍 draw
  • 🕹 play
  • ☠ hack
  • 🌍 share

Add assets by yourself

3 August 2018 by Captain Lee

Here is a very easy exercise that will allow you not to have to drag the scan of your sheet to launch your game.

Go to the source code of your game, register if you haven’t already done so (at the top right of the page) then click on the file tab and select duplicate, to create your own version of the project.

Then click on the little arrow at the top left of your source code page.

You will then see the list of files included in your game with, among other things, the assets folder in which all the sounds and images of the game are stored. Click on the small arrow next to this folder to add your drawn paper.

Click then on Add File and drop your sheet into the window that just appeared.

Your file is now an asset! Now all you have to do is tell your program to use it. Go to the script sketch.js, if it is not already open, and adds this line to the preload(); function by replacing the blank.jpg by the name of your file.

scan = loadImage('assets/blank.jpg');

Be sure to enter your file name correctly, after assets/ and with the correct extension (.jpg or.png) otherwise your program will not launch.

There you go! Your game now starts directly with your images.

Post navigation

Next Post:

Lock the treasure with a key

Leave a Reply Cancel reply

Your email address will not be published.

Make your game really unique by hacking the source code !

learn a few basics with the Captain Lee

Give the world the opportunity to play your game.

First hack (recommended)

add assets by yourself

Hack your items

lock the treasure with a key hide an item in a monster transform the treasure into a door hold one item at a time

Hack your characters

make a character static remotely controling characters

By Colin Thil
contact@martiansparlor.com

Licence Creative Commons

Created during the experiment and transmit residency at Villette Makerz

Captain Lee was made using p5.js, a projet by Lauren McCarthy and the Processing Foundation

© 2019 c ɐ p ʇ a i ᴎ l ǝ ɘ 🏴‍☠️ o ᴙ g - Powered by Cleanews