WildHairedScience's Forum Posts

  • Maybe this is a bug but it is present in every version of C3 and in the last version of C2 so I feel like I just don't understand. It doesn't seem likely that this system expression has just never worked so I don't want to fill out a bug report until I understand what it is supposed to do.

    I have a project that is 720 x 720 at the beginning. If I set a text.text to OriginalViewportWidth it shows 720.

    If I then resize the canvas to say 1080 x 1080, I though OriginalViewportWidth should still show 720, but it shows as 1080. The manual says, "The value of these expressions does not change even if actions like Set canvas size are used."

    (That's the whole code)

    Is there a way to get the original size of the viewport that is set in the project properties of the editor without manually storing it?

    Tested on current Edge and Firefox.

    Tagged:

  • The C3 editor works great offline. Previewing projects seems to work for some time but eventually stops loading. At first I thought it was a time issue, like it will work for say 2 hours but needs to connect to the server again. Now I suspect it is related to adding new types of objects or something like that. I haven't been able to do controlled tests though because it takes so long to fail. I have some travel coming up and would like to keep working while in transit.

    Are there a set of rules for when previewing projects will stop working offline?

    Tagged:

  • Ideally, I would like to be able to define a font-family like in CSS where I set a list of fonts and it uses the first available. If that isn't possible, but I could check to see if a font is available I could easily set up logic to handle it.

    I am aware that I can use web fonts etc. but I would rather pick a font on the system so that it matches the UI. I also don't want to just use the 'system-UI' option because I prefer the light versions.

    Tagged:

  • Thanks for the help everyone. For some reason it never occurred to me that I could create multiple instances of objects that don't have a location on screen.

    I think I will go with creating instances of array that have a instance variable called name and making sure I name them each time. That way I can create and destroy them as needed

  • I would like to use arrays like variables. The four things I would like to do are:

    1. Pass them as a parameter in a function
    2. Make new ones as local variables (or the output of functions) to handle data processing on the fly
    3. Copy one to another, (or add the end of one to another)
    4. Check to see if one is equal to the other

    3 and 4 I can obviously do for 1-D arrays using the splitstring, but sometimes it would be nice to do with 2-D arrays. Maybe I could do it with JSON?

    My best solution for passing them as parameters is to make a parameter that holds the UID and make arrays a family. This works but it is clunky and the data I want to pass needs to be in a proper array.

    Temporary Arrays as local variables I have no solution for.

    I first tried to solve this problem years ago in the C2 era, but I eventually got frustrated enough to start using token separated strings as arrays. Back then there was no split string function so what should have been simple like adding one array to the end of another was super annoying. I wrote myself an event-library of functions to handle the missing functionality on token separated strings and it has worked quite well.

    I would like to go back to using the array object but not being able to use them as local variables is quite frustrating. I wish that arrays were just a variable type in C3 rather than an object.

    Tagged:

  • Yep, that was exactly it. I was assuming that was still the same image as file button back from the C2 days.

  • I am making an app for my physics students that, among other things, allows them to step through a video frame by frame. The video plugin doesn't appear well suited to this purpose. If I load the frames from the video into a sprite it works great except that the project is now huge.

    Spritesheets by default are always lossless no matter what format the imported files have in the animation editor. Is there a way to tell C3 to allow them to be lossy?

    It looks like I could probably hand convert export as webp lossless and then use third party software to lossy. Is there a better way?

  • If you export your project as 'Windows (Webview 2)', you can make a MSIX package and submit it to the store.

    Tool to make the MSIX package: learn.microsoft.com/en-us/windows/msix/packaging-tool/tool-overview

    Where to submit you package: developer.microsoft.com/en-us/microsoft-store/overview

  • I use C3 for exactly this purpose. You can see my stuff at whscience.org

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I totally understand the limitations of the free version. It should give just enough that someone can get the feel for Construct 3 but stop short of allowing them to finish a game without paying. That makes sense. They need to make money to keep improving the software. I have my own subscription that I think is well worth it.

    The one limitation that is really holding free accounts back is the lack of families. Without families, C3 feels clunky. Some problems that should be easy to solve are difficult. For example, changing the z order of many objects on the screen so that higher Y value objects appear on top of lower Y value. This isn't a problem that can be easily solved by just using more events.

    I am running a video game making club at my school and every time I run into a problem that I would solve with families I have to either teach them a bad solution to the problem or try to avoid it. I have some students who are on the verge of getting their own subscription, but I think the kind of complicated lessons are holding them back.

    Again, I get that Scirra's success depends on people not feeling like they can finish games on the free version and allowing families would slightly reduce the about of events needed, but I still don't think anyone could reasonably finish a game in 50 events. Even if they could, I would say families are so important to the flow of coding on C3 that I would rather the limit were dropped to say 40 with families added.

    Tagged:

  • totoe Thanks for looking into it. I made some updates based on your feedback (along with a bunch of other bugfixes and improvements to the text function)

    The Objects List on the right side is not scrollinng down the items, if i have to much obejcts created.

    I added buttons to scroll up and down if the list gets too long. Ideally it would support touch scroll and/or scroll wheel but this was easier for now.

    iam not able to adjust Line thickness via mouse input on the sliderbar, via keyboard its working.

    I'm not entirely sure I understand. The sliderbar is for the line opacity. The line thickness field now updates when you click the scrolling buttons, so it is more responsive.

    Let me know if you find any other problems.

  • Updated so that save and load are structured better. Naming of objects works much better. Changing the z order also works now.

  • https://whscience.org/whsvg/

    I sort of had a reason. I'm a teacher and in my state, students cannot use any service that requires giving any personal information including name or email address unless the district has a contract with the service. That means most free online tools are out. They are also on chromebooks so mot open-source software is out. I wanted my students to make SVG diagrams but the only option I found is svg-edit which they didn't like.

    So... I decided to make a very simple SVG editor for my students.

    It's done 100% in events. It doesn't use the SVG or XML plug-ins at all. Objects are invisible sprites with DrawingCanvas on top so that the stroke renders correctly. I probably should have used XML to read the SVG files, but I kept making progress using tokenat type expressions.

    After about 16 hours, here are the features:

    • Rectangle, Ovals, and Lines
    • Fill and Stroke Color
    • One style of dashed stroke and One style of marker-end arrow
    • Export SVG files compliant enough to open in browser or Inkscape
    • Open SVG files (100% working if made here. A little working if made elsewhere
    • Export png
    • Duplicating objects with Ctrl-C, Ctrl-V
    • Moving objects using drag and drop
    • Editing all supported properties e.g. rx and ry for ellipses using TextInput
    • Autosave current project EDIT: Actually working now
    • One line text objects

    On my to-do list:

    • Text Objects EDIT: 1 line text working
    • Undo/Redo
    • Select Multiple/Drag Select
    • Paths with multiple segments
    • Scale and rotate with touch
    • More png export options
    • zoom
    • More advanced color picker
    • Import of svg files that are structured a little differently

    Features I probably will never support include all other object types, embedded images, curved paths, gradients, import of anything that can't be made with this software.

    I recognize this is probably a waste of time and will never be better than existing solutions, but it was fun enough to make and I was surprised at how quickly and consistently I made progress.

    Not sure if anyone is interested in this type of thing. I am considering opening the source code. I have no idea if I do things the same way others do.

    Edit: 2022-11-21 text objects now support outline (sort of). The line object is working again. The last setting for fill and stroke are preserved. The object list has scroll buttons.

    Tagged:

  • Thank you for responding.

    I can use .stop() within the same function that starts the audio, but I cannot figure out how to use it in a separate function to accomplish something like stopping the sound with a button. I am getting an error like,

    Failed to execute 'stop' on 'AudioScheduledSourceNode': cannot call stop without calling start first.

    I apologize if helping me is outside of the scope of this forum.

  • I am using the Sound Synthesis scripting example. In the example, each buffer plays the sound for a fixed amount of time. I want the option to stop it early.

    Is there a way to stop an audiobuffer that is already in progress? I am certain that my wording isn't right, but I hope the meaning is clear. I tried reading the audiocontext and audiobuffer mdn documentation but couldn't figure out how to use .close() in context or whether that is even the right method.

    Tagged: