I’ve just finished reading the rules for the contest and I wanted to make a game that is similar to doodle jump. But I want it to make it’s own maps how do I do this.
I have had the same question for a while and i actually need to do the same thing for my Project
You might find the following project to be a good starting point:
Ok thanks for the help
I tried the code and then formed it to my use and this error came up.
[generate.js:18]: Uncaught TypeError: Cannot read property ‘findByName’ of null
TypeError: Cannot read property ‘findByName’ of null
at Object.Generate.initialize (http://playcanvas.com/api/files/code/375433/directory/generate.js:18:32)
at Object.pc.extend._callInstancesMethod (https://code.playcanvas.com/playcanvas-stable.js:17073:28)
at Object.pc.extend._initializeScriptComponent (https://code.playcanvas.com/playcanvas-stable.js:17078:10)
at Object.pc.extend.onInitialize (https://code.playcanvas.com/playcanvas-stable.js:17044:14)
at Object.pc.extend.onInitialize (https://code.playcanvas.com/playcanvas-stable.js:17050:16)
at Function.Events.fire (https://code.playcanvas.com/playcanvas-stable.js:624:37)
at Function.pc.extend.initialize (https://code.playcanvas.com/playcanvas-stable.js:15483:21)
at Object.Application.start (https://code.playcanvas.com/playcanvas-stable.js:15135:24)
at Array.onLoad (https://code.playcanvas.com/playcanvas-stable.js:15048:11)
Is there any way to fix this.
Did you make an entity called Templates?
If not then these two lines would likely cause that error:
var grass = templates.findByName('Grass'); var house = templates.findByName('House');
var templates = app.root.findByName('Templates'); would have returned null
So I got the map generator to work but for some reason I can not figure out how to make it generate up so it is like doodle jump.