Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cydalone

Pages: 1 2
1
Shared Resources / Re: Eye Candy Pack (update)
« on: February 01, 2016, 03:16:23 pm »
Hi!
Same thing here: are there some 3.0 equivalent for most of these Eye Candy scripts? (yes, I've noted that some of them were featured within Stencyl, but others -like the Screen Displacement or Blur- seem to have vanished)
Thanks!

EDIT: shaders are probably the anwser!

2
No way...
I found what was going on.
The call was included within a deactivated "bracket comment". The original blocks for this list addition (those to be replaced with this one-line static function) were deactivated, as well as the englobing comment, and right with them I had put the global block (that did appear to be activated).
I'll try to see if this fixes the problem.

EDIT: I've replaced successfully all the previous calls. It works like a charm.
The *.STENCYL archive is now 4Mo smaller thanks to that.  Wow.

3
No, it does not print anything. That's why I said "The static function is not even called."
I've recreated the block four times already. I'll try to see if it works on a blank project, perhaps there's a strange interference from somewhere else in my game.

Thanks for your time, anyway ;)

I'll post here what happens in an independent near-empty game.

4
The corresponding code is:
Quote
public static function _customBlock_Global_add_one_keyboard_critter(__Actor:ActorType, __key:Float, __layerID:Float, __Coordo:String):Void
   {
      trace("" + "GLOBAL BLOCK OK: add ONE");
      Engine.engine.getGameAttribute("map_keys_full").push(__key);
      Engine.engine.getGameAttribute("map_actortype_full").push(__Actor);
      Engine.engine.getGameAttribute("map_layers_full").push(__layerID);
      if(("" + __Coordo) == (""))
      {
         Engine.engine.getGameAttribute("map_coordo_full").push("0,0,0,0");
      }
      else
      {
         Engine.engine.getGameAttribute("map_coordo_full").push(__Coordo);
      }
   }

It really is a static function. But indeed it feels like it works only as a public function.

5
Here's a sample of what I'm trying to achieve.
I have greatly simplified it to debug it, and came to the point where even the core action I'm expecting (updating a list) is not working.

The inputs "key" and "layer_ID" are numbers, "Actor" is an actortype, "Coordo" is a text.
When I use the custom block from within this behaviour, it works.

6
Hi!
I'm learning how to use the global custom blocks (aka static functions) to clean up my codes. Here's a problem I got.

To keep in one same place various parameters I use in the game, I'm keeping 5 different lists that were defined as game attributes. One is a list of actor types, another is a list of layers, and so on.
During the game, I want to update/empty/change these lists when I switch scenes.

I've built a global custom block to reinitialise these global lists, with the blocks "set MYLIST to create new list". And it works great.
I've also built another global custom block to refill these global lists, using input parameters (for instance "add [ACTOR TYPE] to actortype global list") with the block "add [something] to [some list]". But this fails. When I test it from within my behaviour "list of all static functions", it works, but not anywhere else. The static function is not even called. No error message either.
I tried to create a local copy of the global list, to add the new value to this copy, and then overwrite the global list with the updated temporary list... but I cannot create a local copy (a local attribute) within a global block; and making the temporary list a game attribute also fails.

My question is thus: can we fill a game attribute list with global blocks? if not, how could we do that?
(right now, I'm rebuilding entirely the lists with "when created" events, for each scene, with copied-pasted checks and safeguards... always a few pages worth of code, when I'm sure it should take far less if I could write these static functions)

Any idea? Thanks in advance!

7
Ask a Question / Re: Batch generation of lots of actors
« on: August 29, 2015, 01:21:46 pm »
Thanks a lot Justin!
I'll have a look (I'm already using and abusing Notepad++) and try a few things. It's already a clue!

EDIT: I tried, and it works pretty well
I can automatically generate the PNG sprite sheets and tExt chunks automatically, I "only" have to copy/paste by hand the NUL character that is somehow skipped in the XML header, then re-encode the tExt, include it in the former, and that's it.
It takes me a dozen seconds now, quite a gain of time compared to the 5 minutes it would have taken to define everything manually!
Thanks again!

8
Ask a Question / Batch generation of lots of actors
« on: August 29, 2015, 05:18:18 am »
Hi!

I need to create quite a few different actors for my game (about 200!). Each one of them will have 8 animations, the same behaviours, similar collision shapes. (I explain hereafter why I do not say "identical" collision shapes)

I found one way to do this: with TweakPNG I've extracted the metadata from one actor I defined by hand. Then I wrote a routine (outside Stencyl) to create all PNG of all the other actors I need, and I reinject the metadata within each PNG file so that I can import these new actors more quickly.

It works not too bad, except for two details:
- the name of the new actor is always the same as the one I created by hand. It's not hard to rename one actor, but I have to do that 200 times, while Stencyl allows for the simultaneous import of several actors! (but not when they have the same name, obviously)
- the sizes of my actors are not always the same, and the collision shapes also. Meaning the automated extraction of the animations, and definition of the collision shapes both fail. The latter effect is due to the fact that collision shapes are defined in pixels, while mine would be homothetically similar to each other (i.e. 50% of the sprite width, horizontally centered, 50% of the sprite height, centered on the bottom half... whether the sprite is tall, short, wide, etc)

My question is thus (if it's possible and not a top secret of Stencyl inner workings): how can I edit the metadata within the PNG files that Stencyl exports/imports? (for instance to automatically change the name of the actor and sizes of animations/collision shapes) Would there be a tool for that?
OR: Since I can edit the metadata with any text editor, what is the encryption/compression method used for this tExt?

Thanks!

9
Resolved Questions / Re: build 8529: can't test or publish game anymore
« on: August 23, 2015, 12:47:49 am »
Indeed!
thanks Justin!

10
Resolved Questions / build 8529: can't test or publish game anymore
« on: August 22, 2015, 11:10:55 pm »
Hi!
I've updated my version of Stencyl to the latest build available, and I can't test/publish the game I was making.
At first I thought the game was too large (30Mo) so I built a new sub-game to test what I was currently writing (the new part is only 1-2M). But still it won't launch anything, and the logs do not help :
[neko] C:\Program Files (x86)\Stencyl\plaf\haxe\std/flash/_std/Xml.hx:28: lines 28-418 : Field parent has different property access than core type
[neko] C:\Program Files (x86)\Stencyl\plaf\haxe\std/flash/_std/Xml.hx:28: lines 28-418 : XmlType should be XmlType
[neko] C:\Program Files (x86)\Stencyl\plaf\haxe\std/flash/_std/Xml.hx:28: lines 28-418 : Field nodeType has different type than in core type
Process 'neko' exited with code: 1
Failed: Building for Flash. (Return code: 1)

Er, I do not even know what this NEKO process is, and even less if I can debug it!

Any help or insights would be appreciated. Thanks!

PS: running Stencyl as an admin did not help either

EDIT: I reinstalled Stencyl from scratch, and now it works. It seems I cannot remove this post, though. Sorry for the inconvenience!

11
Bug Archives / Messy imported actor
« on: July 30, 2015, 05:23:31 am »
I exported an actor as a PNG file. In the metadata the behaviours seem well saved, but when I try to re-import that same PNG, the animations are messed up:
I still get 8 different animations (four "Walk" and four "Idle"), the parameters for the behaviours are OK. But the contents of the animations are wrong: the "Idle" ones are OK, but the "Walk" expect four frames, and only 8 are uploaded (instead of 16) in total. "Walk D" takes two frames from the initial "Walk U" plus two frames of the initial "Walk D", "Walk R" and "Walk L" are filled with four empty frames,  and "Walk U" takes two frames from both initial "Walk R" and "Walk L".
(I re-exported it, and re-re-imported it, with the same conclusion: the non-still animations are messed up)
It seems that, instead of loading a line of 4x1 frames, it's loading a block of 2x2 frames, omitting completely the rest of the lines, and filling the blanks with empty frames.

The only way I found to get over this is to change the shape of the PNG to load. And then I must insert back the metadata with Tweak PNG. Er, that's complicated. But it works.

12
Unfortunately, although I tried to use a limited number of layers (and in particular delete tiles that will not be visible below too much stuff), sometimes I have at most 5 layers of semi-transparent 32x32 tiles on top of each other !
(that's quite unfrequent, but still it happens, hence my choice; eg: tile #0 shows a wooden floor, tile #1 shows the side of a carpet, tile #2 shows the edge of a table, tile #3 shows a flower pot, tile #4 is a light/shadow effect with a 80%-transparent tile)

With this new approach (scrolling images), I'm keeping mostly only 3 layers: one background, one with tiled obstacles and actors, one foreground. Then if needed I can add one or two other layers for special effects (like fog of war).

THANKS!

13
OK, this lag is no surprise, then. Would you have any advice on how to counter this?

I have tested the option "go for scrolling back/foregrounds", took me 4 hours for one simple scene (make the screenshots, edit them for the animated tiles, create from scratch one tileset with invisible dummy collidable tiles, rebuild the obstacles in the whole scene, unplug then replug everything in all surrounding scenes), but the FPS has risen by a factor of 2!
Unless I find any other way, I will have to do that for all the other scenes, in particular the giga-one, and weep each time I need to change one detail...

Thanks!

14
Hi!

I'm building this RPG-like game with Stencyl. The Player roams through 2D scenes, and interacts with other actors (mobs, switches, etc). Zelda-like, if you want. I'm using Box2D because I want collision shapes to be more specific than full squares.
For all my actors, I've disabled Continous Collisions, rotation, gravity.

My regular/test scenes are 30x23 tiles, i.e. 960x736 pixels. I have about 7 layers per scene : two layers for the terrain/background, two layers for the furniture/obstacles/decorations, one layer for the player/actors, two layers for the canopy/foreground. I'm drawing only with tiles, 5% of them being animated (by the way, I don't understand the quote "break up concave polygon into 2 or more convex polygons instead" when defining collision shapes for tiles explained in the Stencylpedia, since the collision shapes of tiles above override the ones existing below)
For such scenes, the FPS is OK (20-25) until I get too many actors on screen at the same time. I hard-coded a limitation: there can only be 20 of them at any time, and I'm fine with this.

But I decided I wanted one big scene, for the main village, not divided into quarters/suburbs. It's 100x100 tiles (i.e. 3200x3200 pixels), and it should be OK, as I've read around here that scenes would tend to bug mostly when the width is bigger than 16k pixels. Again, 7-8 layers of tiles (most of them moderately populated). After 4 days of work, my scene is completely drawn, with tiles only.
Now I put actors in it, and I place my Player to test it (no point in testing it beforehand, as the collision shapes were not finished, right?).
Lo! Even without Debug Drawing, with a single actor (and only 3 behaviours: "Camera Follow", " Reload on Exit", and "4-way Movement"), the FPS plummets to 4-5!!!! I cannot sensibly add all the other actors I planned until I've solved this issue.

Would you have any idea to investigate what could cause this massive lag?
I'll test replacing parts of my layers (the ones with non-collidable non-animated tiles) with plain images as back/foregrounds, but this means I must change these images each time I modify a single item in the scene. Switching one tile would have been so much more convenient!

Thanks in advance for any hint or insights you could give me!

15
I have also seen this case. But not while trying to erase previous data. Sometimes, I get this message when I click on a button of a pop-up window to launch something (e.g. create a new object, and it actually launches), but my mouse happens to be a the same position as the "erasing cross" of an item in the folder view.

Pages: 1 2