Vuuv's Forum Posts

  • Hi guys,

    I'm really unhappy with the structure of families in construct and try to think of a better way to handle this issure, since I have a lot of class inheratance. I've made up an example, which hopefully make you understand my problem. Let's assume the atachment is my class model and I create one family for each class. (I love car examples ).

    Imagine one day a costumer comes to my vehicle rental agency. His requirements are:

    • He wants a land vehicle
    • All motorcycles should be in first row
    • all trucks should be in last row
    • When he clicks on a motorcycle show me the horsepower

    This is what I would do:

    Pick all vehicles

    ---Foreach Vehicles

    ---LandVehicles = Vehicles.UID

    -------Show LandVehicle

    ------Foreach LandVehicles

    ------Motorcycles = LandVehicle.UID

    ----------Put motorcycle in first row

    ------Foreach LandVehicles

    ------Trucks= LandVehicle.UID

    ---------Put truck in last row

    On click Motorcycle

    Vehicle = Motorcycle.UID

    ---show Vehicle.horsepower

    Is there any better solution? I mean there are a lot of foreach loops. And the biggest problem: I can't even access my instance variables from other families. For example horsepower is an attribut that's shared by all vehicles. But when I click on a specific vehicle I always have to reference to the family.

  • You really should avoid these Foreach Loops. They are triggered every tick and will make your games performance very poor. Is it necessary to drag n drop the slaves?

  • I want to share my experience with you guys. I'm not only a construct 2 "developper", but also very experienced in other "real" programming. I totally agree with you, that most people think, construct is just a comfortable tool to create games easily. This is totally wrong. Construct requires a lot of knowledge of programming. Not because it's so hard to get something working. But it's so hard to make it good.

    I love reading the forums and most of the time I just inspect the capx file of other construct users. And I can tell you with a 99% chance if the person has programming knowledge. Most of the time it really hurts in my programmer's heart to see what people do.

    But to be honest it was very difficult for me in the beginning, too. Even though I had a lot of experience in programming i struggled in the first month with the unfamiliar event driven system. And I still learn something new about construct every single day.

    But back to topic: You said the performance of most games is horrible. Yes maybe it's true but this is not constructs fault. In the beginning I also had a lot of performance issues. But then I tried to find a way to fix them. And I never had these issues again and all my games are running on 50 fps.

    And maybe this opinion is unpopular but flash is dead and html5 the future.There is no flashgame I couldn't build same quality with HTML5 (actually this is what I'm currently doing and I never had problems. Quite the contrary: People are impressed how good it works and how fast projects can be programmed with HTML5). When I look at friends/collegues using YoYo'S gamemaker I only hear complaints. Tests even proof that c2 is more performant than GM.

  • When it's made in c2, definetely go for mobile. Nobody's gonna play this kind of games on a desktop

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm glad you found a solution and I hopefully could help you a bit

  • Yes tecbug: you can compare it with an associative array. And you can set keys and ask if keys are set.

  • Still the same solution:

    Create a variable Int: lastMaster

    Create a family and set up two instance variables:

    Boolean master

    Int connectedToMaster

    Select master:

    On touched object Family

    set Family master to true

    set lastMaster to Family.UID

    Select slaves:

    On touched object Family

    set connectedToMaster lastMaster

  • Have a look at Rex Rainbows Hash Plugin! It's awesome!

  • One object in multiple families makes the project easily very confusing. I also really need inheritance in my project. Of course it's working somehow right now, but I'm really unhappy with the current structure.

  • Apple Users are willing to pay more for a app.

    But there are more android users.

  • Any errormessages to share?

  • Invert the event "Mouse is over Object XY"

    hover == 1

    wait 5 seconds

    set Hover 0

    destroy objects

  • When an instance is pinned it's not moving at all. Try this:

    Give the instances a variable, e.g. "flag".

    Set "flag" for master to "master" and for "slaves" to slaves.

    Now pin all slaves to another sprite (i always call this sprite "PinHelper", cause I had this problem before).

    Now let PinHelper rotate.

  • Are you sure the background is on the same layer?

  • If you have just a few objects then set their position X to WindowWidth/2 and Y to WindowHeight / 2.

    If you're talking about your whole project, you should offer different versions depending on your screensize.