Sestenes's Recent Forum Activity

  • [quote:5ie6wdu0]@rexrainbow: Could you please provide a sample capx? So I could fix this bug by this capx.

    Here's a sample of the problem I'm talking about. To see the problem, just load the game, select "Continue Adventure", enter any credentials you want to start playing. Use the arrow keys to wander around (don't go into the town unless you need to visit the inn) until you get into combat. In the battle screen, you will notice the extra line breaks when either you or the mob scores a hit. The text class I'm using is <class='red'>, and the style is just that, rgb(255, 0, 0).

    I defined the class on the "Styles" event sheet, and all of the other relevant code you'll want to see is on the "Ev Battle" event sheet. You will notice that I replaced the old txto_battleLog text object with one of your Tag Text objects, and called it txto_battleLog_NEW. Lines 47 and 50 are where I invoke the "red" class. On those same lines I have disabled versions of them that don't invoke the class. You can see for yourself that when you don't invoke the "red" class, there are no extra line breaks, but when you do there are.

    I assure you that the Tag Text object is plenty wide; there is ample room for the appended text (most any of the lines that may pop up shouldn't need to word wrap).

    In the sample screenshot you can see the extra line break I'm talking about, but oddly enough it doesn't always appear in the line where I invoke the "red" class. Sometimes it appears later in the text block. In the "Ev Battle" event sheet you can see that every combat round I append lots of separate lines of text, depending on what happens. So sometimes this extra line break appears further down the text than where the "red" class is invoked. Really odd.

  • My only complaint is if the text block has line breaks after a class. It seems to randomly add an extra line break. Hmmmm...

  • This plugin is a lifesaver. I was so disappointed when I discovered that C2 couldn't do this natively. Going forward, all of my text objects will be TagText objects!

  • Sestenes, xDevWizx - Does the method will gives negative effect to the performance (if you use too much tiles of sprites)?

    I doubt it affects performance much either way. For the most part, it's still just a single asset being repeated over and over.

    The way I do it is to go to View, and check Snap to Grid and Show Grid, and then set my Grid Width and Grid Height to half of the size of my tile. I choose half because otherwise the tiles will snap in to the center of the tile-section, and half of them will spill out of layout on the edges. If you choose half, then each of your tiles will cover a 2x2 grid of tiles, and you can line them up perfectly.

  • Derqs Thanks for the camera tutorial - great stuff. And your game looks better and better! I think the simple concept of town, dungeon, boss is wonderful. You really have something special here. Can't wait to try a demo!

  • The art is great, and the music fits pretty well, but I would either slow the game down a bit (maybe slow it down A LOT, but increase speed as you progress), and/or give the player fewer options at first, so that it is easy. I'm not saying the game should be easy, but the beginning should be, so that the player can become acquainted with the mechanics.

    Very slick presentation though. Lots of potential here.

  • This looks like a lot of fun. Love the old school 2D art and mechanics. How did you pull off the smooth camera, if you don't mind me asking?

  • I've run into this problem as well. I just avoid using tiled backgrounds entirely. I just use a regular sprite and copy it as needed to tile (easy if you are using a snap-to grid layout). Or draw my backgrounds in their entirety in something like Photoshop and then slap them on a BG layer. Maybe using tiled backgrounds is more efficient, in terms of space and/or performance, but they seem a bit buggy to me.

  • Nevermind, I figured it out. I didn't realize you needed to load the keys in the dictionary ahead of time.

  • I have found my error which was in the sintax of the dictionary c2 uses.

    Care to shed some light on that syntax?

  • I'm trying to figure this out too. I'm not sure what the correct php syntax is for formatting the json_encode() so that I can scoop it up into a C2 dictionary object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks ramones I know about that forgot to include it in my post but the problem was the format of the array after theubie's post i looked at php.net about json_encode the php needs to be formated in a certain way for json to encode it as I wanted.

    Thanks for both responses.

    The soloution is when building the array you have to put it into an array like so

    $json_data = array();

    while ($row = mysql_fetch_assoc($sql)) {

       $json_data = array(array(array(FIRST BIT OF DATA)), array(array(SECOND BIT OF DATA)), array(array(NEXT BIT OF DATA)), array(array(AND SO ON)));

    }

    $json_data = json_encode($json_data);

    echo '{"c2array":true,"size":[4,1,1],"data":';

    echo $json_data;

    echo '}';

    this example will ouput for a 4 x 1 x 1 array that with a json load in construct 2 will work and load your data in for you.

    Sorry localboss did not see your comment there till i come to edit this must have been typing my original out as you commented thanks for the suggestion i have managed to solve this now ace53422013-02-18 21:31:29

    I have scoured this forum for this solution for days now - thanks so much for sharing!

Sestenes's avatar

Sestenes

Member since 23 Apr, 2014

None one is following Sestenes yet!

Connect with Sestenes

Trophy Case

  • 10-Year Club

Progress

10/44
How to earn trophies