KrushBrother's Forum Posts

  • Yeah, I get the same error when trying to open that one.

    The only other instance of that happening (according to this site's search engine) is in the following thread, but it was never solved (or even looked at as far as I can see).

    http://www.construct2.com/forum/viewtopic.php?f=3&t=535

    Maybe worth sending Ashley a PM asking him if he'll take a look at the cap file.

    Maybe the header of the .cap file got corrupted, and he might be able to fix it.

    Krush.

  • Tried to open it, but it shows a missing plugin (spritefont) which I don't use.

    So I can't really help any further, sorry.

    Krush.

  • Keeping an object that follows a mouse snapping to a grid is very simple, and you'll find lost of examples of it on the forums.

    But here's how to do it, along with an explanation of the logic behind the maths.

    To snap an object to the mouse for a 32x32 grid (for example), you update the objects position like this:

    (Pseudo Code)

    ObjectXPosition = Int(ObjectXPosition/32)*32

    ObjectYPosition = Int(ObjectYPosition/32)*32

    ...changing the 32s to whatever grid size you want.

    Now, it looks like it's just dividing by 32 and then multiplying by 32, which would seem to get you back to the same figure, but the important part is the INT, and the brackets.

    By dividing it's position by 32 and then turning it into an INT, you effectively cut off anything that's not an exact division of 32.

    Then you multiply by the second 32, which multiplies the new Integer value, and you have your exact, on-grid position.

    For instance, Int(35/32)*32=32 [the value 35 becomes 32, as would values like 49 or 57]

    Int(73/32)*32=64 [the value 73 becomes 64, as would any value from 65 to 95]

    Krush.

  • Sure.

    Any graphics you create yourself in a graphics program have to be saved in one format or another, and you've said you are saving yours as jpg.

    Firstly, I'd recommend going back into your paint package and saving out as BMP if you don't need any transparency, or as a PNG if you do need transparency.

    But to be honest, I think there's something else going on here, because JPEGs do work fine with Construct.

    As for the points you marked out, I do a lot of 3D modelling in 3D Max, and the mainstay format for models is TGA, but when I first came to Construct, it became clear that TGAs didn't work well with Construct.

    It was only mentioned just in case TGA was the format you were using.

    The other point you marked refers to the options you are given when saving a graphics file.

    Saving TGAs gives you the option to compress the texture when saving, and PNG gives you the option to save as interlaced.

    Again these were mentioned just in case you were using either of those formats, which we now know isn't the case.

    I still believe that it looks like the graphics card drivers.

    I've had similar looking glitches when my drivers were out of date (for instance when I first bough MineCraft I had lines like that in-game), and updating the drivers was the only fix.

    Krush.

  • What file format are you importing?

    I find the PNG is by far the best file format for importing graphics with transparency, and BMP bitmaps for anything that doesn't need transparency.

    Although I use TGAs for 3D modelling, I stay away from them for Construct because there were a lot of problems (don't know if that's still the case).

    Remember, if you're using TGAs, make sure they are uncompressed, and if you're using PNG, make sure they are not interlaced.

    Edit: You didn't say which program you're using to create the graphics with.

    Krush.

  • The first step would be to make sure you install the latest graphics drivers for your card, and try again.

    Krush.

  • Well, I'm still enjoying playing with this, and have managed to get a decent test level editor working, but that was just a way of getting to know the S plugin.

    Now I'm ready to start on the level editor for the actual game, I want to approach it a different way.

    What I want to do is have Super called "LevelPack" (for instance), and in that Super have many "levels", each of which will comprise of:

    2D array1 (32x20) - numerical array

    2D array2 (32x20) - numerical array

    2D array3 (32x20) - numerical array

    2D array4 (32x20) - numerical array

    2D array5 (32x20) - numerical array

    Level Name - String

    etc

    In other words, I want to use S like a standard 2d array for the level data, on several layers, along with things like Strings for the title of that level, etc, and have each set of this data in it's own "level" Super, and all the "levels" contained in one "LevelPack" Super, so it can be packed up and encrypted, and when loaded into the game, I can access each set of level data, and read it in a way to build each level when needed.

    I can't see any simple way to use S for 2D arrays, or any tutorials on this.

    Maybe I'm over-thinking it, and it's right in front of me.

    Any help appreciated.

    Cheers,

    Krush.

  • I prefer WE7.

    I've been with them since the beginning, and haven't found any others that work as well for me.

    Krush.

  • Ah, another image manipulator bug perhaps?

  • Not sure if it's just the pseudo code you've posted, but it doesn't look like you're checking the value at x,y, but instead just using a single currentindex.

    Other than that, check you're using the correct type of mouse coords.

    It looks like it should work otherwise.

    Krush.

  • Well, I've had a play around with various tests of saving data, both unencrypted and encrypted, and it looks like it will fit the bill nicely.

    I'm now looking at your example of a level editor, before I start adapting my current editor for use with S, but I'm wondering if I am indeed using an older version of S, as I feared in the above post, or whether I'm missing something.

    <img src="http://dl.getdropbox.com/u/1013446/s/ondrag2.png">

    It's the .tt("blue") part of the create object that I can't fathom.

    I've tried writing it as an expression, but it won't accept it.

    If I have a criticism of S, it's that the description in the editor doesn't match the output text, so when trying to follow a guide like your level editor, it's hard to see which command you're supposed to use.

    Anyway, am I using an old version of S, or is there a simple answer to my problem?

    Cheers for any help.

    Krush.

    Edit: Ok, looking at your example cap, I can see that it's S.tt("blue"), which of course makes sense, but it wasn't that clear in the editor with the S icon in-between the S and the .tt.

    Kudos on the plugin though.

    The deeper I dig, the more uses I can see for this.

    Why didn't I look at this ages ago? lol

  • Thanks Lucid.

    I've just had a quick look at the tute, and I can see that it's going to be perfect for what I want, and shouldn't be too difficult to use (although I will be making regular saves and backups until I get it working 100% )

    I wouldn't mind a link to the very latest version though.

    I'd hate to download an outdated version that gives me problems.

    Krush.

  • I haven't taken a proper look at C2 because of the absence of an .exe exporter (let's not go over old ground, we've already been there), but I see no reason why C2 wouldn't be better than C1.

    They've learnt a lot whilst writing C1, and when all the features are in place I'm sure it will be great.

    I may even give it a try sometime, but probably not, because of the absence of....ahem.

    the fact that pc gaming is shrinking

    Lol, the death of the old grey slab has been greatly exaggerated over the years.

    I remember about 10 years or so ago, we were being told that the PC was on it's way out by the media in every corner it seemed, and with the likes of Command & Conquer, PC games kept hitting the top of the charts.

    We saw a similar thing 4 or 5 years ago from the media, including the UK TV Teletext magazine "GameStation" where the PC was being given it's last rites.

    And now once again, no doubt from a narrow poll that doesn't reflect the full demographic, we hear that the PC will not survive the next generation of games consoles.

    Hmm, MineCraft anyone.

    Krush.

  • Once again, I owe you Pixel.

    Thanks.

    It's good to know that I should persevere if I get crashes with it, as it could be errors in my code.

    Without that knowledge, I would probably blame the plugin, and stop using it.

    My level editor has 5 layers, different sprite sheets of 128 sprites for each layer, as well as level name, author name, and other special instructions specific to the level, so cramming all that into one object/file per level sounds just what I'm looking for.

    I owe you another pint.

    Krush.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Having almost finalised the level format for my side-project, I'm going to be looking to save the level data in a binary format, either encrypted or normal, and I think I remember someone mentioning that the S Plugin is useful in this regard.

    I don't have the S Plugin, as I haven't needed it up to now, so I was surprised to see that it wasn't in the list of completed addons.

    Which begs the questions;

    a) Will the S Plugin do what I need, saving a mixture of numerical and text data to a binary file, and allow me to load it back?

    b) Is the S Plugin finished and stable, and can it be relied on in a game?

    Krush.