How do I become better in C2

0 favourites
  • 6 posts
From the Asset Store
Who wants to be a Millionaire Clone. An educational coding source
  • Hello Guys,

    Just need some advice I really want to get better in C2, I've been through the C2 live lessons on twitch by Yann and Kyatric, I'm still having problems with the proper flow of events, like when will one condition be a sub event, some actions stacked together those sort of stuff. I'm not really a programmer but I do know some html stuff a bit of css that's all. Since C2 is based on html5, do you think it would be a wise idea to learn html5. I don't know, C2 masters out there what can you advice?

    Thanks

  • If you are serious, and want to improve. The only way - and I mean this in all honesty is to actually use the software, to actually make things.

    Watching and doing is completely different. You cannot learn programming by watching (ask any programmer).

    You will have to spend 1000 plus hours to build a firm foundation.

    Best way is to build small things.

    What game you going to make?

    Does it need a welcome screen. Build just that.

    Does it need a options screen. Build just that.

    Does it need a character to move left, right, up, down. Do just that.

    Build your game in sections.

    Smaller sections are easier to digest, to optimize. I would do, I mean actually make the example games you find in

    Open C2. Click new. Browse down the list to all those wonderfull juicy examples. Build them. Learn their sequence, see how they did it. Don't read/look at the code. Actually open a second instance and build it switching between the too.

    Writers do this. THey write out word for word other great writers text. Thereby learning the rythme, structure of the other writer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:1gh9mew7]Best way is to build small things.

    What game you going to make?

    Does it need a welcome screen. Build just that.

    Does it need a options screen. Build just that.

    Does it need a character to move left, right, up, down. Do just that.

    Build your game in sections.

    Agree with Dutoit, another way that can be very useful is to grab a tutorial, like the Space shooter, I think its called. And change it, for instant see if you can make it so player can switch weapon, some enemies have shields which need to be destroyed first before the enemy take damage. The reason this can be a good idea, is because you are already building on a game, where you can expect things to be done correctly. So you have some guidelines to where you have to make you changes.

    Also I good idea is to make your own space shooter from scratch more in the way you want it, and if you get stuck you can see how it was made in the tutorial, and after a while you will look at the tutorial less and less, because you start to get hang of how things work together and your game might have evolved beyond the tutorial so it cant really help you anyway.

    [quote:1gh9mew7]I'm not really a programmer but I do know some html stuff a bit of css that's all. Since C2 is based on html5, do you think it would be a wise idea to learn html5.

    I don't think doing this will help you a lot, I would actually think it would confuse you even more.

    [quote:1gh9mew7]I'm still having problems with the proper flow of events, like when will one condition be a sub event, some actions stacked together those sort of stuff.

    Its a bit difficult to explain in a proper way I think.

    But try to look at it like this:

    Trigger

    <When something happens as a result of something else> (Sounds a bit confusing )

    But this is what you can refer to as a trigger, like if a person have a pistol and pull the trigger. The Trigger in this case is that the person have pulled the trigger and the pistol is firing.

    Condition

    <Something needs to be true or false> (This is just an If, Then Else statement)

    Using the same example as above, the condition in this case could be, that the person actually have a pistol, that there are ammunition to it. Could be that the pistol is not broken and so on.

    Sub conditions

    <Something needs to be true or false> (This is just an If, Then Else statement)

    Is pretty much the same as a normal condition, except that it works on former conditions to be true. And is more of a way to specify conditions and to make things easier to understand. So lets expand the example above a bit. Imagine that you have 10 people some of them have a pistol some don't, some have ammunition but no pistol. Some use energy weapons that doesn't require ammunition. If you try to throw all of them into one condition you will suddenly end up finding it very difficult to match these conditions.

    For instant.

    We want to see if a person can shoot, the requirements for this is that the person have a pistol with ammunition or an energy pistol.

    So we make the conditions:

    Person have a pistol (So this person should be able to shoot if he have ammunition)

    Person have ammunition to pistol

    Person have an energy pistol (So he can shoot)

    However now there is a problem. Because conditions are always "AND" statement. So all of them needs to be true. So in this example, we might have a person with an energy pistol, but since he doesn't have a normal pistol he cant shoot, because all the conditions need to be true.

    So to make it work, we need to break it down, and change the conditions to use "OR" instead of "AND" (Do that by right click an event and check "OR", so now it looks like this:

    Person have a pistol (So this person should be able to shoot if he have ammunition)

    or

    Person have ammunition to pistol

    or

    Person have an energy pistol (So he can shoot)

    So now the person with the energy pistol can shoot. However now a person that doesn't even have a pistol can shoot, but also a person without ammunition can as well. So clearly this would wouldn't work either. So to solve it we add a sub condition:

    So the first thing is to simply check that the person even have something to shoot with so this will be our Main condition:

    Person have a pistol

    or

    Person have an energy pistol

    Then we need to check if the person actually need ammunition or not, and since we are not sure if the person at this state is using a pistol or an energy pistol, just that he use one of them. So to check it we add two sub condition since the person can actually have one of each pistol:

    Person have a pistol (If this is true, then we need to check if there are also ammunition, so we add another condition)

    Person have ammunition

    If both these are true, the person will pull the trigger and fire the pistol.

    Person have an energy pistol

    The same goes for the energy pistol, but here the condition is just that the person have one, and if that's the case we fire that one as well.

    So sub conditions will to some degree come automatically as things start not to work, and you simply need them to get them to work.

    Actions

    <A change to something as a result of something else>

    In our case, when the pistol is fired the person will use one piece of ammunition each time they pull the trigger.

    Hope that make it a bit clearer.

  • Thank you very much guys for these very inspiring advice, Lately, I'm really getting frustrated with C2 coz, although there are some videos tutz, most of it are into shooter types games, some tid bits of information, when it comes to more complicated stuff tutz such as event sheet manipulation, lessons are often explained too fast for a newbie to understand. How I wish the publisher of dummies books would release a book for C2. Well again big big thanks for the both of you.

  • All complex features are all based on simple foundations. Tutorials are awesome, but if you lack the basic foundation all you can do copy/paste programming. This model of development never really teaches the studdier much of anything.

    Get your hands dirty. Think of something simple. Reading documentation and tutorials are better than watching them. Read the manual for all the parts you need to work with. Don't search for finished work; search for the basic component you need.

    Looking at an obstacle as a whole won't help in programming. Tackle each part in chunks.

    Finally. If you want to get really good. pick up a book on C/Java/Python.... whatever you want. Write your own simple data processing programs. Then don't need to do much except to give you a foundation of understanding coding process.

    Input > Process > Ouput

  • Everything that has been said is good, I'll add one thing though, try to decompose what you want into simple statements, before trying to get them on C2, simple things are the most reliable ones, an exemple:

    -"When I press W I want the player to shoot"

    -"When I press W" => is it right when you press "W", or it has also other conditions?=>When I press W, no other requirement

    -What does "Player to shoot" means?=>I want the player to change his animation, then I want it to spawn an object at a point I defined in the image editor

    -What is this object, where should it goes?=>It is a "Bullet" (using the bullet behavior), and it should go in front of the player

    -In front? so the angle should be changed if the sprite isn't at a good orientation?=>indeed, if the player is mirrored I'll also change it

    It seems like stupid in that case(and maybe not needed), but in more complex events, it can be a real life saver to simplify everything at first, when you know what you want to do in a low level logic, it is easier to write it in conditions/actions.

    having events easy to read, and to write, is really good, the readeability part is an important one, but mostly experience will give it to you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)