PixelRebirth's Forum Posts

  • You could still use Perlin Noise if you wanted a cave-like structure. Which I'm guessing from your description is not what you're actually aiming for.

    As far as I can tell, this means creating some kind of function to replace the Perlin Noise. Any thoughts?

    Well, yeah. I'd say you should make up your own events to achieve this. I came up with an overly simplistic frame-controlled approach for example:

    http://dl.dropbox.com/u/2306601/mapthing.cap

    Probably not the most sophisticated way to do something like this, but maybe it'll give you some ideas. There's so much that you can do fiddling around with Construct.

  • I'm trying to get Construct to generate a grid of tiles, with a predefined width and height of the grid. I also need to be able to give the squares a semi-random private variable that will determine what kind of 'terrain' that they will be - dirt, stone, air, etc.

    I've thought about using an array or loops to do this but I have no idea how they work. Anyone have any idea how to do this?

    An array would be exactly what you would want to use. And you should probably look into the Perlin Noise plugin as well, as it's great for creating random terrain and things alike.

    There's some stuff about that on the forums. But for simplicity's sake I just created a very basic example, which uses an array and the perlin noise plugin to create a crude map from sprites. It's only 2 events!

    http://dl.dropbox.com/u/2306601/simplearraymap.cap

  • I have to admit that I didn't quite follow the ongoing discussion between you guys and chances are I might have missed something important (looking at all that pseudo code).

    But if you only want to create a flat iso terrain from an array it could be simply done like this:

    http://dl.dropbox.com/u/2306601/simpleisotest.cap

    Or am I missing the point?!

  • But while it is a very good example I am a little confused on how it works. How can I add pictures to the bottom of the Cards?

    All the pictures for the cards are simply frames of the card sprite. The back of the card is the first frame.

  • Another miracle: Where exactly do you say how big the array should be?

    To the left in the properties bar the X, Y and Z dimensions of the array can be entered.

    What does the "For each element" condition do exactly? I guess it is a loop?

    Indeed. It loops through all the elements of the array.

    What is "Array.CurrentX" exactly?

    When you're looping through the elements of the array, Array.CurrentX describes the current X position.

    And if you haven't done so already, you can always take a look at the wiki: http://sourceforge.net/apps/mediawiki/construct/index.php?title=Array

    Oh, and since you're asking about Perlin Noise and arrays to create a random landscape you might learn one or two things by looking at the source of my older Perlinscape thingie: http://www.scirra.com/forum/viewtopic.php?f=4&t=5084

  • I have seen the true power of Construct on Scirra's Russian site.ProjectStar2 is the most awesome game ive ever seen as far as 2d games go.

    Not to diss this game or anything. The level of presentation surely is something to watch out for... but how exactly does this show the true power of Construct? We have seen more impressive things in terms of coding/events. Just think about Arsonide's space project that procedurally generates a whole universe or the hires animation stuff that lucid did or some of the great things Quazi and other people are creating on a regular basis.

    The boss is absolutely fantastic.Did they use python script for ProjectStar 2 or did they use Construct's built in library of event's?

    I believe there's nothing in this game that would require python scripting. It all can be done with pretty simple eventing. I think you may be overwhelmed by the visuals and a lack of own experience with Construct.

    Construct is the best 2d games creator in the universe!!!

    Can't really argue with that!

    And thanks for posting about this promising game!

  • Ah well, Tokinsom said it already but since I typed all this...

    Hi,

    The video below (nearly at the end of the video):

    shows how the animation 'Fall' alternates with the animation "Idle' instantly without having any key pressed.

    The player is a simple object with a platform behavior and the crate a simple solid object. I have not implemented events concerning the player control and his animations.

    I don't know how to avoid this. Any idea?

    Always use a dummy sprite handling the actual collisions (or the collision mask feature). My guess is that you're handling the collision directly with your player sprite, which changes in size from frame to frame. Therefore the collision box changes each frame too. And since there's a significant change in the size of the Falling and Stopped animations, it results in the jerkyness you've shown in the video when standing near an edge.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Seems like a good one again. Yay for working physics!

    Thx devs, keep em coming!

  • talk to Quazi or Davioware they are the brains behind that.

    Yes, those are the famous Quazi Blobbers.

    Basically this works with physics and some effects. So the liquid is actually formed from some orb sprites with physics behaviour attached. They have another orb sprite contained, without any behaviour. This would be the visual part of it, with some effects like colorise and tint plus slapped on the layer... if I remember correctly, but why am I even trying to explain it.

    Take a look here: http://dl.dropbox.com/u/4322334/blober%20engine.cap

    That's the original example file by QuaziGNRLnose.

    There might be a faster way to do this soon. Since lucid is working on a liquid plugin. Looking forward to that!

  • Double your double quotes.

    "Hello" obviously just gives you: Hello

    """Hello""" would give you the output: "Hello"

    "Hello ""Friend""" would give you the output: Hello "Friend"

  • You could create keys in a hash table on startup for each group of the ini. Add the relevant item as value of the key. Then you can loop through all the keys and for every key that matches the value you could spawn a dummy sprite with a PV that equals the keyname. Now you can pick a random dummy sprite and will therefore have selected a random group that matches.

    EDIT: Or instead of creating those sprites just add the keyname to a string with a divider attached. And then pick one by random with Gettoken(Random(Numtokens)+1) or something of the sort.

    It doesn't seem very clever to me right now, but that's the only thing I could think of on top of my head . And seeing that you haven't got any replies yet I thought I'd share.

    Oh, and if you already found a better solution please post!

  • same as str(global('timer')) ?

    Yes, if you want to insert a key you have to specify the key name as string if it isn't already. Unfortunately it doesn't work automatically with the hash table.

    This is especially annoying when you want to add keys and values dynamically from an INI for example. You have to tell the hash if it's a value, string or float. Otherwise it will remain 0.

    This is one of the major quirks I see with hash tables, which are otherwise very useful. Unless I'm overlooking something obvious or there's a good reason it works the way it does... at least I can't think of one.

  • I just created a quick memory example from scratch. It's nothing to look at, just plain colored cards and it's also not commented. I'm using an Array object, HashTable object and the Function object. You probably should be familiar with those in order to understand this example (consult wiki).

    http://dl.dropbox.com/u/2306601/memory_004x2.cap

    The X/Y Size of the array defines the number of cards. Not too different from the puzzle tutorial I create the cards from that array. I randomize it so that there will be 2 of every possible card by using the hashtable (adding and deleting keys from it in a certain manner). You'll see there are different loops and some math with Globals involved which might look confusing on first sight. But it's nothing too complicated really.

    There may always be a better method to do this. At least this is a lot less of a hassle than the old version I did over a year ago. Anyway, I hope it's helpful to you.

  • I already created a memory game and it isn't particularly complicated to achieve this. You could just have all your card images as frames of a single sprite. Then compare those frames. That's like the basic principle.

    I'd share my cap but it's using family photos as card images. I would have to edit those out before I put it on the internet. Which I can't do right now. But it's easy enough to figure this out by yourself (hopefully).

  • > does construct support midis?

    >

    No, I don't think any of the plugins do directly. You could either use Python or write a plugin for it.

    I'm a little baffled by that statement. Of course Construct does support midis. Just use Xaudio to play midi files.