tunepunk's Forum Posts

    Just curious if there is any performance benefit in using scripts in some cases.

    For example, loops, and iterating through many instances.

    Would be interesting to see a blog post of benchmarks similar to what has been done previously.

    in the ghost shooter js example, there is a set of utility functions.

    Would it be possible to call a js utility function in an event condition? Something like that would be very useful i think.

  • Messing around with the scripting feature a bit, and one thing that I can't figure out is how to pick objects by for example a variable, or by position, or is within a certain radius of another object or anything else.

    Does anyone have a hands on example on how to do that, that i can study further?

    Preferably with some comments so i can understand what's going on, as I'm pretty new to javascript.

    Tagged:

  • No that will close the browser window. I just want to close the div/iframe where the game is running.

    To clarify. On the site there is a button to start the game:

    Clicking this button will open a modal/div with an iframe with the game running inside.

    Once you've finished play the game, there is a close button in the game.

    I need to click this ingame button to close the modal/div on the site.

  • If i'm using the AJAX object to do an API call, is the communication encrypted?

    If not how can I make sure no one can intercept or read the data being sent and received?

    Tagged:

  • I'm doing a small lite widget in construct to be used on a site. After running the small little mini game, I want to have a close button in the game that closes the game. (or the div/iframe where the game is running)

    How do I go about doing that?

    And some follow up questions:

    Should the game be running in an iframe on the same site? or is it possible to run the game in a div, with the canvas object directly?

    Thanks

    Tagged:

  • Mikal Maybe Nepeo Can help make the example work with C3 runtime as well. He was the one Solving so it can be opened and run in C3 (but with C2 runtime)

    That would be great if he or anyone else with the knowhow could help make it run in the C3 runtime as well. I think Rojo don't really use C3. It's a really cool example and very nice to use in some cases for a 3D effect.

    The early example in the thread can be run in C2 and C3 using the C2 runtime. If you're going to use it i would suggest sticking to either the C3 or the C2 version.

  • C3 has a similar thing built in now called drawing canvas. Can do the same thing basically.

  • Only use C3 nowadays. Mainly because i hop a lot between Mac and PC, and C3 runs good on both, and a lot of new nice features. And can access my projects from everywhere.

    I don't mind subscription model, it's not really expensive, and feels like a good way to support continued development of the software.

  • I think one big factor might be the community itself and especially the marketplace for plugins assets effects and such. People are generally lazy, and don't want to reinvent the wheel.

    When I started using Construct 2, the forum section for those kind of things were the way to go. With the transition to C3 I noticed that there is still very few plugins ported. Many are unsupported, many broken links.

    A lot of Non-Coders are heavily dependant on good plugins for making life easier, or just because some things cant be done out of the box, or can be done with poor performing or complex workarounds.

    If I were Scirra, instead of trying to cater for all various needs and requestsfocus on the plugin developers. for example:

    ** Create an easy tool for non coders to build plugins, behaviours and effects, for sharing with the community.

    ** Make it easier and more profitable to share and monetize plugins... Not everyone want's to share their hard work for free.

    ** Add an in-app plugin marketplace. For ease of use. Just directly browse available plugins and assets from within Construct and click install/add/purchase.

    ** Better marketplace in general for everything from Assets, Plugins, Templates.

    I think those are the main pain points for me at the moment. I wouldn't mind using my own money hiring devs to create and maintain plugins if Scirra made it easy for me to monetise them, and for people to find them.

    So in short.

    Steps for creating and sharing plugins and behaviours or even events/code for non coders is a hurdle, and even if you are good at it, it's hard to get exposure and hard to monetise your creations. Plugins are hidden away somewhere in a website section where you have to browse, search, download, install, restart construct, open again... Way way way too many steps as a user to find and use plugins... can't even imagine the hurdles of creating one.

  • you can use set angle instead and use this expression.

    Sprite.Width < 0 ? angle(Sprite.X,Sprite.Y,touch.X,Touch.Y)-180 : angle(Sprite.X,Sprite.Y,Touch.X,Touch.Y)

    That will fix the issue when it's flipped.

    To explain what it does:

    It's a conditional expression that checks the width if it's negative, then sets the angle to -180 if that's true, and sets angle to regular if it's false.

    But the easiest way is to not flip the arrow, unless you really have to.

    Just disable the flip on the arrow and it will work.

  • I don't really check for lag. I did some testing and photon performs good enough in most cases. Not worth spending a lot of time on. To minimize perceived lag lag between users i usually don't move my own character until i get the move event myself. That way the difference between my client and other clients with similar ping should be quite minimal. Most connected clients have very similar ping.

    Then again ... my philosophy is.... if your connection sucks... go play single player games instead. I don't wanna waste time and energy on users that don't have a decent connection. They should not play multiplayer games... and make the experience bad for others. I even thought about a ping restriction. Implementing a simple ping checker event and if average ping ping > 300, kick them out of multiplayer...

    Harsh but it's the same as trying to make a game designed for high end gaming machines try to run them on a 5 year old laptop. If I can't guarantee you will have a good experience ( low lag/ping )playing multiplayer, i rather not have them play at all.

  • Maybe it would be easier to store the arrays in a Dictionary as strings, or you can store array data as strings, in the array and get the data with tokenat expression?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • recreating an old jam game of mine for the weekend.

    Cool idea. A bit too much camera shake for my taste though. Get's very annoying to look at after a while. I'd probably suggest using it more sparsely like on special abilities and boss fights, falling from high heights, etc. and not on every shot fired. That way it will be more effectful when it actually does happen.

  • I think there are some long term plans of adding the ability to kind of create your own custom plugins with events, in Ashleys latest blog post. A bit far off in the future though, but I completely agree with this.

    I mostly focus on touch based games, and I have a set of events that handles my touch controller which I'm often reusing in many projects with some tweaks.

    A pretty neat feature though is that if you copy a sprite object from a project you get this code:

    {"is-c3-clipboard-data":true,"type":"world-instances","items":[{"type":"Sprite","properties":{"initially-visible":true,"initial-animation":"Animation 1","initial-frame":0,"enable-collisions":true,"live-preview":false},"instanceVariables":{},"behaviors":{},"world":{"x":339,"y":218,"width":59,"height":59,"originX":0.5,"originY":0.5,"color":[1,1,1,1],"angle":0,"zElevation":0}}],"object-types":[{"name":"Sprite","plugin-id":"Sprite","isGlobal":false,"instanceVariables":[],"behaviorTypes":[],"effectTypes":[],"animations":{"items":[{"frames":[{"width":59,"height":59,"originX":0.5,"originY":0.5,"originalSource":"","exportFormat":"png","exportQuality":0.8,"imageDataIndex":0,"duration":1}],"name":"Animation 1","isLooping":false,"isPingPong":false,"repeatCount":1,"repeatTo":0,"speed":5}],"subfolders":[]}}],"imageData":["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAA7CAYAAADFJfKzAAABWUlEQVRoQ+2YQQ7CMAwE25fwBA6VOPB/ceMRvAQUiUocEnU3dtI4bM924vWsk8B63W7v5U++VWInJS2yk4JdRFZkJ+iAbDwBxKyEJmSfr8eyXe7D9ex0sT0bA4tlimoVa7WKu9gkNH2ojZnGSCzRgSZkUaqpzvBkJTZjN3a+Ccfa7lnEbmzxbHx4sYzlJZbogOtpjFh9r623hdO+EptzBkINifkl23NeabLIeKACmMYg+yIxbjZmZzC8WJRq72fiTt2VrMQWhkk2Rk4ZQ4xszN6z7ElsgGNKdSErsSYGbZLdyDLXThspx6tKbM0BJbIDPSjoXz0leuxriI0/nkYswjyzNdeOxGJwTFEw2dIuNZRqckwqv8mniPUovGYNiWW6dpYlmRrpfyo8Z7amUI8c2dijiyOuYSY7oqhSTRIbiRZTq8gy3YoUK7KRaDG1iizTrUixIhuJFlPrB+AqbBi/tecfAAAAAElFTkSuQmCC"]}

    If you paste this in a brand new project you will get a sprite :D One idea would be some kind of ability to add an event sheet as part of a container to an object. Or some way to along with the sprite, also copy all events, and other dependacies included with the sprite.

    {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"variable","name":"bignumber","type":"number","initialValue":"2","comment":"","isStatic":false,"isConstant":false},{"eventType":"variable","name":"smallnumber","type":"number","initialValue":"-2","comment":"","isStatic":false,"isConstant":false},{"eventType":"block","conditions":[{"id":"compare-two-values","objectClass":"System","parameters":{"first-value":"bignumber","comparison":0,"second-value":"smallnumber"}}],"actions":[{"id":"create-object","objectClass":"System","parameters":{"object-to-create":"Sprite","layer":"0","x":"0","y":"0"}}]}]}

    If you then take this and paste it to event sheet you will get some events for that object.

    So the idea is that, when you copy over an object (maybe with a modifier key like "alt") It also includes all the events containing that object, and all the global variables and other things the events are depending on.

    When you then paste in your other project (with modifier key) it would paste everything related to that object...

    In theory the solution could work, but I don't know how hard it would be to paste both events and objects at once... :)

    Even better would be if you could select an object, and choose in contect menu, Export "Sprite" with all dependencies, and it would bundle events and image data to a file for you which you could store somewhere and reuse in other projects.

  • Just wanted to comment and say Thanks to the Scirra team for their hard work. C3 is steadily improving and I'm loving every bit of it. A lot of cool and useful tings have been added lately.

    R143 (Beta)

    The main thing I wanted to comment on was the new visual represenation of lines for the Path movement for timeline. I really hope this is just a first step of similar things to come. Working a lot with UI, and UX daily in various softwares I want to highlight the importance of visual feedback of what's going on.

    For example:

    The particle plugin has a spray cone for visual representation. A seemingly minute thing, but has a lot of impact on understanding what the plugin does, and how it works, and what will happen, even without pressing live preview.

    My hope for the future is that more plugins get extended with visual representations similar to this. For example LOS behaviour is one example that would make sense to have a similar visual representation, of the area. The new Orbit is another one that could make use of some visual representation of the orbit.

    The new path lines with handles you can move around for timeline is an awesome example how the usability of this new feature took a leap with this new addition. Great work guys, and I hope it's something you will keep in mind when designing new features in the future.

    Keep up the good work!