ekelokorpi / panda-engine Goto Github PK
View Code? Open in Web Editor NEWPanda Engine - HTML5 Game Engine
Home Page: https://www.panda2.io
Panda Engine - HTML5 Game Engine
Home Page: https://www.panda2.io
Make games playable offline.
Wondering if a basic path finding algo should be integrated in panda. There are many javascript path finding libraries around, I don't think this is strictly necessary but having at least A* implementation might be nice.
Reference:
https://github.com/bgrins/javascript-astar (very nice Astar)
http://qiao.github.io/PathFinding.js/visual/ (impressive library, but really too much)
http://www.93i.de/products/software/gamlib-ai (another interesting library)
How to deploy Panda.js game on Windows Phone 8 using Visual Studio.
Current syntax:
http://www.pandajs.net/tutorials/example-15/
Maybe something like this:
var anim = new game.Animation('media/frame1.png', 'media/frame2.png');
I tried the basic Particles Example here: http://www.pandajs.net/snippets/9756110.html and got the following error on chrome:
Uncaught TypeError: Cannot read property 'hasLoaded' of undefined
PIXI.Sprite
[stack trace ...]
game.Emitter.game.Class.addParticle
[stack trace ...]
The problem is on line 324 of particle.js. The constructor to Sprite is called with the X and Y first instead of the textures.random() for the sprite identifier.
The fix appears to be simple, just re-arrange the parameters to the constructor:
particle.sprite = new game.Sprite(this.textures.random(), particle.position.x, particle.position.y, this.spriteSettings);
I'm not sure why the emitter works on the two demo projects tho ...
I believe this would be one of the most useful features to add.
http://www.redblobgames.com/articles/visibility/
Does Enemy see Player? is a pretty common task to perform.
I can't pause and resume the sounds from cocoonJS, furthermore, the sound appears jerky.
It should be possible according to the example provided by Ludei, Multichannel Sound.
https://cocoonjsservice.ludei.com/cocoonjslaunchersvr/demo-list/
Am I the only one ?
The test code below works correctly in Chrome and Firefox.
src/game/main.js
game.module(
'game.main'
)
.require(
'engine.core'
)
.body(function() {
game.addSound('sounds/music.*', 'music');
SceneGame = game.Scene.extend({
backgroundColor: 0x808080,
isPlaying: true,
init: function() {
game.audio.playMusic('music');
},
mousedown: function () {
this.isPlaying ? game.audio.pauseAll() : game.audio.resumeAll();
this.isPlaying = !this.isPlaying;
}
});
game.System.idtkScale = 'ScaleToFill';
game.start();
});
Extend loader, so it can be used to load assets dynamically between scenes.
This is more to do with Pixi, but because panda is built on pixi and 1) it is a game engine that manages scene transitions and so must have encountered this issue (??) and 2) I have seen many quick and insightful replies from you on html5gamedevs.com I thought that I would ask this really important question right now here..
Could you please have a look at this and let me know if it is possible to clear out the memory for real when changing scenes? Has this been resolved somehow in Panda where pixi it seems fails in doing so?
If you think panda has solutions for better memory management, it could be nice to see the same test code attempted using panda.
Thank you so much ahead for any insights!!
Another very interesting advanced feature is the war of fog. Useful in RTS and rouge likes.
Unfortunately I'm not aware of any ready to use libraries for this.
sometimes the canvas is not visible after loading screen on firefox 27.0
Example (Doesn't work) simply for understand :
src/game/config.js
pandaConfig = {
sourceFolder: 'src',
mediaFolder: 'media',
outputFile: 'game.min.js',
};
if(game.device.android) {
game.merge(
pandaConfig, {
rateUrl: "..."
}
);
}
if(game.device.iOS) {
game.merge(
pandaConfig, {
rateUrl: "..."
}
);
}
e.g. https://github.com/ekelokorpi/panda.js-demos/blob/master/src/game/interactivity.js
Is still referencing SceneTitle and not working without modification.
Lots of room for optimization, cleaner code, better syntax.
not sure if I should post 1 issue per feature but it seemed overkill. So, is there any plan on including advanced features such as path finding, war of fog and line of sight?
As far as I understand tweenGroup now is just a way to assign the same settings to a group of tweens.
The idea under the tweenGroups is that you could actually have sprites with different duration/delay/etc and have the group onComplete event being fired only when all tweens completed.
I find this very useful -say- when you have the animation of a text or logo composed by many elements and you want to execute an event when all the elements have finished tweening.
Have a look at this demo for example http://www.youtube.com/watch?v=jL9uDN8m3dc
When the tiles are removed I make some random animations to a group of 4 or more tiles. I had to code a little tween library to handle the oncomplete event on a group of elements.
Hi @ekelokorpi ,
The jsDelivr is a great project which provides a CDN for some js projects. I think it's great to add the latest stable version of panda.js there. What do you think?
do you think an outline shader might be an interesting feature? something that automatically adds 1px (or more) outline to sprites (with or without anti aliasing)
Support tilemaps made with Tiled:
http://www.mapeditor.org/
Hi everyone,
This example doesn't works with CocoonJS. (without error returned)
Am I the only one?
src/game/main.js
game.module(
'game.main'
)
.require(
'engine.core'
)
.body(function() {
game.addAsset('media/logo.png');
SceneGame = game.Scene.extend({
backgroundColor: 0x808080,
init: function() {
var sprite = new game.Sprite(0, 0, 'media/logo.png');
sprite.interactive = true;
sprite.click = function () {
sprite.visible = false;
};
this.stage.addChild(sprite);
}
});
game.System.idtkScale = 'ScaleToFill';
game.start();
});
would be nice to have integrated events support such as "swipe" (+direction) and "shake". They are mostly useful on mobile I guess.
Nice engine you got here! :)
I was testing the Flying Dog demo in Safari on iOS 5.1.1 with a iPhone 4S and it halts on loading at 81%.
Add camera with follow, panning, zooming, easing etc.
Implement sitelock feature:
http://www.scirra.com/forum/construct-2-and-sitelock_topic53352.html
For leaderboards, achievements, advertising, in-game payments etc.
http://clay.io/
The parameter game.System.idtkScale is not taken into account.
The canvas appears at the bottom left of the screen without resizing.
For more advanced physics:
https://github.com/schteppe/p2.js
Example:
game.scene.addTween(sprite.alpha, 0.0, 1).start();
Need debug layer that will show hit areas for sprites and physics shapes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.