Mipey's Recent Forum Activity

  • Can't have a CS2 release without the bashing, huh

    Okay, then, I've to remain true to my title of the veteran bugfinder...

    I attempted to import numerous sprites (256 of them), so I decided to import them directly into the .capx. I open the file with 7-zip file manager, dump the whole lot of images (tile-1.png to tile-256.png) into Textures folder, then edit the .caproj file to include sprite objects.

    However, I get the following error whenever I try to open the project in C2:

    Failed to create file '\\?\D:\Users\Miha\AppData\Local\Temp\cap230F.tmp\Textures/tile1.png' for extracting archive'

    Two obvious errors here... the foreslash vs. backslash, also omission of - in the tile-1.png. I've tried renaming the file to tile1.png, etc., to no avail.

  • Sprite object has "Load animation frame from a file".

    Just loop through all frames at start of layout and load an image into each frame.

    Like this:

    + For "frame" from 1 to 8

    Sprite: Set animation frame to loopindex("frame")

    Sprite: Load animation frame from AppPath&"animations/character-"&loopindex("frame")&".png"

    What this does is loop through animation frames and load images from animations folder, such as character-1.png to character-8.png.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So, after a long and arduious search of a simple tool that would let me cut a tileset up into individual tiles that I could use in Construct 2, I realized something: why not just use Construct 0.x for that task?

    Thing is, I've been working on a simple roguelike in Construct 0.x and I wanted to try that in C2 as well. However, methods I use in C0.x don't work in C2, because there are no texture offset methods (YET!). Therefore I needed to get individual tiles out of the tileset.

    I have 256x256 tileset.png image, transparent. 16x16 tiles. I needed to cut them out of the tileset and save them as individual tiles in the .png format.

    So I started a new C0.x project, created a 16x16 sprite and imported 16x16 animation frames using the built-in animation importer. Now I had a sprite with 256 animation frame, each corresponding to a tile.

    Set the animation speed to zero (0). Don't want the animation to play.

    Then, I added the image manipulator object.

    Finally, in event sheet I made the following:

    + Trigger once (instead of at start of layout)

    + For "i" from 1 to 256

    Sprite: set animation frame to loopindex("i")

    ImageManipulator: Copy image from Sprite

    ImageManipulator: Save PNG image to AppPath%"tile-"&loopindex("i")&".png"

    Then I hit the preview and... done! In the project folder I found tile-1.png to tile-256.png files, each containing the correct texture!

    Importing all 256 into C2 is another issue, however, so I'll just conclude this here and now. Construct 0.x can be quite a handy tool to work with!

  • What is the text object's position? Is it whole or real numbers? Ideally it should be whole number coordinates, as text on real (float) coordinates renders differently, if I recall correctly.

  • No, no, I meant that you only load images at RUNTIME, not import them into .cap.

    So basically:

    + On start of layout

    Load a bunch of images

    Surely you've seen loading screens in other games? That's the idea, you only load the images and textures when you need them (on start of layout), then unload them when you don't need them anymore (on layout change).

  • What you are using is a very inefficient solution. You need to load animations well before using them, otherwise you get delays like that.

    Typically on layout start/transition.

  • You could instead use a variable to store an average timedelta over a certain time frame, say 1 second.

  • Didn't they release Chrome 10 just now?

  • Guess I'll just paste the link again: http://eloquentjavascript.net/contents.html

    Interactive javascript tutorial.

  • If you learn what crashes and bugs, you can work around them to release a stable game. But it of course takes time for trial and error.

  • Make it an application setting.

  • That could be done by folding sub-events into top-level event.

Mipey's avatar

Mipey

Member since 16 Jan, 2009

None one is following Mipey yet!

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies