tulamide's Forum Posts

  • Is there no way to just check a local variable? In the SYSTEM actions it says global and local variables, but when you try to use it to call or check a variable it only allows you to select globals.Something's wrong in your event sheet. Might want to share it?

    Here's an example using local variable:

    + System | On start of layout
        Local number lootVar = 0
        + (empty event)        -> System | Set lootVar to round(random(1, 3))
                                  Text   | Set text to lootVar
        + System | lootVar = 1 -> Text | Set text to "loot"
    

    If your event block doesn't look similar, you've done it wrong somehow.

  • picky <img src="smileys/smiley19.gif" border="0" align="middle" />

  • It won't be less CPU taxing to display less decimals, it will just look neater.This.

    Plus: the conversion uses processor time, adding to the load.

    It's just us humans who need numbers to be displayed with as less digits as possible - as long as we are not talking about our income <img src="smileys/smiley36.gif" border="0" align="middle" />

  • To explain 's correct help a bit more: In cases like these just think about what you're trying to achieve mathematically.

    100 to 600 in 50's increments.

    range you need: 600 - 100 = 500

    steps you need: 500 / 50 = 10 => + 1 = 11 (the incremments plus starting at zero)

    producing 11 numbers from 0 to 10 inclusive: int(random(0,11))//or shorter: int(random(11))

    random(0, 11) produces floats that are higher than 0 and lower than 11, e.g. 0.023 or 10.98

    int() omits the fractional part => 0.023 becomes 0, 10.98 becomes 10

    0 to 10 * 50 => a range of 500 in 50's increments

    + 100 => shifting to the desired start value of 100

  • newt

    <img src="smileys/smiley2.gif" border="0" align="middle" />

    Serious, I do agree as far as I'm concerned. I certainly don't care much if I use random() or int(random()). It's the plugin showing different behaviors for the same issue that I wanted to point out. From a programmer's point of view, so to say. A consistent behavior can help much tracking down possible issues. I hope that I didn't instead leave the impression of being picky <img src="smileys/smiley9.gif" border="0" align="middle" />

  • rojohound

    Minor issues:

    1) Using floats, as for example created by random(), in the color fields of the gradient function produces a javascript error.

    For example:

    "rgb(" & random(255) & ", 128, 128)" outputs a "...line 493 (col undefined)" error

    "rgb(" & round(random(255)) & ", 128, 128)" works as expected (and any other expression generating an integer)

    2) The gradient style "horizontal" reads "hoizontal".

    3) Using floats, as for example created by random(), in the color field of the fill function does not produce a javascript error, but isn't working either. The canvas will be filled with black instead of the specified color.

    For example:

    "rgb(" & random(255) & ", 128, 128)" fills with black

    "rgb(" & round(random(255)) & ", 128, 128)" works as expected

    4) Using floats, as for example created by random(), in any field of the floodfill function does not produce a javascript error nor fill with black, but isn't working either. Javascript doesn't answer anymore and one can only stop the script.

    For example:

    random(100) in the x or y field, "rgb(" & random(255) & ", 128, 128)" in the color field, all lead to the script having to be stopped

    round(random(100)) in the x or y field, or "rgb(" & round(random(255)) & ", 128, 128)" work as expected.

    There may be other functions as well with inconsistencies, but I only tested those three.

    I propose that all functions behave the same. If it isn't possible to convert float to int within the plugin, then it would be best to just draw black. If you feel uncomfortable with just drawing then all three should output a javascript error.

  • Ashley can we get an offset image property for tiled backgrounds, if tulamide and I promise to write a big tutorial on it?xD

  • Thanks all :)

    I hope to find mercy in the eyes of the moderators for bumping the thread. I want as many people as possible to be aware of this. The more people participate, the more fun it will be. But to participate, they have to know about it.

  • I'm talking about a finished audio product. The technical aspects, sound quality, and samples or live instrument recordings are very often degraded when the composer is making no income from their work. Compositional ability is only (a large) part of the puzzle. If you want great, atmospheric orchestral music, but your composer can't give you a finished product that sounds even somewhat convincing, then it is irrelevant how intricate his/her scoring is. Tons of composers write primarily by hand on paper and create some fantastic pieces. But that is useless for a game unless someone shells out for a nice recording or uses sample libraries to produce the results. And of course there are exceptions, but good luck trying to get someone to make 20 minutes of music for your game for free with no per-minute dollar amount or revenue split options and still have them give the project the attention it needs. Mods can get away with it--they are largely for portfolio building, but if you intend to make any income from your game, but you want someone to custom-build your resources for free for you, then I would question that person's integrity as well.I see what you mean (and did so before, as you can read from my first answer), but I still don't agree.

    If someone is looking for an orchestral score, he has to search for someone being able to produce it. If that person does it for free or charges is not a factor then - it is the result from the search.

    Also, you're not going to Hyundai if you want a Ferrari.

    Not paying for the game's audio when making income from it surely is some mean behavior, shows bad moral and character of the game's creators. But it doesn't qualify the audio product.

    There are so many talented composers who just start. Of course they offer a lot for free, since they have to establish their reputation.

    And on the indie market additionally there's a weird sick group of people, called idealists.

    Finally, do you realize that you just depreciated all the great musicians from the past of computer gaming? Their music was never produced but instead played 'live' by the computer/console while the game ran.

    Subscribe to Construct videos now
    Subscribe to Construct videos now
    Subscribe to Construct videos now
    Subscribe to Construct videos now

    What makes their music (done for and used in games) of any lesser quality?

    I keep the point that money doesn't make good music.

  • rojohound

    Thank you for your effort! Also, with XP currently at around 20% market share and falling, this won't be much of an issue in future.

    It keeps being a good and useful plugin <img src="smileys/smiley1.gif" border="0" align="middle">

  • ...there is often a degradation of quality involved when things drop down to free.I strongly disagree! The quality of music doesn't measure in $$

    Unless you don't really mean the music but the technical aspects like mastering in a cost intensive studio or producing the music with live orchestras, live choirs, etc.

    But, as I said, that has nothing to do with the quality of music. (Btw., I've heard a lot of demos from composers charging, that are of bad technical quality as well)

    I don't see why a composition of a talented guy who can't afford the next $2000 orchestra library for his sampler should be of any lesser quality than a composition from a talented guy who can afford it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You've done a wonderful job here. And a plus is that even without any graphics card acceleration, rendered entirely using the cpu (tested with FF on WinXP) it still runs with 36 fps - a good value.

    Also your technique is a brilliant example, why it would be an advantage to have an 'offset image' property for the tiled background object (like in CC). One perlin noise texture offsetted in realtime would reduce the memory load and make it easier to maintain the event sheet, while it wouldn't add to gpu/cpu load.

  • If this is the correct flow:

    1) You want to select from family zones whatever matches ZoneNumber

    2) You want to select from family walls whatever matches AreaType

    3) You want to loop through the list of objects selected by 2) and create a new object for each with coordinates from the current zones and the current walls object

    then this should have worked (basically your first try with just one small change):

    + on start of layout

    ++ Zones | ZoneNumber = ZoneSelector

    ++ Walls | AreaType = AreaSelector

    +++ System | For each Walls

    ---> Create Wall at ...

    If it doesn't then the coordinates you refer to seem to keep generic. The only thing that comes to my mind is that you have to make sure that the zones condition really only selects one object from zones. When applying zones.x and .y C2 has to have an explicit object to get the values from.

  • <font size="1">I apologize for the following. I know that my english isn't sufficient to tell a story, but it wouldn't be half as exciting without...</font>

    Introduction

    It was a relaxing evening. I spend some time with a book on the couch, when suddenly Blossom spoke to me.

    "Is this all?"

    I was quite confused and after a second I asked back.

    "What do you mean?"

    "That room I'm in. Is this the world?"

    "Now I see! No, this room is just a tiny part of the world. It belongs to a house which belongs to a city which belongs to a state on a continent."

    "So there's more to see?"

    "For sure! There are streets and cars and planes and lakes and forests and much more. Early mornings you can see the sun rising. In summer people go on vacation at beaches near great oceans that part all continents. In winter there's snow and ice and people use it to do all kinds of sports."

    Blossom remained silent for a while. Then, with a soft voice, she spoke again.

    "Let me see the world. I'm anxious to explore new places."

    You have to imagine my inner strife. Blossom, that is a song I gave birth to. Her full name is "A blossom tale" and she was a child of love. A child of my passion for music. I nursed her, saw her growing and took care to allow her a carefree life.

    But sometimes that's just not enough. And while holding my tears back, I wondered:

    "How could I make this possible for you? You are special. You're a song."

    "Day after day, when I was sitting here on your hard disc, I watched while you were doing something you call 'surfing the internet'. There's a website you visit so often. It's a place where all kinds of creative people gather, exchange opinions, share knowledge, help each other. Those people create worlds of all kinds, either by creating games, paintings or stories.

    It's the Scirra community that could help me fulfill my dream!"

    I nodded my head.

    "What an awesome idea."

    Prepare for an event to help 'A blossom tale' exploring the world! More info coming soon. Stay tuned ;)

  • I'm not sure if I understand you right. But if so, then you have to calculate the angle FROM the enemy TO the player, not the other way round.

    Scenario:

    Player is at (100, 100) with a zone of radius 50. Enemy is at (250, 50)

    Now the angle from the player's perspective to the enemy would be ~341.57�. But the angle you need is the one from the enemy's perspective to the player, which is ~161.57

    The rule is that the first pair of coordinates in the angle expression has to be the one of whose perspective you're trying to get the angle.

    angle(playerXY, enemyXY) => the angle that points towards the enemy

    angle(enemyXY, playerXY) => the angle that points towards the player

    But that's not all in this case. You also want to move the enemy from its current position to the proximity zone of the player, which in this case is a 50 pixel radius around the player. So you have to SUBTRACT that radius from the total distance between enemy and player.

    The enemy calculation would then look something like that:

    self.x + cos(angle(self.x, self.y, player.X, player.y)) * (distance(self.x, self,y, player.x, player.y) - 50)

    self.y + sin(angle(self.x, self.y, player.X, player.y)) * (distance(self.x, self,y, player.x, player.y) - 50)

    You would need to replace 50 by the correct radius.