piranha305's Recent Forum Activity

  • Can anyone create a Firebase plugin for Construct 3? I don’t understand scirra developers, they require a C3 subscription, but they don’t want to do the necessary plugins ... How can I make an online game with a database and honor boards if all the plugins from older developers such as rex_firebase work only on C2. Why do I then buy a subscription if there is no sense from your engine in online functions?

    there is a firebase plugin here, but it's paid made by

    construct.net/en/forum/construct-3/plugin-sdk-10/construct-master-collection-139046

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • construct.net/en/make-games/manuals/addon-sdk/runtime-reference/runtime

    The runtime function GetTimescale does not exists, GetTimeScale works with uppercase S.

    this drove me crazy for a bit.

  • okay that works, but it is overly verbose. in the meantime this is good enough. thanks

  • in C2 SDK, you could do somethign like

    this.runtime.getDt(this.inst);
    

    looking through the C3 docs i don't see an equivalent function. there are several functions having to do with time.

    	GetStartTime()
    	GetGameTime()
    	GetWallTime()
    

    but none of these get delta time. and none of them are scoped by instances. what is the best approach to get the dt of an instance? in context, this is for a behavior that will move the instance and i need the dt for the movement calculation

  • So escaped characters don't seem to work in strings such as \n, there is a system expression for newline which can be used to have the same effect, but what if you wanted to do something like \t to add tabs between string? \t does not work inside the string, and there is no tab expression that produces the same effect? is there another way to accomplish this.

    note adding " " does not work, the tabs take the previous set of text into account and lines every thing up properly. i also tried to copy a tab character and paste it but it reduces it to a single space?

  • So when u create a new object (let's use sprite as an example) I cannot edit any of the properties until I create an instance (drag object to a layout) now I can click on the object in the layout or in the object and edit instance variables for examples. Now let's say I have one instance in a layout and I set his instance variable value to 123. On a new layout when I drag the same sprite to create a new instance he will have the instance variable value already set to 123. Now the issue is when I have 2 instances of the same object with different settings (instance var, behavior settings... Etc) when I create a new instance in a new layout the settings that will be applied are unpredictable. This becomes tedious when you want to create an object with the varients but most of them need to be a certain way... Think of like prefab. This use to behave differently

  • So before when i created an sprite and added a behavior, i was able to manipulate those properties by clicking on the object in the object list. Now i have to have an instance. the thing is if i have multiple instance each with different settings, how does construct know which is the default? clicking on the object in the object list shows multiple values for the value. but when i create a new instance how can i control which settings get applied to the instance?

    It becomes very tedius where ever time i add an instance to a layout i have to re configure the settings.

    My though was maybe its the very first instance you add, so i made sure i added my first instance to an object bank layout and configure his settings there. but that does not seem to work that way. does any on have insight and to how better control this?

  • I have actually made a few "games" with GM (sadly lost to the sands of time) and while I don´t think it´s terrible, when I tried C2 it just instantly clicked with me in a way GM never managed to. The rest is history.

    I don´t think GM is terrible, just not for me.

    I agree, i have used GameMaker Studio 1/2 in the past, I think construct does alot of thing better (GUI,Instance Management, Visual Programming, Engine Updates ....). and things are more intuitive, and it's super fast to add feature/prototype your game. and with the hard work Scirra is doing adding new features/ bug fixes as quick as they do... It's just a matter of time before one of the many talented people using construct make a hit game, and give the engine recognition.

  • you are 100% correct, it was much easier to handle this logic outside the event sheet. by adding the instances to data structure outside the runtime, and assigning the trigger as a callback when a new event it emitted, i can skip using call action, and just get to the trigger directly for the specific instance.

  • Well i was never planning on releasing this addon, i am using it internal in my project, but i see your point in trying to hack that in the framework.

    but now as a counterpoint for more extensible addon. there should be a clean way of publishing a message, and having a set of instance be able to subscribe to that message type, and trigger some type of functionality. without having to couple the instances to the messaging system. it would also improve event sheet maintenance if your are designing your event sheets in a modular way, you might not want to mix concerns.

    a common example is pausing your game? that is a cross cutting concern across all your event sheets? you have to disable some button collision, reduce the time scale, hide/show new elements, these things might be implemented in different events and you might not want to mix that logic. can we just emit a message (in this case a string) "pause" / "unpause" and fire off a trigger to all the instances/system that are subscribed to those events?

    i guess there are multiple ways to handle the situation, i am just trying to apply different concepts to implementation, which might not fit so well, writing this you could solve that issue by having a separate event sheet dedicated to your cross cutting concern, and that event sheet will be aware of all the instances

    i was just dreaming of a more flexible approach, where i can just attach a behavior to the object and set the message to listen and have it all happen auto-magically so i would not have to duplicate those events.

  • endel you should check piranha305.itch.io/c3ide it helps streamline plugin development, and has an integrated web server.

  • okay i figure it out, the instance i was getting was not the type i was expecting. so this code achieves what i was trying to do

     	var behavior = this._inst.GetBehaviorInstanceFromCtor(C3.Behaviors.Piranha305_PubSub);
    	var instances = behavior.GetBehavior().GetInstances();
    	
    	for(let instance of instances){
    		var behav = instance.GetBehaviorInstanceFromCtor(C3.Behaviors.Piranha305_PubSub);
    		var sdkInstance = behav.GetSdkInstance();
    		sdkInstance.CallAction(C3.Behaviors.Piranha305_PubSub.Acts.SimulateMessage, channel, msg);
    	}
    

    this works good if the instance only has only one instance of the behavior attached.

    would it be possible to add instance.GetBehaviorInstanceFromCtor(C3.Behaviors.Piranha305_PubSub);

    but have it return an array of behavior instances instead of just the first instance?

piranha305's avatar

piranha305

Early Adopter

Member since 26 Apr, 2016

Twitter
piranha305 has 34 followers

Connect with piranha305

Trophy Case

  • 8-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x4
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x2
    Lightning Draw First person to up-vote a new Construct 3 release
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies