piranha305's Recent Forum Activity

  • so iterating over instances should be pretty fast. the optimization would be in caching, like the uid of instances don't really change so when you find it once, you can store it, and then access it for all other operation you need and those look ups would be a bit faster. since you don't have to iterate over all the instances again, but that's very negligible unless you have 1000+ instances

  • i went a bit overboard with the iterating the text input, if you know you only have one instance of sometime you can simplify it by using something

    	const textInput = runtime.objects.TextInput.getAllInstances()[0];
    

    you don't really need the first for..of loop

  • Yes so there are essential 2 ways to go about it, you either let the conditions on the event sheet pick the object for you, or you iterate over all the objects and look for the uid your looking for

    here is a quick test project https://drive.google.com/open?id=1UExW5rLfhDLtEhr0nPaT7KlX-VjjMryT

    it show both ways of picking, using a condition to guide your picking, and a purely picking in scripting (not sure if using the event system to pick has any optimizations as opposed to iterating over all the obejcts) but with that said you can merge both approaches pretty seamlessly, narrow down you instance list with a condition and then in JS, you can further narrow down and target the instances you want to deal, with, you can even abstract it out into a function that will return the specific set of IWorldInstances you want to deal with.

  • https://piranha305.itch.io/tanktrax has the c3p file for the tank game.

  • Ashley can that loading happen across layouts? so if i load an object on the first layout, will it have to be placed in to the next layout as well, or will it remain in memory?

  • i don't see why you have to limit yourself to a sprite? using a sprite might make thinsg easier in some case (animations, editable bounding box, solid collision) but using a tiled background is pretty valid if you have the right use case for it. i mean it's just a tileable sprite without some of the functionality ? just cause it has background in the name does not mean it has to be exclusively in the background? you can use it health bars and a ton of other stuff (non background) ?

  • if you really wanted to use tiles for this my not just just a tile map instead? tilemaps support collision

  • Never really used this myself, but if u really wanted linq there are alternatives. github.com/mihaifm/linq

  • no man, you got me wrong, that not how i intended to sound, I am also a professional dotnet developer, 7 years, not as tenured as you. I was just pointing out that that the standard dot net library will not provide you that much benefit, if you port it to wasm to use in javascript, not just will you face the interoperability cost, you will also not get much from most of the dotnet standard classes that deal with low level os calls, File system. Since c3 is run from a browser, you will hit the browsers sandboxed limitation, and even using 3rd party library (any unity api is out of the question since those are compiled to mono), but you will also have compile those down to wen assembly.

    on that note, one of the guys who use to work at microsoft started working WebWindow (https://blog.stevensanderson.com/2019/11/18/2019-11-18-webwindow-a-cross-platform-webview-for-dotnet-core/) which if it gets mature could be of interest to wrap construct3 games.

  • Dot net core has an upcoming web framework called blazor. Which hosts the dotnet framework in web assembly. I am not sure if that's coupled with the blazor framework. If they have it in separate wasm file you might be able to leverage it, but only the dotnet standard libs, 3rd party dotnet library won't work. and to be honest I don't really see alot of benefit adding the dotnet framework on top of c3. Any thing you think you need dotnet for will probably be easier in javascript

  • What if you don't make it a function that returns a value, but inside the function set a variable with output, that you can optionally use later if u want? Would that generate your desired result? It requires an extra variable but seems to behave how you want?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • created issue about this here: https://github.com/Scirra/Construct-3-bugs/issues/3675

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