Zebbi's Forum Posts

  • Hi ! I recently stumbled upon this neat little API for pathfinding and thought it would be cool to wrap it up inside a plugin/behavior for C2. I thought a behavior extending the official tilemap made the most sense for this so here goes :

    live example (Drag and drop the blue/green square, and right-click to add/remove obstacle.)

    example capx

    behavior files

    easystar demo done in C2 (need moveTo behavior)

    live version

    The behavior is rather straightforward, just hook it up to a tilemap, define walkables tiles with the appropriate actions and you're set. It uses a tag system so you can make multiple find path calls simultaneously, and EasyStar.js allows for asynchronous calculation if need be. Just try it out !

    edit: corrected links, added another demo

    New behavior files v1.01

    v1.01 has an updated core (now using EasyStar 0.2.3, slightly modified to accommodate C2)

    Key features are an optimized algorithm, possibility to add specific costs at tile coordinates, option to enable/disable corner cutting when moving diagonally

    Does the example work properly with the updated files? Doesn't seem to draw the route properly?

  • > Is GPU scaling still expensive to use?

    >

    Nope, but rendering is. Anyway, canvas resizing will not help, you need another way, maybe shaders or effect, or maybe you can try to resize everything in your game to make it look as needed.

    Ahh, is canvas resizing not the same as using a shader to accomplish it?

  • Wow, I'm gonna take a serious look at this. Thanks for sharing with the community, mate.

    No problem! Please do let me know what you find, any bugs or what not!

    I have the garbage bin there to remove items from inventory, as you can imagine it would be easy to use that function and switch it for whatever you need like, giving an item or using it, just click the item on the bin to remove it

  • > maybe doing an extra *1.2 on the height might work?

    >

    Well, it will maybe look how you want it to, but the performance will be really bad, imagine this on 4k display, your game will render on 8k or more, then stretch to screen size. I guess it's not possible in c2 to render the game in one resolution and then stretch it to another resolution, other than screen resolution.

    Hmm, wish I could read proper code and I could figure out how ScummVM does it and try and work that in Is GPU scaling still expensive to use?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This isn't a plugin matriax but it works!

  • I've done it!

  • EDIT: R0j0hound's new and improved version with MUCH tighter events! https://dl.dropboxusercontent.com/u/542 ... y_mod.capx

    Okay, it's based HEAVILY on the brilliant idea of AlexFrancois and I used his post example as a launchpad (here's the original post: how-do-i-make-a-simple-inventory_p934190?#p934190)

    I've hard-coded a lot of the stuff, so preferably a forum genius could tighten the code up and optimize it so it's more dynamic for folks wanting to use it without learning through the code, but here goes, v1.0 of the Z(ebbi's) A(dventure) G(ame) E(ngine) Inventory source! https://www.dropbox.com/s/cfbhwiuhjvbux ... .capx?dl=0

    Feel free to use it, if it's actually of any use to anyone, as you can see, there's a couple of variables to sort out the current page, I WISH I could have gotten modulo to work to decide how many pages there need to be (for instance, if there's between 1 and 3 over the remainder of a division of 4) but so far, this will work for up to 16 items, more can easily be added by adjusting the code.

    Hope it's of use, I'll keep working on the rest of the engine and sharing it as it's completed. PLEASE feel free to improve it and tidy the code and post you're updates, it could definitely do with it! <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused"> <img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing">

  • Dunno, i use Fullscreen scaling: Low Quality + 1280x720 canvas size to make my games render faster on these WQHD and 4k mobile phones, same thing as TS requested. Maybe something like Fullscreen scaling: Low Quality + OriginalWindowWidth*2 x OriginalWindowHeight*2 will double the resolution, but not sure about stretch after the scaling.

    maybe doing an extra *1.2 on the height might work?

  • > Did this happen?

    >

    Yeah, System > Set Canvas Size

    What's the correct way of doubling the resolution to x2 (or tripling to x3, quad with x3, etc) and resizing the height by 1.2 to create old-skool rectangular pixels? Like how they aspect correct in SCUMMVM by doing a scale and changing 320x200 to 320x240 after the scaling?

  • Did this happen?

  • If you notice a lot of old games were designed at 320x200 to be stretched to 320x240 so the pixels were rectangular, I've tried a scale shader on the layout that makes the vertical height 120 to emulate the 1.2 height difference, but it was inconsistent looking and needs to be applied after the screen size is upscaled higher than 320x200 (x2, x3, x4, etc), is there a good way of doing this in C2? ScummVM and dosbox have aspect ratio correction using shaders, but I'm not entirely sure how to do this in C2?

  • Thanks, that's really helpful! As promised, here's a bit on SCUMM dialog by Ron: http://www.pagetable.com/?p=614

    [quote:309g84je]This is the command that walked an actor to a spot.

    actor sandy face-right

    actor sandy do-animation reach

    walk-actor razor to-object microwave-oven

    start-script watch-edna

    stop-script

    stop-script watch-edna

    say-line dave "Don't be a tuna head."

    say-line selected-kid "I don't want to use that right now."

  • I used variables and text in a specific event-sheet, triggering them on purposes. It's easy to translate later, easy to manipulate the event-sheet out of C2 (it's a xml), easy to follow and organize (just drag and drop), easy to change, and it's visual, searchable, fast =]

    Subscribe to Construct videos now

    Really? Sounds interesting, how did you associate the variables with dialog lines in a readable way?

  • A slightly simpler solution without using arrays:

    Use System condition|Compare two values:

    If (value-1%4) is equal to 0

    and value > 8

    Set button visible

    else Set button invisible

    Hmm, I tried

    Inventory.Width-1%4 = 0

    But it only seems to work when there's 1 item in the array (after having 0 items in the array) but not again on 5 items?

  • It certainly could be useful, however, the file data format is probably not the first issue to worry about... unless you went for XML. XML might be the more logical choice actually... given its versatility.

    Trying to figure out where to start! I notice Tim Schaefer and Ron Gilbert have mentioned on numerous occasions of writing the dialog directly into the code, obviously they would have different lines for language translations and such, but they nevertheless mention writing it directly in the code, which in this case would be ScummC or whatever he called the engine. Al Lowe did the same with LSL if that's important. I doubt writing hundreds upon hundreds of lines of dialog in a separate event sheet would be as flexible as external file, though, would it?

    I'm also thinking about line length, that would be done using a multiple of the character count of each sentence? So, long sentences would last on screen longer than short ones. Then there's voice talkie, if that were to be considered, every line would have to have this character length/on-screen time ignored so the line changed when the sound file was finished, should talkie be enabled.