TwinBlazar's Forum Posts

  • But still, I am not sure whether this is overkill for you or not.

    The good thing is, if you implement an event sheet for this, all you need to do, is simply relate new object types to string with nickname plugin when you got a new item type and just modify "chance" and "drop" variables as you wish, for the rest of your project.

  • And one more thing, I prefer to have all the numbers to be in 100 range. That way, it's more like 0-100% to me. Sure, mathematician might slap at me for this, but hey, this chance implementation thing is entirely up to you.

  • Now, you are talking about workflow. ;)

    What I suggested you is a very simple idea, but in order to be efficient and flexible in the future, you will need something else.

    If I were you, I will store which enemy drops which item in 2 instance variables called "drop" and "chance". All enemies will be in one single family and that "droppingItem" family will have these 2 instance variables IN string. WHY in string?

    Because I will store it like this:

    drop = "None|Potion|Antidote"

    chance = "60|30|10"

    Now, when an enemy got killed, it's time to do some string parsing. First, get this instance variable. Parse the string using tokenat expression:

    okenat(src, index, separator)

    Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges.

    tokenat(drop, 0, "|") shall return "None".

    tokenat(drop, 1, "|") shall return "Potion".

    tokenat(drop, 2, "|") shall return "Antidote".

    tokenat(chance, 0, "|") shall return "60".

    tokenat(chance, 1, "|") shall return "30".

    tokenat(chance, 2, "|") shall return "10".

    Yes, you will put this in a loop and using loopindex instead of 0,1,2. (if you want more technical info here, ask the forums regarding the loop in C2)

    Now, you will want to check your random value against the chance value. Perhaps, with this:

    okencount(src, separator)

    Count how many tokens occur in src using separator. For example, tokencount("apples|oranges|bananas", "|") returns 3.

    The pseudocode will be something like this: (if you never write a program before, just say so)

    ran = random(100);
    
    while ( tokencount(chance, "|") > loopindex){
      
      if ( int(tokenat(chance, loopindex, "|")) < ran)
        return tokenat(drop, loopindex, "|");
    
      loopindex = loopindex + 1; 
    }

    Now, with this here, you will get yourself one of the "None|Potion|Antidote". So how can you create an object type respectively? You need to use a plugin called "nickname" for this. Search for it in the forums. It allows you to create object via string.

    This sounds complicated, but this is one possibility.

  • Random expression and the event "is in range" will be your friend here. These two features, not sure the name for the latter is correct, exist and you will use them here.

    For example, you could have a global variable "ran" to store a random value and have something like this for item dropping logc in your event sheet:

    set global variable "ran" to random(100)

    is "ran" in range 0 to 90 : drop item 1

    is "ran" in range 90 to 100 : drop item 2

    Here is an example of item dropping. Common item 1 has 90% chance of being dropped while the rare item 2 has only 10% chance of being dropped.

  • For the sound, please do a search on tutorial section on beginner guide to sound. Also, Construct 2 is platform independent, so no need to worry about platform difference.

    For the name, please refer to the manual on global variable. But to make the player typing their name in, we need some workaround right now, I believe. Do a search on text box in this forums.

  • create all the pieces together, at the same time?

    I don't understand what do you mean there. Please elaborate.

  • I would highly recommend you to create your animation using other programs such EDGE 2, Graphics Gale, etc. These programs are made specifically for such animation making. They have layer management, etc. Sure, you have to export them and then import them to C2, but if C2 is going to support onion skin, usability-wise, it will need some of the useful tools for better workflow as well. Or else, having just the onion skin ain't worth it, in my opinion.

    Also, you can modify your images with those animation program right in the project directory, no?

  • I am using function for player's movement, as you can see here:

    <img src="http://img547.imageshack.us/img547/5989/capturenn.png" border="0" />

    So far, I don't see any problem.

    But then, I came across this: scirra.com/tutorials/510/advanced-tips-and-tricks-that-construct2-offers , which is published on 31st, March 2013. My concern is from this statement:

    ust be sure to not call functions each tick ... or you'll get Javascript errors ;)

    While, for my case, I do not invoke function in every tick. I have to admit I exploit function calls to a very great extent. In fact, my whole event sheet rather looks more like programming code.

    But so far, I do not see any problem. Everything works accordingly. Has anyone got some sort of such Javascript errors here? How stable is the function calling in C2?

  • Dear all those who have experience and skills in audio department,

    The thing is this, I am looking around on some sort of information or tutorial regarding audio generation/design. I've came across website such as bfxr.net and superflashbros.net/as3sfxr which allow you to create retro style sound with lots of buttons. A lot of experiment is possible. Sure, these days, while we have higher quality sound which can replicate whatever sound almost exactly, I prefer to try around with the websites aforementioned first. My reason is that, I want to be able to manipulate/create sound in digital format, rather than recording sound from elsewhere. And I want to keep things simple first, so let's go with retro style sound like 8-bit and 16-bit days. I am NOT looking for realistic sound generation here.

    But right now, I feel I am not doing this quite right. While keeping on setting things here and there could give me some random sound, there are many times that I have certain sounds in my head, yet I do not know how to manipulate all those slider GUI to generate such sound - in fact, I do not even know whether a sound is possible or not with the given tool, but if I have heard such sounds in games from NES or SNES era before, it should be possible, no?

    So here I am, asking for advice. If I am to be able to understand the sound manipulation and if I am to be able to generate sound this way, where must I look? What tutorial must I refer to? How did those sound engineers do this?

    If anyone knows the details behind this, please share your knowledge...

  • You are not alone. Ace Attorney is a huge feat in Japan. In Sega Amusement Park, Joypolis, at Odaiba, Tokyo, you have this attraction, for Ace Attorney. Basically, you have a special exclusive short chapter for Ace Attorney, played around the park, but I think you played as Miles Edgeworth. The way you play this attraction is similar to how you play the game on your devices/platforms, but with more "twist" in term of experience. More info here: tokyo-joypolis.com/attraction/3rd/kenji.html (Japanese only) See the the 4th small image next to the bigger image? Those are the "arcade" machines for this attraction, deployed around the park.

    We also got a 1:1 scale Miles Edgeworth figure at that amusement park and he also got his little office for show for his attraction too. Unfortunately, for foreigners, this is Japanese only.

  • I was considering putting some retro style 8-bit text into the game, you see. Fortunately, there is a font called "Press Start 2P" at google.com/fonts/, but the thing is I also require some Japanese text in retro style as well. Foreign language, you see.

  • I see...

    On the other hand, what about Node-Webkit for desktop app? If I request the user to install the font first, then everything should be ok, no?

    And still, I see that I can also do: scirra.com/tutorials/237/how-to-use-your-own-web-fonts but will this be applicable for Node-Webkit?

  • Making a big game with C2? May I ask, if anybody has tried having hundred of layouts and hundreds of object types? Does C2 start to hiccup in some ways or no?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Right now, i'm trying out different fonts. Some work. Some don't. Those that don't invoke C2 to yell out that it is not supported. So I looked around and saw that C2 uses an external library for font management.

    So the thing is this. If I am to create my own font, What kind of format, type, attributes, etc. are required in order to allow C2 to render the font correctly?

    Sure, the user will not have my font, so that has to be supplied somehow.