Yann's Recent Forum Activity

  • save as single file and update your link

  • For me to have a usefull opinion on your question, I need to know more precisely how your game would be played.

    'cause maybe there's some easier ways to do, not what you say here, but what you want to achieve.

    Without telling me the end result I can't really guess if you take an easy or a hard path... a wrong or a good one.

    Here it's as if I look at your game too closely.

  • Yeah Atk_Man.Y can never be greater than Atk_Man.Y

    The same way you can't be greater than yourself

    It's a bit philosophical but it's so true.

    Also Every tick here is totally useless, all the condition in the event sheet are always read every tick.

    If you go to the plugin section you might find something for Z-ordering... I think I saw something about that

  • You have two things involved that are close to each other but quite differente in application.

    On one side you have the Array with all the card shuffled or not

    On the other side you have the number (from 0 to 51) from which you can guess the value and color (see my last post for that)

    Basically, you can really do anything that you want with this system.

    The cards will always keep the same order in the deck, so you will always find out witch card has been drawn and where (in the deck).

    If you have some game that involve putting back card in the deck you will just have to move values inside the Array

    If you have some game that involve other deck, just use another array

    However, if you want to know if you have pairs, flush, straight, three of a kind... that kind of stuff, it will me more tricky

    I guess you could start by loading each hands on a two dimensionnal array (set value at(hand,index) to cardValue) and compare each member to count similarities (how many cards have the same value or color) or sequences (what is the biggest sequence and what is it?)

    Well... dunno it's getting complicated and I don't even know if I'm in the scope of your question...

  • Many ways come to mind

    Oh wait... No I can only see one way

    1/ you put all your anim in the same sprite. You name your anim like that:

    PokemonName_RStanding
    PokemonName_LStanding
    PokemonName_RRunning
    PokemonName_LRunning

    (replace PokemonName by each of your pokemon.... name should match the list I will mention below)

    2/ you create a global variable named "PokemonName" type text

    3/ you create a global variable named "PokemonList" type text

    4/ you keep a .txt file with you with the list of your pokemon (for easy management)

    pikachu
    psychokwak
    dracofeu
    smogogo
    ...

    (yes I know... french version)

    Brawl event sheet :

    5/

    start of layout 
             -> set PokemonList to (and you copy/paste your list)
             -> set PokemonName to tokenat(PokemonList,int(random(tokencount(PokemonList,newline))),newline)

    6/ you prefix all your animationName call with PokemonNam&"_

    like :

    set animation to PokemonName&"_RStanding"

    It should work fine (:

    The idea is to use a string which contain a the list and use the indexation capabilities of the tokenat(string,index,separator) function

    The separator is the newline special word which detect... new lines :D

    Neat stuff... I should write a tuto on that... (actually I started one some weeks ago an... well... lazy :D)

  • Depends on what you want to achieve in the end

    sometimes, physics is just not the way to go, a bullet behavior can be enough for your gameplay... really depends

  • That's an easy one

    Global encounterChance = 0
    Global maxChance = 10
    tallGrassColl | On collision with Player Col
       System | encounterChance < maxChance  -> add 1 to encounterChance
       System | random(maxChance) < encounterChance -> Go to Brawl

    I think it makes more sense to start from 0 to go to maxChance...

    so basically you will have encouterChance/maxChance ... Chance of encounter :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a solution.

    Your main problem is that you put your Array in a layout that appear after the first layout that have to USE this array.

    Basically, you want to move the array to the other layout.

    1/ Save as Project in projectfolder (name it as you see fit)

    2/ Go to projectfolder/Layouts/

    3/ Open the xml file of layout where your array is

    4/ Locate it in the xml gibberish it should look like :

    <instance type="Array">
        <properties>
            <width>10</width>
            <height>10</height>
            <depth>10</depth>
        </properties>
    </instance>

    5/ cut this

    6/ Open the xml of the layout you want your array to be

    7/ locate the nonworld-instances element

    8/ if you don't have non world element in this layout it should look like

    <nonworld-instances/>

    That's the syntax for empty element

    In this case you will have to change this markeup to

    <nonworld-instances></nonworld-instances>

    To be able to put something inside.

    9/ paste inside the nonworld-instances element

    <nonworld-instances>
        <instance type="Array">
            <properties>
                <width>10</width>
                <height>10</height>
                <depth>10</depth>
            </properties>
        </instance>
    </nonworld-instances>

    10/ save and close both xml file

    11/ open the projectfoler/project.caproj

    it should work...

    in any case you take no risk as you always have your original .capx

    also if you manage to get the hang of xml syntaxe, you can easily make some "replace" operation in the event sheet xml (projectfolder/Event sheets/)

  • In physic, doing a 0->maximal speed instantly means you are applying an incredible force on the object...in an instant

    well... try that rocketScience.capx

    Just click

  • Nope no debugger, some uses firebug to track them down (a firefox plugin)

    I don't really know how to use it effectively.

    So yeah it would be great to have a debugger somewhere... And I think it's somewhere in ash's awesomely big todo list (I hope)

    We probably just have to be patient (:

  • Well you made a lot of mistake

    The bigger one is that you forgot to set world gravity to 0 (easy to miss)

    Others are in how you use foreach and how you nest things

    Also you added gravity to mass at some point

    And you didn't need to use an Array object, global variables are better

    etc, etc, etc

    Just compare I hope you'll understand

    gravity.capx

  • The best method I can think of is :

    1/ make your game with simple recangle, tweak it until you get the right speed, jump, fall... all the motion should feel right and properly balanced

    2/ then, as you parallely developped a character design, you begin to flesh out simple key poses (4 key for a walk cycle, one for a jump, one for a fall pose). Just simple sketchs to test :

    - the size of your character

    - the rythm (you might change animation speed to fit the speed of your walking rectangle and avoid sliding walk)

    - the poses themselves

    - if you didn't destroy the balance achieve in step 1 (it could come from bad animation rythm or too unrealistic motion: imagine a human moving like super meat boy...)

    3/ Once you get things right, you sketch the needed in-between (if you just have 4 keyposes and you put animation speed to 6, you might need to add some in-between to smooth the animation. animation speed to 12 should be better) - of course once you sketched the in-between, you test them because after all, a sketche is mentally easier to correct than a fully rendered frame

    4/ You go wild and fully render your neat sketches OR you go 3D from there and try to fit your sketch the best as you can.

    Yeah sketching is often better than going 3D too fast. 3D is great, but there's some thing you can find quicker with a sketch than disentangle your keys and curves. Some will probably say that they suck at drawing and moving bones is easier... You know... matter of taste :D

    Oh and I tend to keep the rectangle from step 1 as a collision box, and just play anim on top of it with a every tick : sprite set position to spriteCollision (just example of naming)

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann