Arima's Recent Forum Activity

  • <img src="http://i47.tinypic.com/x3cqol.jpg">

    Agh, sorry, I misinterpreted what you were trying to do, and messed up the example regardless. Here it is fixed:

    event 1 conditions:

    • On space pressed

    event 1 actions:

    • set 'spacepressed' to 1

    event 2 conditions:

    • If variable 'spacepressed' is 1
    • If variable 'on' is 1

    event 2 actions:

    • Sprite: set x position to sprite.x+64
    • set 'spacepressed' to 0
    • set 'on' to 0

    event 3 conditions:

    • If variable 'spacepressed' is 1
    • If variable 'on' is 0

    event 3 actions:

    • Sprite: set x position to sprite.x-64
    • set 'spacepressed' to 0
    • set 'on' to 1

    event 4 conditions:

    • Always

    event 4 actions:

    • set 'spacepressed' to 0

    If that doesn't work I'll make an example.

  • Wow. Seriously, stop for a second before hitting that post button and think about what you're saying for a sec before actually saying it.

    Construct is a huge project VERY VERY GENEROUSLY made for free by two/three guys in their spare time. Calling them lazy is RIGHT OUT, and insulting the people on the forum is uncalled for as well. Knock it off, and learn some politeness. It'll get you a lot farther to be polite to people than to fling insults about them.

  • I use a variable. For example:

    if space is down

    • Set variable 'space' to 1

    if space is not down

    • Set variable 'space' to 0

    If space is pressed

    If variable 'space' is 1

    • actions - set space to 0

    The next event that checks if space is pressed, if it's 0, it won't run. There's probably a better way but that's how I do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The first method doesn't work because you enable the group "off" after running the first event, which means that the second event is run in the same frame as the first, moving it back before the screen is drawn.

  • I seem to recall once hearing something mentioned about the possibility of including the required files in the executable so people who had older versions of dx9 could play without having to install anything. Is that a possibility?

  • I would have responded earlier, but the forums wouldn't let me post for a while.

    So when you write 'ABCDEF' etc... each letter has a gap between it and so it crops and makes an image out of it?

    Yep, except for the cropping part (as mentioned about the image manipulator's crop feature not working). It's actually using layer masking to 'clear' the rest of the font sprite away aside from the current letter.

    If you want to implement it in construct, that'd be awesome!

    What happens with fonts that intentionally have gaps in individual characters?

    Exactly the same thing as with other gaps, it will be made into a separate image, so it won't work with some fonts.

    lucid: I thought about doing that (checking for horizontal gaps using the same method as checking for columns of pixels, then checking each row like the font splitter currently does) when I was thinking about the sprite sheets thing, but thought it wouldn't work well due to the semi-chaotic way sprite sheets are sometimes set up. However, with an image like that, it would work well. David might make my font splitter obsolete, though.

  • Ah. Well, sorry I misunderstood then.

    The fonts need to be written entirely horizontally, as it checks each column of pixels for a letter. There's an example image in the .zip that shows how they need to be arranged.

  • lol - yeah, that needs to be advertised more as a feature.

    As a font splitter, I don't mind making it a community project, but I don't think it really needs to be - if the cropping feature in the image manipulator gets fixed, cropping's a cinch. All I need to do is run a loop through the image to check for the letter same way I'm checking via collisions (except checking each pixel for alpha) then crop.

    As for the other features, essentially making it a general-purpose sprite sheet splitter if I understand what you're aiming for, I'm afraid I really am too busy to put that much work into it. This was meant to be a font splitter, not a sprite sheet splitter. I made this one because the design is simple and based off of things I'd done in the past, so I was confident I could whip it up quickly. If I could think of some quick way to do it, I would consider it, but I can't atm. If anyone else wants to make a sprite sheet splitter out of this though, they can. It's not like I'm patenting the technique.

  • Hmm... a good point, but without being able to resize the canvas to contain how much is pasted to it or crop via the image manipulator, I don't know how to get it to do that.

  • Automatic font splitter made.

  • I actually tried both resizing the canvas and using the image manipulator's crop feature, and neither worked. Resizing the canvas, it ignored its new size and continued acting as if it was its original size. I tried making a bunch of instances of the canvas then picking the one that was the right size, and all the images came out blank. I tried making lots of different canvases then using a family, and it wouldn't work at all.

    This was the best i could get it to work - and since with construct you can press alt-crop in the image editor to crop all the frames in an animation, does it really matter?

    Edit: Since I couldn't control the size of the canvas, I thought it best to leave it that size in case someone wanted to make a large font.

  • Edit: updated! Now exports alpha properly(didn't realize it didn't before)!

    New version:

    Old version:

    http://www.amirai.net/misc/fontsplitter.zip

    Here it is, the automatic font splitter. Just put the image of your font in the same directory as the .exe/.cap, and run. The image needs to be a .png named font.png with a transparent background, as it uses alpha for collision checking. It checks for letters top down column by column, so make sure you put a space between each letter or if they're too close together it might not be able to tell. Also be sure to put all of the letters horizontally.

    This sucker is open-source freeware, so distribute/use it however you like. I don't recommend modifying it much though - there were a lot of bugs to get past to get it to work.

Arima's avatar

Arima

Member since 11 Jun, 2007

None one is following Arima yet!

Connect with Arima

Trophy Case

  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

19/44
How to earn trophies