@the_true_odst try console logging stuff to ensure, put a console log before you create the clone (in the if) to ensure it’s actually triggering properly
Posts made by Tyller_
-
RE: Clone won't appear :(
-
RE: Forever loop won't work for 2 clones in a single sprite:
@the_true_odst make it so if they touch it they say something or use print to console. This is how most programmers (allegedly people using languages other than JS dont do this but I still doubt that) debug stuff, you add a bunch of prints to ensure what is broken, like is it the touching detection or the cursor, you dont know becuase if one doesn’t work, the other won’t (if touching doesnt work then the cursor will never change, if the cursor changing doesnt work you wouldn’t know becuase the touching would be trying to use something that’s broken)
-
RE: Forever loop won't work for 2 clones in a single sprite:
@the_true_odst first, I’d recommend maybe using an if else, second, add a say to the start as clone block to verify tehy exist and where they are
-
RE: "delete all clones" block
@c no, you would do
when I recieve broadcast “delete clones”
-delete this clonebecause that forever and delete would only run under hte main sprite
-
RE: Making a variable occur to each clone instead of all of them
@the_true_odst it does work like that, if you have a sprite only variable and update it, it will only update for either the original sprite or clone, it depends on the scope of it, like when I receive broadcast hat blocks trigger for all clones, but stuff like when this sprite touched trigger per clone,
you can prove that it is per clone by making it so when they start as clone they set a sprite only variable to 2, then say it, and you can see that it shows to you that variable is whatever it was before (because you see the value based on the main sprite)
-
RE: New block: Round by {number}
@attractive-milk well this one is already easy, I just suck at explaining stuff in simple ways
-
RE: New block: Round by {number}
@the_true_odst well that method is already pretty simple, plus you could make a custom block to do it
-
RE: New block: Round by {number}
@the_true_odst you can do this already in a simple way. Multiply the number 10 to the number of places you want (so for 3 places 10^3 or 1000), round it, then divide by that number
For example, to round the variable “money” to the 2nd decimal: round( money * 100) / 100
-
RE: Decimal Counting Bug
@the_true_odst This is impossible to fix, the issue is with floats which are known to do this. The only fix I’ve every thought of to this would be to make it so that the real value has it so at 1 it’s stored as 100 so at 0.01 its stored as 1 and will accurately go up as such
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst in the files app for your chromebook make a new folder, then make three text folders, make sure you have show file extensions on, and rename one to index.html, another to style.css, and another to script.js, I would recommend for this initial setup and for learning the basics of js very quickly, ask an ai about it, Im not saying you should have an ai make it all, but ask it for stuff like what a draw loop is or when to use multiple js files, I think an ai could better explain what Im trying to say in context of a chromebook
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst in your file explorer you make that folder setup, I have done some checking and found you dont need the express js server, you can just make a folder with an index.html, style.css, and script.js (style.css is optional but technically shoudl be there), you can then actually just double click index.html and open it to do stuff, this is for messing with js and doing sutff that is only on your client but is good enough for programming.
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst you can have a folder directory like
Client - index.html - style.css - script.js server.js
Then in server.js have
const express = require('express'); const path = require('path'); const app = express(); const port = 8081; app.use(express.static(path.join(__dirname, 'client'))); app.get('*', (req, res) => { res.sendFile(path.join(__dirname, 'client', 'index.html')); }); app.listen(port, () => { console.log(`Server listening at http://localhost:${port}`); });``` if you don't understand what I'm saying I think jeff could probably explain better (or chatgpt could help you understand),
-
RE: I might leave Creaticode soon (actually this time)
@jeffreyrb03-gmail my current game I’m “working” on (just making new stuff and adding to it) the only library I have is simplex noise which I actually dont even use right now (am going to use it eventually, but rn I just define a noise with it to make sure it works and do nothing afterwards) I am about to start a new project and am thinking about using p5js for it (it’s going to be pixel based in the theme of every pixel does something, and am thinking about using it for the pixels array reference thing) but in general just making stuff work.
I don’t know if this is making the engine but like in the project I made tile map and sprite rendering, chunk based storage, defintions for a new entity, new entity type, new collider shape/collider, and new ai type, definitions for a new tile type, and velocity based movement with decay. Ig most of that stuff would be engine level kinda, but still it feels too simple (kinda) to be called an engine.
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst I mean because you can’t use unity you can use javascript for the game engine and everything, I just have a canvas tag I full screen and some extra stuff for debugging (I have a div I can toggle showing with ` that lets me see values I log and live reading some variables, though that’s just cus I can’t see the browser console on my ipad), what I’m saying is just writing your code and that does everything (say for some libraries), I think this would be no engine/make your own engine (I dont like saying that because it makes it seem hard but it’s effectively that).
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst if you want to do javascript (since you should be moving to js or python and personally I prefer js) you can do testing stuff in your browser, I make stuff that’s just a glorified canvas tag (one fullscrene canvas) and do stuff on that, if you want a script to see how to host a local host server to test js stuff on your local machine with nothing extra (no hosting stuff where it could be screwy) make an express js server and just run it when you’re testing, I can give you a script for the express js server if you don’t want to make it (I got mine from chatgpt since I just want to host my files to myself easily)
edit/PS: When I say host I dont mean host to other people, you’re ISP (internet service provider) almost definetly doesnt allow port forwarding, so it just lets you play games and stuff with it on your local pc
-
RE: Need help with finding a way to have fluid aiming at clones without delaying movment
@sirbots I think you should mkae a suggestion where the sensing block I was talking about (variable of sprite) does the reference thing that I had previously suggested it do but my suggestion was only related to 2d physics, the method they made was “cloneid|spritename” to rerfefernce it, it would let you not have to have a list/table of all the x y positions (the issue with that is it has to set to that table every frame, which unless you dont do would be the only way to improve it)
Send me a picture of the scripts, the only improvement you yourself could probably make with it is either using a turn towards sprite in 0 seconds block or if you dont, use a table/list for target x y positions (I assume you do already)
-
RE: Need help with finding a way to have fluid aiming at clones without delaying movment
@sirbots I believe i have done something like this, the issue is you can’t reference clones with the vairable of sprite reporter (the sensing block that lets you see sprite only vraiables in other sprites and their x y positions) I think they tried that but something changed after a while and reverted it (or it was only for 2d physics blocks)
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst you use the intended and actual as a back bone, for the gravity you just set the intended x and intended y values at the changing, your gravity was mainly change y by 2 every frame and then change y by negative 2 to go down (from what I remember), you can set the intended y speed to 2 every frame (you dont need to every frame but it would work) and then the same with negative, you wouldn’t use 2 because multiplayer blocks make sprites move slower than if you moved them yourself so you have to retest it
basically, you replace all change y by blocks in your gravity with set intended y speed to a value and test for what they should be
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst I can try, you should look at the space shooter tutorial for what I’m talking about, I will make a demo when I get the time
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst you may require some width and height, also you do run create game before that right? and its run in a clone as well right? the most likely issue would be you’re calling synchrously set x y speed every frame, so the server gets it all and eventually just stops receiving from your client due to spam, this is called timing out, the best wya to stop this from being a chance is having four variables
actual x speed
actual y speed
intended x speed
intended y speedthen every frame you check if the corresponding actual is equal to the intended (and update the intended to change speed and stuff), then if they aren’t equal, syrcrhrously set x y speed to intended x y speed (with the variables), set actual x y speed to intended x y speed, then the if statement ends
there are examples of this in the basic space shooter creaticode tutorial example, the reason for this is not explained but most likely because CreatiCode doesnt want your client sending massive amounts of data to their server every frame when it’s not neccassary
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst you create the game with your create button, then you use the add this sprite to game in the clones, you need to make sure the player is a clone with a unique name (I find the best option is usign the username full name or user id for the clone id), run everything for the player in that clone, and put the add this sprite to game for that clone
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst you’ve created the game and added hte sprite to the game right? if you have then it’s probably you should do what other people do with an intended x y, actual x y, and only update the sync set speed when these change, the reason you do this is beducase (I believe I’ve tested htis) there’s a time out on the connection if you use it too much
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst you do broadcasts for actions, you dont update htem, the synchrously set x y speed and other blocks like that are the way you have to use to update player positions, when you set it on one client the server gets that info, and sends it to all clients (including your own I’m pretty sure) so that clone does stuff, you dont handle the movement for other client sprites manually, creaticode does it automatically (which is a lil annoying)
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst it could likely work, I’m not sure why i was thinking 2d physics stuff (ig cus walls) but that would probably work, you can make the demo stuff to just create your own game and use syrnchrously set x y speed to try it, but I guess it probably should, though with varying heights off ping and the heights would need to be adjusted due to it being slower
-
RE: Ultimate Chicken Horse in Creaticode!
@the_true_odst I can help! It may be hard to make gravity work and stuff like that, your best chance may be making it so you have the player sprites/a sprite that acts at the current clients player, then a display sprite that clones itself and gets added to the game, and the display sprite does some magic to make itself try to follow the player sprite, I have some ideas on how you could do the sync x y movement changing, but the issue is that the synchrously set x y speed isn’t really that good, for example if you set it to 10 10, it moves at a semi arbitrary speed, but it will be twice as fast at 20 20, but still with an arbitrary “real” movement speed, it has ping stuff and you can best test this by setting speed to 200 200, then waiting 0 frames (or 1 frame) and setting speed to 0 0, from what I remember it will definetly not be at 200 200 (the x y position, and that makes sense) but it will most likely be at some random x y position below 200 200
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst can you try control alt f2 and then logging in as “chronos” with no password, this should let you run sudo
-
RE: Maybe Creaticode knows the issue:
@the_true_odst You can do it so it generates terrain nearby the player first, and either while the player is just playing and/or as the player comes near, generate more (broadcasts are async so if you make it so stuff is done using non waiting broadcasts it wont slow down the game much and you can let them play faster)
-
RE: I might leave Creaticode soon (actually this time)
@jeffreyrb03-gmail Fun fact, you can still (somehwat easily evenly) get a memory leak in js, I wanted to just say this to someone, but in using a function I had made that clamps a number between two values, I forgot the .x/.y on my references, and calling it every frame to add it to something caused a memory leak (still dont understand why it called them like that, it was just an object that tried to have math done to it, returned, and the value is added to a number, shoulda juts made it NaN imo)
-
RE: I might leave Creaticode soon (actually this time)
@the_true_odst Best of luck! I can provide tips on some stuff, I know JS quite well and in general would recommend very much you learn JS before trying to learn something like C#, especially since creaticode/all scratch related things aren’t that object oriented, so starting with learning the basic object oriented language that all websites have to use (for the browser) should be a priority, or doing unity/roblox lua
Edit: something else, do not be afraid to use ai, but don’t use it all over, just make sure you read the notes on what it writes (I have found that chatgpt is best at doing this and gemini by google will sometimes not explain as in detail) so you are learning from it and understand what it’s doing, that way you don’t just get some code that you put in your project and don’t know how to debug. Also you shouldn’t jsut get ai to do the hard parts and you do the easy ones, if you think you know all the concepts needed for a mechanic, even if it would be hard to implement, try at first, if you fail and want to use ai, you can ask it for a layout for how you’d program the mechanic (so for a acceleration system it would tell you to have a variable for acceleration added to the velocity every frame, not just give you the code), and if you don’t know how you could do some part of that layout, ask it how you would do it in the language you’re working in, it can help you learn new functions quite easily
TDLR of edit: if you want to use ai to help you program, you can use it, but don’t make it program for you.
-
RE: New website I'm working on
@jeffreyrb03-gmail I dont think it’s obfusc ated to make it unreadable intentionally, minifiers willl screw up vairable names but their still functional, if you do have visual studio code (or you can use vscode.dev, which I doubt your school will have blocked as mine doesnt) you can use the rename symbol function to go through and deobfusc ate, since it detects the scope (The reason to use it instead of renaming in symbols on your own is because compilers/builders will use same variable names for minified names often, but this preserveas scope), and Ik you dont have to read that code, but its a good trick to know (I only know it cus a small game I found that’s an electron app has a good small modding community, and the mod loader has a patch system for the bundle, so I had to learn how to read/make bundles more understandable)
PS: I have had to add a space in the middle of the second half of obfusc ate because it triggers the filter
-
RE: New website I'm working on
@jeffreyrb03-gmail I get this, if you haven’t (I think you probably have) you can either open that in a web browser side bar, then control a and control c the entire script since the web browser adds indentation to it in the script preview, or you can use something like npx prettier to make it readable (readable as in with new line characters and spaces), though I don’t know if your school has stuff like visual studio code blocked.
Google probably has their source page like that to format the search urls to have tracking stuff (or if google doesnt shove it in the url, probably session storage or just sends it straight to the server, or probably both of the latter ones)
Also what you can do for server testing (though ig you said you didnt want to use a server but just something to note if you ever want to switch to a server system) is use ngrok to expose your ports, ngrok is a free reverse proxy for development testing, and it’s limits are quite generous (doing some math says its monthly limits, if it was used constantly, are about 1 TCP connection, 1 TLS connection, and 4 http requests every 10 minutes or so, if used every 10 minutes for a month to do one of those, which is very generous for development purposes)
-
RE: @tyller_ Chat Room project thing
@c I’ll go fix that, I have the default message setup to notify some people of reports and must of messed it up in the project side
editing this cus I fixed it in like 4 minutes, it seems that the only way you could of gotten that is if it saw your user id as blank, for my alt I have a placeholder setup since I haven’t used it in a while so I haven’t gone to get its user id to set it. I left the place for the user id blank, so I just tested and if the user id is nothing it’ll detect your user id as being for my alt, I have made it so it has a dummy value, but it’s weird that it ever triggered since it would require your user id to be nothing.
Something else, I didnt realize you could make a world without a password and name, I thought I probably would of thought about that but I r have realized I didnt, I jsut made a world manually (via editing the sheets data) to have one
edit 2: I’ve also made it so it trims world names so you can’t make worlds with spaces/whitespace for names
-
RE: What is this?
@info-creaticode That sounds amazing! I think I sometimes will try that with people in classes at my school, though (maybe like what the ai could be like) I’ll sometimes just give the answer if they really don’t understand
-
RE: What is this?
@sirbots a quick google says it’s probably makes it more professional/better at solving errors, I found that being socratic means you ask questions that make who you’re talking to think more, helping you to understand/process what is happening in your program more in depth
-
RE: VR?
@jd131111 if you want I can give you an example for hand tracking I’ve done, it’s a bit laggy but works (it maps hand detection to 3d, the issue is that it takes a lot of processing moving 46 points every frame for both hands)
-
RE: VR?
@c that happens when the detection isn’t working, if you really try you can see that if you move your face out of frame nad then back in, you’ll see placeholder/debug joint spots (orange and blue dots connected by white lines) from one of the body part detection blocks
-
RE: So, There is a bug here. Can anyone fix it?
@sirbots Im curious, was it misplaced blocks elsewhere? or did you accidentally set something like box or the change thing to something else
-
RE: So, There is a bug here. Can anyone fix it?
@sirbots can you add a thing to draw a circle on the target? does the bot appear to be not moving anymore/on the target when its going down slowly? whats the distance showing (rounded)?
-
RE: So, There is a bug here. Can anyone fix it?
@sirbots yes, do that or just copy the distance block and put it in a varibel set in the forever loop, then set so that variable is shown, or just make it say the distance in the forever loop. The intent is to see whats changing with teh distance
-
RE: So, There is a bug here. Can anyone fix it?
@sirbots copy and/or take the distance block and make it so a variable sets itself to the distance (or make it say the distance) or just drag it out, that way you cna see what hte distance is each frame
edit: The only thing I can think of rn is maybe you mixed up cos and sin (like got them backwards) cus I dont know that off the top of my head
-
RE: So, There is a bug here. Can anyone fix it?
@sirbots try adding a console.log or set variable to with the distance block, I dont see an issue here sso that’s the main way to debug
-
RE: using the "pen" to create smoother lines
@jeffreyrb03-gmail yeah if you copy a block and edit its name to something invalid it’ll show that, pretty sure any block that actually renders means it does have a texture or something about it defined
-
RE: Add blocks for detecting mobile devices/touchscreen
@jeffreyrb03-gmail yeah but with some touchscreen it allows for mouse and touchscreen, so maybe header blocks for when touchscreen started and when non touchscreen started? or just a booolean for if touchscreen is in use (whether last press was mouse or touchscreen) then manually detect changes and run scripts (toggling joysticks etc)
-
RE: Add blocks for detecting mobile devices/touchscreen
@jeffreyrb03-gmail I dont think you can directly detect touchscreen but you can definetly detect if its mobile (like you said with user agent) because devices might not broadcast touch screen support, though you could detect as soon as a touch is detected, though I think you have to detect touch differently than mouse clicks (pretty sure) so you can even detect if touchscreen was last used
-
RE: Messing around with Brain.js
@jeffreyrb03-gmail how much training data are you using? I might try brain js for some stuff if it isn’t that computationally heavy
-
RE: Drop game simulation
@flores-yorkshireacademy do you mean reattach the child parent link? I don’t fully understand but I can understand how they have it setup currently.
After thinking a little bit more, do you mean a link like a rope system where it can dangle from the object representing the drone
-
RE: ngl, the remote edit is a great feature.
@jd131111 It used to be premium only but they changed it
-
RE: New website I'm working on
@the_true_odst all websites have to use javascript, I dont know how much you have to use html stuff for drag and drop so I can’t answer that, but for main functionality it has to be js
-
RE: Is this VR?
@c hands would be very hard, I can think of a hypothetical where a browser extension sets data or what I have thought about for controller integration (or scuffed really) a program (or ig extension would be easier to more specifically spoof) moves your mouse to a mouse x / mosue y position based on controller rotations and presses keys for key presses, then a sort of library sprite that interprets this, Ig an browser extension would be best for this sort of thing (if it was ever made) since it could spoof decimal values for mouse x mouse y
-
RE: Age Block?
@jeffreyrb03-gmail I think that an age restrictions should be on the main project page, since stuff in the editor is related to building, and everything the developer can access on the project page is related to publishing (description and credits and title are mainly only on there, title would count as coding for organizing) so age restriction should go there, the viewport and canvas sizes are also not related to publishing