Ruskul's Recent Forum Activity

  • newt interesting. Though, that would n't work like a function in the sense that the function runs right away, but the triggering variable would have to wait till it was polled. And that could involve alot of polling in a big project.

  • Does anyone else have problems with constuct2 just "quite working". It usually occurs while trying to open project files.

    EDIT: Since the time of this post I have not had a crash since.

  • Colludium - cool thanks for the capx. That is a neat way of handling that stuffs. Perhaps I am not seeing beyond the first order application of this but my primary concern is tied to the inability to use the platformer behavior. In order to recreate the behavior on your own, you need compound objects, and making those compound objects abstract so that anything can use them is my primary concern.

    Does this make sense?

    Let me see if I can fish out a capx that explains it.... well... I can't actually use my capx (Not willing to share at this point)

    Basically, To keep it simple I'll pretend characterManagers, and characterColliders, are the only objects that make up the compound object.

    There is two families. Managers and colliders. When a manager is created, it creates 4 colliders, and stores the uid of each. The biggest problem is actually to do with creating an object and immediately getting its uid. I had to create an object and its components and then hook it up the next fram by testing for overlaps. This is not ideal if two objects spawn on each other to start out...

  • TiAm - nice, that is pretty sweet

  • Colludium "comma seperated values" , excel

    I think rexrainbow plugins should be added to construct. Officially bought and added. His expertise has been invaluable.

  • Colludium

    Just to clarify, when you say pin, you are not meaning the "pin behavior" but rather the use of UIDs to stick where it belongs?

    So instead of having families, you simply create a single character object (compound contained in a container). You then just stick the appropriate sprite to it based on what it is? What is csv?

    Lastly if it is just a single character, it seems like it would be rubbish trying to figure what to do for the character laws (how fast to deccelerate, maxspeed, and so on)

    For example... (burried in the fsm): Assume the player is in the air and the controller has indicated right.

    velocity X += Airacceleration * dt.

    But how do I know what air acceleration to use? If I was a pikachu it should be higher than a geodude.

    then you would need some variable on the character that is Character type, and then you have tone of repetitive branching ifs:

    if Geodude AirAcceleration = 20;

    if Pick'a'Chu AirAcceleration = 10,000,000;

    continued for 100s more...

    velocity += Airacceleration * dt

    edit

    or, on start up you load the character laws from a xml file Character.AirAcceleration = xml file "characterName" AirAcceleration.

    Does this make sense, or am I missing something

  • If one could create a compound object but have contruct2 work with it as a single object... that would be nice

    container like prefab made of objects in a family... idk

  • Okay everyone,

    This is an advanced topic, but I would welcome everyone's thoughts on this. Perhaps the topic is complex but the solution is simple.

    Lets say you are making a mario like game. Every character that runs around in the game is playable by the player.

    Lets call these characters, "Characters". Lets also assume we are not using the platformer behavior (numerous problems with it prevent me from using it even as a base, but if one wanted to use physics the needs would be the same).

    Every "Character" needs a way to track whether or not it is on the ground, on a wall, etc. as well as points to check for collisions. Every character also needs a control interface. If the player is in control, the interface will get input from the player, otherwise it gets input from the AI

    On an individual level, programing a character is simple enough. Each character becomes a compound object placed in a container. Other objects are used to determine state, and just to keep things clean I will also use other objects to store certain information about the player. Since the character is wrapped up in a container, object picking is easy. You can simple say things like, every tick -> set position of foot state to maincharacter image point whatever.

    But, though it may be simple enough to make this, repeating the above events (can be around 600) for every character type in the game is an obvious no go.

    This is where families and functions come into play. But this is also where I can't figure out a fool proof way to hook everything up sensibly. As I said, on an individual level, containers make this a breeze. But I can't get that eeze of functioning to the family level.

    On the last project I switched to unity so I could code, but I want to keep the next project in construct.

    Does anyone have some good hookup ideas to get this system going without a lot of tedium and code repetition, the complete lack of OOP in construct can really bite at times and it seems to take more work to get simple oop ideas working.

  • newt - Events run, scene is rendered. Repeat. A function will always occur before the scene is drawn if it is called during the events. And... I'm still confused, what do you mean a variable can be used in the same ways as a function? You mean you set a variable to something and then if it is something you do do something, rather than calling a function?

  • newt - so you just have a function that has wait in it? - getting passed created objects is a good use case.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TiAm

    That would be perfect.

  • newt - lol, I never thought to use them intentionally in that way. How do you skip a tick with a function?

Ruskul's avatar

Ruskul

Member since 23 Nov, 2013

Twitter
Ruskul has 2 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies