User prompt
Don’t set jump force on move
User prompt
Increase jump power by 2x
User prompt
Increase jump power by 30%
User prompt
Decrease the jump power by a factor of 100
User prompt
Decrease the power of jumps by a factor of 100
User prompt
Jump force should be calculated based on the office from the initial touch point when releasing
User prompt
Have both x and y velocity for the player
User prompt
Make jumping based on dragging back and releasing, like a spring. You should be able to start dragging from anywhere on the screen
User prompt
Don’t start moving until I jump the first time
User prompt
The ground should move down along with the platforms
User prompt
Add a ground to the game that the player initially stands on
User prompt
Progress game
Initial prompt
Jumping game
var Player = Container.expand(function () { var self = Container.call(this); var playerGraphics = self.createAsset('player', 'Player character', .5, .5); self.jump = function () {}; self.update = function () {}; }); var Platform = Container.expand(function () { var self = Container.call(this); var platformGraphics = self.createAsset('platform', 'Platform', .5, .5); self.move = function () {}; }); var Game = Container.expand(function () { var self = Container.call(this); var platforms = []; var player = self.addChild(new Player()); player.x = 2048 / 2; player.y = 2732 / 2; for (var i = 0; i < 5; i++) { var platform = new Platform(); platform.x = Math.random() * 2048; platform.y = i * (2732 / 5); platforms.push(platform); self.addChild(platform); } LK.on('tick', function () { player.update(); for (var i = 0; i < platforms.length; i++) { platforms[i].move(); if (platforms[i].y > 2732) { platforms[i].y = 0; platforms[i].x = Math.random() * 2048; } } }); stage.on('down', function (obj) { var event = obj.event; var pos = event.getLocalPosition(self); if (player.intersects(pos)) { player.jump(); } }); });
var Player = Container.expand(function () {
var self = Container.call(this);
var playerGraphics = self.createAsset('player', 'Player character', .5, .5);
self.jump = function () {};
self.update = function () {};
});
var Platform = Container.expand(function () {
var self = Container.call(this);
var platformGraphics = self.createAsset('platform', 'Platform', .5, .5);
self.move = function () {};
});
var Game = Container.expand(function () {
var self = Container.call(this);
var platforms = [];
var player = self.addChild(new Player());
player.x = 2048 / 2;
player.y = 2732 / 2;
for (var i = 0; i < 5; i++) {
var platform = new Platform();
platform.x = Math.random() * 2048;
platform.y = i * (2732 / 5);
platforms.push(platform);
self.addChild(platform);
}
LK.on('tick', function () {
player.update();
for (var i = 0; i < platforms.length; i++) {
platforms[i].move();
if (platforms[i].y > 2732) {
platforms[i].y = 0;
platforms[i].x = Math.random() * 2048;
}
}
});
stage.on('down', function (obj) {
var event = obj.event;
var pos = event.getLocalPosition(self);
if (player.intersects(pos)) {
player.jump();
}
});
});
Single cartoon frog sitting. Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Single Cartoon lillypad seen edge on. No flower Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cozy cartoon swamp background Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.