JJList's Recent Forum Activity

  • Sure, here it is! Exc3.capx

    But it's still really messy, i've stopped working on it ;c

  • Oh, I think my example is absolutely suitable for mobile devices, you just need to add touch controls :)

  • PixelRebirth Ah-oh teach me nao! Jk:)

    Actually, I'd really appreciate if you could point me in a right direction:

    1)Do you have a single Array? Is it 2d or 3d?

    And if it's 3d.. how "deep" is your array? (ouch this might sound wrong:P)

    2)Do you use recursion? Functions or just events&loops?

    Thanks in advance^^

  • PixelRebirth I totally agree:)

    It's just me, as a novice in C2 and general programming, always trying to "roll my own" solution instead of using examples:P

    Sometimes useful, mostly- complete waste of time^^

  • Same here, after a couple of hours of brainfu[storm]ing I've figuired out that it shoud be easier to do with arrays <img src="smileys/smiley26.gif" border="0" align="middle" />

  • Here's a new version, getting closer.. Example 2

    But it is still glitchy and overcomplicated:(

    There must be an easier and more stable way! I feel it:P and I'll find it >:D

    UPD: I guess I've fixed it :) Example 3

    It still needs optimization, but at least it's working now)

  • It simple go from top to bottom and from side to side and check the same value. What's a thing I loose ?

    I guess..

    In your "up" function, you had "for i from 0 to param()"

    Where I made it "for i from param() to 0", so it starts counting from param() and decrements to 0. Same for "left" I guess that might be the problem)

    P.S. Updated my first post with a fine working example:)

  • Hello!

    I've tried to fix your capx, and here's what I came up to link.

    I works a bit better.. a tiny bit:( Still needs fixing.

    May be you'll find a way to make it run as intended:)

    I'll keep trying too, and I'll let you know if I find a solution ^_^

    UPD: Allright, I've tried another way and kinda got it running:) Example 1

    So.. the answer is.. Tilemaps! :D God I love them.

    In this particular case, using a single tilemap replaces both Array and Sprites

    and saves us from some pain-in-the-butt with our code.

    Well my example works pretty fine, I guess.

    But! It now deletes only those tiles that are in the same row/col with the tile we click.

    And I think we need to check if every tile we delete has 3matching tiles..

    Sorry, hard to explain, I hope you get the idea:)

    To do this, we need a simple recursion.. but seems it's not working :((( Or I'm just doing something wrong :P

    Please let me know if you find how to fix it!

  • lennaert emoaeden

    Hello! Have you tried using TileMaps for this?

    I guess it might be a decent solution, as it redners insanely fast, campared to using a lot of sprites:)

    You can do something like this:

    Add a TileMap object to a separate layer, right above the layer with a map you want to cover with FOW.

    Create a single black 16x16 tile(or any other size you want, down to 1pix, it will still work relatively fast:))

    Add event on layout start -> set all tiles in TileMap object to 0(that will fill our tilemap with black tiles aka FOW, use "set tile range" action for this)

    So, we have our FOW and we just need to set up it's interaction with the Hero.

    Use something like : Hero moved -> erase FOW tiles at defined range from hero position.

    I hope you get the idea:) This method should work pretty fast and clear.

    I don't have time to make an example capx right now:( Will do it later.

    Untill then, check this topic. It's not exactly what you need, but it gives an idea on how to use tilemaps.

    Also there are examples of how to erase tiles at defined radius and defined position.

    Hope that helps!^_^

  • R0J0hound That is brilliant! <img src="smileys/smiley32.gif" border="0" align="middle"> Exactly what I expected to see!:D

    Tile/No tile works perfect if we want to use generated tilemap as a collision mask;)

    As for colored tiles.. Well, that might be a bit harder, but still possible :D Well, at least for 8bit color palette ^_^ 256 tiles, not too hard:)

    Here is a little demo of a 1pix TileEditor that I'm trying to create.. Not sure if it's useful:P But anyways, it's a nice chunk of experience for me:)

    I thought I'd have a bit more time to work on this one, so it is now at a very early state:(

    Right now you can only draw/erase tiles by hand, using simple brushes and 4 colors.

    Should've done it faster, but when it comes to drawing and setting up GUI interactions, I'm just too slow and pedantic <img src="smileys/smiley29.gif" border="0" align="middle">

    Works a bit slow in browser.. But it's pretty fast in node-webkit preview.

    I'm totaly going to include image-to-tilemap generation and save/load/export functions in later versions:)

    Also I'll try to implement zooming/scrolling and setting canvas(our entire tilemap) size.

    Plz let me know if you find any bugs! And also I'd appreciate any ideas on what functions should I add <img src="smileys/smiley9.gif" border="0" align="middle">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Btw, take a look at tilemap+physics :)

    link

  • My bad, sorry:) Fixed! link

JJList's avatar

JJList

Member since 2 Dec, 2012

None one is following JJList yet!

Trophy Case

  • 11-Year Club
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies