newt's Recent Forum Activity

  • Boopity bipitty?

    Sorry I had to.

  • I agree the dissemination can be frustrating, but that's the nature of open source. It's controlled chaos at best, but once you get the big picture.... its a lovely thing.

    Speaking of the big picture, I'll describe the array object in terms you might be familiar with.

    Think of the object as a blank image, you have so many pixels in width(x), and so many pixels in height(y), and a specific color for each(z).

    If you acquaint your map to a picture you could say you wanted to "paint" a star that was only as big as a pixel at this point in the image.

    In terms of the array you could say that point was at 200 pixels across(x), then 150 pixels down(y), and since there wasn't any thing there before you could say instead of zero pixels you now have 1(z)or:

    array(200,150,1) instead of array(200,150,0).

    Now if you were to do a "for each" in the array, you can have it check to see if there is a 1 or a zero at the z position, and if its a one, create a star.

    Of course you wouldn't want everything to be one pixel, but lets say your star is 10 pixels big and your layout is 640 wide, and 480 pixels high, you could divide that by 10, or make your array 64x48, and then when you place the star multiply its position by 10, or array(20,15,1)*10.

    So looking at this in Construct:

    On mouse left clicked(or start of layout, etc... you don't want it to run every tick)

    ->for each in array(runs every x,y, and z)

    -->array compare value at current x, current y, (and or)current z = 1

    --->system create object star at array current x, current y * 10

    Note:

    You don't have to actually have to use the z in this circumstance, you can just say the value at x, and y.

    Continuing on:

    [quote:3835ijs5]so how can i actualy save\load information in a external file and how to keep the players away from messing around with that file. and what do you mean by external editor? sorry but i just dont understand.

    Now that you know how to read what's in the array, a simple way to load the array is just to create random data, or random().

    Since we are dealing with either a 1 or 0 we could look at the possibility as a percentage, or if random(10) = n make the zero a 1.

    Start of layout

    ->for each in array

    -->System compare random(10) =1

    --->array set value at currentx, currenty to 1

    Now that the array is set you can save it as an external file IE array Save to file myarray.array, or what ever extension you like.

    I'll let you figure that one out.... &appath is your friend.

    Same goes for load... works the same way, in reverse.

    As to the external editor, basically what your doing is making an app in Construct that uses mouse coordinates to set the x,and y, and a click to set 1 or 0, and then saving the array. There's several examples in the forum.

    And finally, there's really not much you can do to keep people from changing the array, but you have to ask yourself "Are you at the point where that could ever be a problem?".

  • See now your going into the level editor plane of thought, which is something just about everybody does at some point or another.

    There are several objects that can do this, the array object being the best for this imo.

    Thing is you have to set up the data by making an external editor, or randomly generate the data and save it to the array... an external file.

    As always the wiki is a good place to start.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Might take a look at hinges.

  • There's no rules against adding bigger images, you just have to set limits for what your doing.

    All you can do is load it up, and see how much vram it takes up, but always be aware of what few steps you can take to save that vram, p^2, etc.

  • There are ways around everything

    I'll just leave this here.

    http://dl.dropbox.com/u/666516/finalfrontier.cap

    If you haven't already, I'd highly suggest downloading the perlin noise plug.

    http://www.scirra.com/forum/viewtopic.php?f=2&t=4836&hilit=Perlin+Noise+plugin+Arsonide

    (required)

  • Now that we can run more than one preview at a time... might want to add temp2, temp3... etc.

  • I think there may be a possible bug with "clear all nodes". Every time I do that it goes back to the starting node, even if I add one right after that, a tick after to boot.

    Also, is there any way to slow the turning on angle to path?

    It would be nice if the sprites rotation was a constant speed.

    And is there a way to set deceleration?

  • either way it's probably the same amount of ram... possibly more with multiple pngs.

    Also:

    > yea you will, using opacity.

    >

    No, png24 have multi transparency.

    He means the transparency of the object.

  • Oh wow this is one of those times where placement of the events really matters.

    If you set the value before you do angledif, nothing will happen.

  • Thanks guys!

    That anglediff, does sound perfect for the timing issue.

  • If you were making your own custom movement(top down), and you wanted to know when the object was turning left, or right... how would you set it up?

    My first thoughts were to have the current angle sent to a private variable, and then compare that variable... if its less than current, you have a right turn... etc.

    Seems a little complicated, especially on the timing.... any thoughts on a better way?

newt's avatar

newt

Member since 12 Nov, 2008

Twitter
newt has 27 followers

Trophy Case

  • 16-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

31/44
How to earn trophies