Minor's Forum Posts

  • No doesn't work for me.

    Tried adding the solid attribute and then removing it and it still didn't make any difference to the sprite. Using latest unstable build.

  • Python lists work very well, if you aren't afraid of using Python. You could set a few methods to easily modify the array and retrieve information and then leave the rest in backend.

    Yep I'm very afraid of python Mipey, too many brackets & stuff. Proper written programming languages and me don't mix, I have tried since the late 80's but nothing ever sticks. The only written language I ever got a decent grasp of was AMOS on the Amiga, and when I say decent I mean it went further than

    10 print "Hello"

    20 goto 10

    Speaking of Python, it also has array objects that can be imported via the internal array module or the external NumPy module. It may be a bit more than you'd want to bite off right now, though. The 3-D array that you're using should work fine, too.

    Don't short-sell your abilities, Minor. I've considered doing this sort of procedural generation in the past, but the idea scared me away before I even got started.

    Anyway, just because I feel compelled to point it out, this application practically begs for http://en.wikipedia.org/wiki/Bitwise_operation">http://en.wikipedia.org/wiki/Bitwise_operation</a>]bitwise operations. Unfortunately, I don't see any support for them in Construct, other than through Python.

    Basically, you can just use a 2-D list or array which contains integer values. Each integer value can have different bits set for any given on/off or true/false state that you need to track. For instance, you can keep the status of bordering land in the four cardinal directions in four bits. Expressing the values in binary notation (with 0b prefix) makes it more obvious what bits are set.

    0b0001 (if land to north)

    0b0010 (if land to south)

    0b0100 (if land to west)

    0b1000 (if land to east)

    You can set the bits with the OR operator (|):

    0b0001 | 0b0100 ( = 0b0101)

    and test them with the AND operator (&):

    0b0111 & 0b0100 ( = 0b0100, testing for bit 3 set)

    Bah, too much to go into here, really. Feel free to ignore the whole bitwise thing... Mostly just me reminiscing about 8-bit computer programming practices that aren't widely used anymore.

    Keep up the good work. I like your creations so far.

    Thanks encouragement and for the info . Bitwise does seem like something that would make what I'm trying to do a bit easier.

    Right now on with an Array-Loopy question.

    How would you go about extending a loop? for example: Below is my Array #=sea 1=land

    #####

    ##11#

    ##1##

    #####

    #11##

    #1###

    #####

    I want to scan the array to find land that is connected to another piece of land and give each the same number in a "z" index/cell/slot/thingy. Then find the next land unconnected to the first and find the land connected to that land etc. So my array above would look like this:

    #####

    ##11#

    ##1##

    #####

    #22##

    #2###

    #####

    I know how to use the array to check neighbours as I use that for the Cellular automata part of the project. It's just looping through grouping them via a number per land mass and finishing the loop without it going on for ever.

    Does that make any sense?

    Thanks again for all the help. I really am learning stuff here that I never thought I'd learn .

  • Thanks again newt.

    I've updated to the newest unstable build because when I remade your example it didn't work, I'm guessing the Array Object was bugged in 0.99.82 or whatever version I was using.

    I can't see this being the last time I'm going to need help with loops though .

    Thanks again

  • Thanks newt I had a feeling it was doing something like that.

    Can you or anyone help with creating the checking loop? I have tried but however I structure it, it seems to be infinite and just keeps spawning objects. I also downloading an example but that seemed to loop infinitely too.

    But I would expect that as I've never used loops before. Construct is great for learning new stuff.

    Thanks.

  • Hello again.

    Can someone tell me why in this .cap it makes too many objects from my Array?

    http://dl.dropbox.com/u/1646976/arrayproblem.cap

    It creates the right number of black sprites(5) = Array Value 1

    But creates twice the amount of red sprites that there should be. I have tried using the "Z" index in the compare condition too but still get the same outcome.

    I have tried a loop to but it goes on forever no matter what I try.

    Any help would be great.

  • I love that you're generating maps via cellular automata. If you want another challenge, try doing it with Perlin noise (it makes for some excellent landmasses!)

    Thanks .

    I know we've got a perlin noise plugin but I've never used it.

    This is a learning excerise for me, I'm a really terrible programmer and a math dunce, so I set myself a challenge to learn a bit about arrays & procedural generation algorithmns.

  • Use the colour 255,0,255 to fill the area you want to be transparent. This is the "Magic Pink" colour that Construct and other programs use as transparent.

  • If you use the picture editor to make your icon, or open a png or bmp file in the picture editor, then it supports transparency.

    I've created transparent icons for my games like this.

  • Thanks newt.

    Your explaination is similar to my neighbours thing. I check in 8 directions from the current cell, if that cell is land or 1, I add 1 to a global variable then store the global variable in the z2 cell of the current cell, clear the global variable and move onto the next cell.

    Currently in the map each cell in the array represents a 4x4pix tile on screen. Now I'm going to have another play and see if I can break down the map to 2x2pix tiles using your explaination.

    I've learned more about Arrays in a day than I have in my whole life thanks to you guys and Construct.

    <img src="http://i19.photobucket.com/albums/b170/mr_flibble_hhah/Games/pgmap3.gif">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the input guys .

    Again my lack of any real maths skills may hold me back.

    The array I'm currently using is multi dimensional so I'll try to add a few more 'Z' slots/cells/whatever they are called. Currently though it just stores whether the cell is land or sea and the number of land neighbours it has so I can run a few passes of "Cellular Automata" on them.

    I've also got it to make a basic sea depth and land height over the map.

    This is really my first play with arrays so I'm expecting this to be a long bumpy ride.

  • Hi Guys.

    I've just been playing with procedural generation and arrays. In the past I've never been able to grasp them but Construct has helped me a lot, although I think my below average maths skills may hold me back from what I would like to make. I'm just wondering if it is possible to split an array.

    eg 5x5 Array - Just 1 value for simplicityin x1,y1.

    10000

    00000

    00000

    00000

    00000

    then turn it into a 20x20 Array, so x1,y1 is now 4 cells. But I need to keep the value at x1,y1 from the 5x5 Array - and place it in x4y4. And obviously if more values were stored in the 5x5 array they would have to transfer to the 20x20 array too.

    0000

    0000

    0000

    0001

    Does that make any sense? Basically I want to add more detail to the island below by splitting it into smaller chunks.

    Here's a current generated island - with sort of depth added to the sea.

    Hope that makes sense to someone. Any help would be fanny-tastic .

    **EDIT**

    Please translate any help into either "Simpleton" or "Baby Talk" otherwise your great help may go right over my head.

  • Quick field of vision example.

    http://dl.dropbox.com/u/1646976/rogue-fieldofvision.cap

    Uses a Canvas so depending on the size of your Layout it might not be very efficient. But for a small layout it works very well.

  • Here's a quick cap for rogue-like movement

    http://dl.dropbox.com/u/1646976/rogue-movement.cap

    Made with 0.99.82

  • New TIGSource Competition is go.

    Official Thread at TigSource

    Anybody going to enter?

  • Cap requires Lucid's SpriteFont plugin. Link to save searching:

    I've only had a quick look at the CAP, but it looks really nice - well organised, extremely well commented, and pretty modular too. Hope you don't mind if I post a link on my blog.

    Thank you GMG. And thanks for putting the tutorial on your blog . I have a link to it on my blog - Construct needs way more exposure.

    This is way cooler than Sokoban

    Thanks

    I might do a Boulderdash clone next. Maybe Skull-der-Dash.