• Content Count

  • Joined

  • Last visited

Everything posted by pstrejczek

  1. I would also vote for bringing back the modules list. I got used to it and it helped a lot with navigating the project.
  2. I have tried the beta on my Win10 machine and it works ok. Maybe it is somehow related to the project? @Ninjadoodle have you tried opening some other projects?
  3. @Ninjadoodle I'm using the beta on Mac (OSX 10.13.6) and have no such problems. Haven't tried on Windows though. I will try tomorrow on my Window 10 machine.
  4. Thanks, @enpu for the info. So the best way would be at the moment to use animated sprite or tweens.
  5. Thanks @enpu. I have already noticed that my loader does not work when the instantgames plugin is added.
  6. I'm finishing work on my game and plan to implement Facebook Instant features. I have a nice custom loader prepared, but in the instant games documentation I have found info that custom loaders are not welcome, and the best way is to report this with setProgress function of instant games SDK. I don't see this function implemented in the instant games plugin. What is the proper way to do this in Panda 2?
  7. What's the best way to play animated intro or some kind of cutscene in Panda2? @enpu - you have very nice Panda2 animation intro in your Diamon Dasher game. Is this a frame by frame animation with atlas? Or some kind of video format ?
  8. Awesome work @enpu ! Could you please put this in the examples section? This is quite important and I'm sure many people in the future will ask about this. I see there is a polygon hitArea in the roadmap for the next engine version (2.10). Does it mean detecting a collision of (for example) circle with polygon will be possible? This would be awesome!
  9. @enpu - Thanks for the explanations ... It's great we have so many interesting code-related engine topics on the forums. I'm learning a lot from them
  10. I have encountered this problem a few days ago .. but I have edited the .fnt file and simply changed the font name
  11. @enpu You are totally right - I have made those two mistakes - this code was actually a quick shot. It's interesting why this correctly worked with those mistakes ... If it wouldn't work, I would probably check this with the API. Anyway .. I work with the editor and engine almost every day in my free time, and still make that small mistakes ... Thanks for the example - I'm still learning proper use of the engine
  12. Answering myself ... I see there is icon button, and it should do the trick.
  13. I have a button to enable/disable sound. I have two images prepared for that button. One when the sound is enabled and one when it is disabled. What would be the proper way to change the texture after the button click? Is this possible?
  14. Yes. There is a container in the background which is invisible and it takes the "miss" mousedown events. When it is covered with containers with sprites - those containers pick the event as "hit". The container concept is, in my opinion, one of the best ideas in Panda 2 engine. It makes a lot of things very easy to do. This way you don't have to iterate over all the sprites in update function. You could also add the sprites to the stage inside MyClass, so you could keep all the sprites code in one place.
  15. This was actually an interesting topic for me, so I decided to give it a shot. Here is how I did it without update function and looping when checking collisions: game.module( 'game.main' ) .body(function() { game.addAsset('panda.png') game.createScene('Main', { init: function() { var bckg = new game.Graphics(); bckg.fillAlpha = 0; bckg.drawRect(0, 0, game.width, game.height); bckg.hitarea = new game.Rectangle(0, 0, game.width, game.height); bckg.interactive = true; bckg.mousedown = function() { console.log('Not sprite sound'); } bckg.addTo(this.stage); for(i = 0; i < 5; i++) { var sprt = new game.MyClass(i * 100 + 1, i* 100 + 1, 'panda.png'); sprt.sprite.addTo(this.stage); } }, }); game.createClass('MyClass', { init: function(posx, posy, texture) { this.sprite = new game.Sprite(texture, { x: posx, y: posy, interactive: true }); this.sprite.hitarea = new game.Rectangle(posx, posy, this.sprite.width, this.sprite.height), this.sprite.mousedown = function() { console.log('Sprite sound'); } } }); }); Maybe not the best solution in the world - but it works! I personally see no need for additional collision functions - everything I have encountered so far can be easily done with what we have.
  16. Do you create those sprites all manually or they are created in a loop an have the same properties ? You could create a class that extends Sprite and have the mousedown event handled there and then create objects of this class and set the parameters with the constructor. No additional loop for checking hit would be needed then.
  17. What object would you like your container to hitTest with? with a point ? The built in physics module makes collisions very simple, and you don't need to use any physics at all. You just set all the physics parameters to 0. That's what I do in my game - I have my own physics, but I use built-in physics for collisions. You just collide bodies, which can be of circular or rectangular shape.
  18. Thanks @enpu ! Everything is clear now and works like a charm.
  19. I have two fonts in my game. One of the fonts works. I add it to the scene with game.addAsset('font.fnt'). Then, in another scene, I have another font added the same way, but it looks like it still uses the font from the other scene. I'm aware of the setFont() function, but I don't know how it works. I don't know why there is 'Arial' in the example when the font files are font.fnt and font2.fnt. When I try to call setFont with my font filename as a parameter setFont('bigfont.fnt') the editor throws: Uncaught Font bigfont.fnt not found. The font is correct. When I replace the other font in other scene with this one - it works. What am I doing wrong ?
  20. I can imagine that kind of architecture, where you store your levels in modules. I don't know if there is a way in Panda2 to dynamically attach a module - but if there is, you could simply have a text file or json with list of modules which contain levels. You could then load them when they are needed. So you would have a core game app and levels as modules. In this approach, it would be possible to release the game with the level set you want. I know it forces a very good code design on the core game app side, but this way it would be very versatile. You could keep the game code as a whole, but release only what you want. The only problem would be assets - but I can imagine you could name them after modules (by adding some prefix to the filename) and attach them in level scene, so they could be just removed from the folder (just like modules) when preparing the release. I don't know if this makes sense. Just my 5 cents
  21. Ok. Solved. I use 720x960 resolution but forgot to set the system resize to true in the mobile section of the config.
  22. I guess this is rather obvious, but I wanted to clarify ... Is Panda 2 remote iOS app will work with engine dev versions or not? It does not work with the current one. I just got a black screen and FPS: 0.
  23. @enpu - I vote with both my hands for those features. If it would be easy to switch between those windows it will be super awesome. Those are the features which are missing in many code editors.
  24. Yes. copying the file to the project folder and being able to open it in Panda editor is great - it will help a lot. I understand that multi-instance could be a problem. If it is a lot of work - I think it would be better to leave it the way it is now. I'm not sure if it would be beneficial for anybody more than me so it's better to focus on more important features
  25. Actually .. since we are talking about the editor I have one question. I love Panda 2 editor and work on my game in my free time almost every day - the workflow is super easy. I make my game assets in Affinity Designer and I have continuous export enabled. When I make changes in Affinity Designer I can actually see the change immediately in the game window in the Panda2 editor, because it updates automatically when assets are changed - this is super awesome! There is one thing in the editor I would love to have. Maybe @enpu - you could consider this for the next version. When I write code, I like to look at the code of the templates or the code from my previous pet projects. I would love to be able to open more than one instance of the Panda2 editor - which is not possible (at least on Mac). I'm using VSCode at the moment to open the main.js file but it it is harder to navigate than in Panda 2 editor.