Posts made by Tyller_
-
RE: Is it possible to code this?
@blujey1294-328b9bc4 you have to do forever loops so the x and y variable places are set to the brains x and y, and the PlayerX and PlayerY are set to the x and y of the player in a forever loop. I can make an example if necessary
-
RE: Is it possible to code this?
@blujey1294-328b9bc4 This should work (I haven’t tested but it should), the letter 5 and 6 of clone id are for the - and + symbols, and the dupe prefix is to make it different from other clones
edit: that go to should be in a forever loop*, and you can add a ghost effect based on boss health
-
RE: Is it possible to code this?
@blujey1294-328b9bc4 you can try this logic:
Create 3 clones
each clone has a unique id (for complex and less repeated you can try something like -+ ± and --, for each axis and diagonal)
handle each clone id under three if else statements
have two variables for the original sprites x and y, and the players x and y
each clone does the following:
subtract the sprites x and y variables from the players x and y variables
then for each individual clone:
-the first clone multiples the x by -1 and doesn’t touch the y
-the second clone doesn’t touch the x and multiplies the y by -1
-the third clone multiples both the x and y by -1
the players x and y are added back
each clone goes to these final resultsBasically this reflects the x and y across the corresponding axises for each clone, treating the player x and y as the origin point
I can make an example set of operator blocks to show how to do all this math
-
RE: I need help with my chatting system
@info-creaticode IT would allow me to have each client receive only hte user id from another client in a message broadcast (instead of both the user id and the user pfp url) and then get the url of that person and their pfp, basically not having to use the broadcast message to send data the receiving client could of interpreted (I believe i send the user id through the broadcast message, if I don’t then I probably will add that because it’s less length than a url, if broadcast messages have a length limit)
-
RE: I need help with my chatting system
@info-creaticode can it be made to have an input for their user id so I don’t need to send the pfp along the rest of the message?
-
RE: Code block presets?
@jd131111 this would be like a public backpack with verification to submit to it
-
RE: Error with forums
@jd131111 oh I see it its this (more context in this photo) it does indeed go there
-
RE: Error with forums
@jd131111 you sure it sends you there when you click the clock icon? it’s labeled with rss, I get sent to https://forum.creaticode.com/recent instead
-
RE: Something in this script is crashing
@info-creaticode I have sent the email from my school email so it’s different from the one on my creaticode account
-
RE: Error with forums
@jd131111 I just go to
https://forum.creaticode.com/recent
so something is weird -
RE: Something in this script is crashing
@info-creaticode I seem to have fixed the issue with some adjustments but not the log, I can set the project to shared tmrw when I have some time since its my chatrooms project and I need to adjust it so all sheet blocks reference one variable for the sheet (that way I don’t have random people accessing the sheet)
-
Something in this script is crashing
I have the script and SOMETHING in the for loop is crashing, I tested wtih just dragging out the for loop and it doesnt crash, the error it logs is
scratch-gui.4249d868093d19d7e7b7.js:1750 Uncaught TypeError: o.toLowerCase is not a function at Scratch3OperatorsBlocks.value (scratch-gui.4249d868093d19d7e7b7.js:1750:2355893) at scratch-gui.4249d868093d19d7e7b7.js:1728:78991 at e.value (scratch-gui.4249d868093d19d7e7b7.js:1750:673208) at e.value (scratch-gui.4249d868093d19d7e7b7.js:1750:668735) at m.value (scratch-gui.4249d868093d19d7e7b7.js:1430:182027) at scratch-gui.4249d868093d19d7e7b7.js:1430:191377 at o (scratch-gui.4249d868093d19d7e7b7.js:1430:190732)
Edit: I realized I did have lowercase blocks in there, which I have removed and it did work (still dont know hwo they caused it, I removed htem becuase I realized I was broadcsating the world name which when I set the world name the first time I have it lowercased) but now the isuse is it seems to just not fetch from the sheets doc? error is now
scratch-playground.050a4bba48f4da8d0101.js:55 GET https://web-agw.creaticode.com/api/block/v1/speech/google/sheet?spreadsheetId=1nzHTgYnCk9AkKvOJFAnnWzQgcFl2-zg4aMq2G6cdIk0&sheet=Messages&range=A1:Z100 500 (Internal Server Error)
|Edit 2: Okay I have acutally checked the list and that error seems not to mean anything, but I have now found it fills in blank columns and rows, so I can’t just be lazy and say from column A to Z and down a bunch of rows (instead I gotta do column A to whatever and a bunch of rows, it used to just limit filling the table to wherevever there was data and not fill past that I’m pretty sure)
-
RE: WARNING ABOUT STORING SENSITIVE DATA IN PROJECTS
@jeffreyrb03-gmail sure, though I can mainly help with debugging as I know general node js, I mainly know how to make discord bots but have dabbled in the sheets api, you need to make a google project (I don’t remember the url) and to get a service worker to interact, though I’d assume if they have a sheets thing it would be in the extensions add on section
-
RE: WARNING ABOUT STORING SENSITIVE DATA IN PROJECTS
@jeffreyrb03-gmail I’d assume the rate limit would be per client, and when creaticode gets popular there would likely be some people using a forever loop read from a google sheet in regular projects, and to brute force you’d have to do that (since the delay on sending and stuff would most likely be on the server side) even if somebody dove into the scripts to reverse engineer it. PLus my reason for making it in creaticode is because its meant to be for everyone here to have a chatroom instead of having to use forums, and I don’t want to just make a standard chatroom app (plus then I would have to do stuff like make sign in logic or use google oauth, and it would be hosted behind my ngrok url). I very much plan on eventually sharing the project so other people can (attempt) to learn from it or use it, though I want to make some improvements before making a version where I remove any references to the sheets url
-
RE: WARNING ABOUT STORING SENSITIVE DATA IN PROJECTS
@jeffreyrb03-gmail good point, but if I use apps scripts then I can write javascript for whenever a cell is edited, then just parse that data as a packet and show a response for ~2 seconds (so the service bot can get it and I can have a wait block to allow the apps script to register the data) and then the client deletes the response to show it received it (I can even add logs to try and watch for abuse) this method with even just 10 sheets (if google sheets doesn’t lag from too many sheets I could use 30 or 50) would make it so it’s hard to try and mass scr\ape [I couldn’t post because it thought I had a bad word in my post and I had to use the find tool to find it’s flagging the middle of this word] it through the bot (especially because there’s a rate limit, I did a brute force test of the rate limit and it seems every about maybe 20 calls of a read/write sheet it locks you out for about 5 seconds, something around that) so it would be near impossible
-
RE: WARNING ABOUT STORING SENSITIVE DATA IN PROJECTS
@jeffreyrb03-gmail I have considered this and ngl all you’ve said is right. I have thought about how since the blocks are just xml and stuff and still the client needs access. I have considered making stuff more secure and the issue is indeed that hypothetically, if somebody really REALLY REALLY wanted to they could find out. Personally I haven’t checked inspect element yet but it defo is possible. Though I have some ideas for a secure way, but they require you to have a 24/7 server to do stuff (I do have this with my laptop that I use as a server which I may try implementing into my chat rooms).
(btw if you’re reading this and want to know my method, it’d basically be I only give the service worker account that creaticode uses for interacting with sheets access, this would be so that the only way to check for new data in the sheet is using the read sheet block. Then I’d have my laptop constantly scan that sheet for changes and any changes would get a response in like 1-3 seconds and then wipe the response to finish, this would allow the client to send a message and see that it’s been uploaded, or request the message history for a world and the server sends, any messages sent while the person is in the server would use my current cloud block packet system. edit/ps: Ik this technically wouldn’t be secure cus somebody could hypothetically scan all the various sheets, I’d have a bunch of sheets to receive data in so you can’t read one sheet a bunch and have to read ~10 every second to intercept data Edit 2: I have found I can use apps scripts in the google sheet to do this, and it may be the only way I can actually since there seems to be nothing in the external api to run stuff exactly when a sheet updates)
-
Sheets API Not Working
I have changed to hte sheets api for my chat rooms project, and it seems that I am unable to read or write to the sheet, I have verified the user and sheet names and it seems it was working but has stopped working for reading at all, it just immediately skips (though now that I Think about it it may be the cloud blocks because the create random world i have to fix a minor bug, is just immediately skipped)
After further testing i have found that intially they work, but after they reach it seems that it reaches this and freeezes, then it goes on and after this block runs then the above bug (null returning) happens, but before it runs it will return the proper output for the referenced cell
TLDR: It seems that either just reading, attempting to read a lot of data, or reading a lot of data (the actual table currently has 3 columns by 16 rows so I very much hope it isn’t reading too much data) cuauses cloud blocks to lock out
-
RE: Chat Rooms Project
@tyller_ This has been updated to use the google sheets blocks! This means it will have no limit to how many worlds/messages/users there can be (each user is logged to show usernames when loading a world and to allow banning)
The sheets url is not shared (I can make a separate project without the url referenced for sharing) so all messages/worlds are secure, I will attempt to reimplement moderation commands shortly after I send this post
I can add “themes” (other styles of the chat screen) if requested, these would be stuff like text box based messages (all messages are shown in a large text box and you have a text bar to type). The purpose of these would be if enough people don’t like the default CreatiCode chat style
-
RE: How do I make a 2d game that's multiplayer?
@jd131111 This one is when you add a clone to the game with the add sprite to game as shape block, it will run the “when added to game” hat block as that clone which is then spawned on all clients, also it makes it so whenever a new player connects to the game, it will spawn that clone for them and run the “when added to game” on that client example below
(In this example assume that you set in the prepare for green flag hat block to create/join the same world, so everybody is connected to the same world)On green flag click /
Create clone of myself with id (username)When I start as clone /
Add this sprite to game as [rectangle]When added to game /
log to console (clone id)when the first player (lets say their username is “playerone”) joins, it will log on their client “playerone”
When the second player joins (lets call them “playertwo”) it will log in their console (playertwo’s console) the message “playerone” because the clone that the first player added to the game gets spawned on this players client and runs the when added to game block,the then both clients (playerone and playertwo) will log “playertwo” because playertwo’s clone is now added to the game (edit: and spawned on the other players client), I can make a demo project if this is too confusing (edit: you repeat this logic for all players, and a side note, the clones positions are synced when they spawn in, but to keep their positions in sync you have to use the method shown in the 2 player space shooter example by CreatiCode, where you rely on the sync set speed to move them) -
RE: typo
@jeffreyrb03-gmail Something to add on since I don’t want to make a new post to mention this, there’s also a type in the synchronously set direction multiplayer block
-
RE: How do I make a 2d game that's multiplayer?
@jd131111 https://play.creaticode.com/projects/6613fb5b564fc287b0e8cfc2
is the link, I have a project if you want variables synced across all clients (my project is formatted like an api where you just use custom blocks that you drag into any sprite in your project, and those are just used to send formatted broadcasts to interact with it) -
RE: How do I make a 2d game that's multiplayer?
@jd131111 You use the multiplayer extension, creaticode has an example and if you want something specific I can provide a demo (though my methods of using stuff can be a bit elaborate)
-
RE: Army Games
@s9205307-810c679a That would most likely be okay, as long as there’s no detailed particles for it
-
RE: Score (on profiles)
@jd131111 Score is effectively reddit karma (I think downvotes on reddit make you lose karma so it would fit), upvoting somebody’s post gives them one score, and downvoting one of their posts gives them minus one score
-
Current error with accessing the website
Currently you are inable to access the website, the developer console shows a bunch of error code 500s
-
RE: Moderation System Not Working
@s9205307-810c679a it’s because you removed the get moderation result for text block from the reporter (I had looked around for a little and some red hat blocks appeared in the sprite, I copied pseudoscripot of them and pasting that revealed they were get moderation result for txt blocks, so it might of bugged out and removed them from in it)
edit: PS: Can you organize the sprites some? it took a while to find what does what or what broadcast leads where, a description of what sprite does what in a note in the backdrop or the project description would be helpful
-
RE: Issue with copy table to table and append table to table
@info-creaticode I remember seeing something like it happen, I am going to try to reproduce it rq
edit: It seems I am misremembering, either I’m not doing the exact steps or it was always like this but it seems to be doing it for columns, if i add a column to either table after using copy it adds to both of them
-
Issue with copy table to table and append table to table
These blocks (I believe I’ve tested append to as well) take a table’s contents and put it in another table, but the issue is that it seems to sync stuff that is done to one table with the other, so if I copy table a to table b and set row 1 column hi of table a to “test” after copying, it sets row 1 column hi of table b to “test” as well, my guess is it’s some js variable cloning stuff going on (it doesn’t deep clone but soft clones so references are the same)
-
Physics Cell Game
This is a game I have made inspired by Cell Machine by Sam Hogan, if you don’t know that game, the basics were that you place some cells that do stuff and then start, in the original you have no control after that, but in this and all other projects based on it, it’s pretty much a sandbox game, which is what this is!
You place cells and let them do stuff, this is fully mobile compatible (as I made it when I didn’t have a keyboard) so I plan on adding some pc friendly features (aka keybinds).
The project is very mod/remix friendly, to configure a new cell look in the backdrop for the block stack without a hat but with a comment labeled “cell data refresh”, you can add cells by adding rows to the table with the method used there, I’d recommend commenting where your cells add for it to be easily adjustable to combine with other mods, I may rework so the cell data definitions are called at the start and are per sprite, now that I think I definitely need to do that because of how the next part works. To add functionality to your new cells you need to duplicate the Cells sprite (recommended so it can be dragged into other projects and used with other mods) and under the cell tick function definition, delete all the if statements there except for one of them, you can delete everything in the if statements but not them, it has the basic setup for how the cells work, spawn is called when the cell is created via any method, life is called every frame, and death when the cell is deleted. (After typing this I realize I definitely need to rework some stuff to make it mod friendly, I’ll work on that right after posting this)PS: I realize my modding explanation is a bit convoluted, I can provide a better explanation in the forums if somebody wants it here
Link: https://play.creaticode.com/projects/656f2d7cddb1c8a68dee29d6
-
RE: Overlap object detection is bugged or not working
@011830-0a42ef84 is the player object (object with label player) the avatar or the yellow box, if it’s the avatar then the reason you can’t detect it is because both the rope and player have collision, so they collide with each other and can never overlap, overlap means they’re inside each other’s colliders, if the yellow box is labeled player then try turning on non blocking collision on that (and shrink it so the player can’t climb ropes from too far)
-
RE: Overlap object detection is bugged or not working
@011830-0a42ef84 is non blocking collision turned on for both?
edit: I had looked over and is player the yellow box or is the avatar the player, if the avatar is the player object then that’s why
-
RE: Importing glitch
@s9205307-810c679a I’ve seen that, for some reason they still function as whatever they were but they show as that
-
RE: Fast Sync Variables Lib
@info-creaticode it does that in the backdrop, the lib is intended to have the setup ran after the user has joined a game, everything in backdrop is for demonstration purposes
-
RE: Fast Sync Variables Lib
@info-creaticode well it’s an iffy example for learning, I use the synchronously set direction block (because it’s the only multiplayer block where you directly set the value of the block, and multiplayer blocks use web sockets I believe, which i know are the fastest communication method) to set the direction of several clones precisely.
I use some math to turn the value that is supposed to be synced to several directions and vice versa.
(The person using the lib manually sets how many extra clones there are for each value, though 2 are likely only ever needed because 2 clones alone is 12600 max value)edit: Ig I’ll add comments because if people want to learn more technical details (or they know how technical stuff works and just need some explaining)
-
Fast Sync Variables Lib
I have made a project that uses the multiplayer blocks to sync any amount of (positive whole) numbers tied to labels pretty fast.
It’s like a library (coding libraries are files that you import into a project containing pre-programmed general purpose functions to make coding easier), you drag two custom blocks that don’t take up too much space into any sprite where you need to use it.
You can add any number of labels that will be across all clients in the sprite you backpack.
Everything you need to touch is in the upper left corner of the workspace.I plan on making more projects that act as libraries, provide any feedback in replies! (if somebody wants to understand what it doing I can add comments to the project and explain in replies, but you would only need them if you want to understand how it works, you don’t need comments if you just wanna use it)
https://play.creaticode.com/projects/67320febbf68856fe984969b
“Did you mean for it to say “Lib”?” - Catty
”Yes, lib is the standard abbreviation for library across all programming languages” - Tyller -
RE: Forum update -- "someone typing"
@011830-0a42ef84 well since the forums aren’t meant to be a chatroom there isn’t much use to see if a user is actively typing (ig actually if you want to know if you should wait for a response now or come back later if could be useful)
-
RE: Clone animations
@011830-0a42ef84 broadcasts are for all clones, you can either broadcasts something and check if the clone id is of that clone or in the start as clone change the costume
-
RE: Music bug
@c6099952795-bd492b4e what do you mean your file still has them? like your file explorer still shows them on your pc? if that’s what you mean then that isn’t a bug or even possible to be “fixed”
-
RE: Shake screen
@011830-0a42ef84 you could make this why just setting the viewport x slightly offset, and if you lock viewport to sprite then locking it to another sprite that always goes to the intended target but is offset while shaking
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail okay so my current plan is to have it write to the sheet in a specific cell and use an extension in sheets to either copy the raw data (one cell for it all, using join with and some stuff to prevent the data from escaping, if you want to know what I mean then ask) to one cell, and have the user just read all the data and format it on the client, or I can have the user post data to a random place in a receiving sheet and the extension copy’s all the data that the client posted into the sheet
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail yeah, with projects that require a server my idea is you just assign the oldest client (or if it’s a project with a lobby the host) to be the server and have some checks so if the host leaves the world then the project tries to assign a new host, the pop up when you try to close the page would make it a lot easier to have the client acting as the server “gracefully” transition the status of server or save data when they try to leave
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail yeah, but with uploading I’m thinking about all the logistics of not having two clients try uploading at the same time, and what if the client being used to upload data just closes the tab (when the warning when you try to leave the project page is added that won’t be an issue, unless request animation frame is paused by that prompt) I have many ideas and I think I have the willingness to try some rnrrr
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail that does seem like a much better idea, but whats the limit on the database row count, I’d asusme it’d be about the semantic or knn limit (100 for regular users 200 for premium, I was reading docs and scrolled over it)
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail Im going to try using google apps scripts, currently I’m attempting to find the rate limits but am unable to find the free rate limits for any of it
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail I just need some ideas on how to implement it, not 100% sure on my logistics plan with this
edit: also we have to use google sheets if we do go through with this because my home wifi doesn’t allow website hosting (looked it up to verify I wasn’t being stupid with the port forwarding not working) so I don’t think using fetch webpage as markdown (and chanigng like an unused parameter url so it doesn’t cache) would work unless you can use that not to send the delayed fetches (creaticode said it lets page content load)
-
RE: Inquiry about some stuff
@jeffreyrb03-gmail all my plans involve self hosting on my laptop (its how I hosted my discord bots), wher eI use the google api (already used to download files to google drive, don’t ask I went insane trying to) to constantly read a google sheet for changes (or set a handler) and run some stuff when somebody writes to a sheet, which automatically formats the message data into another sheet which all clients can read (but the project isn’t shared), also you can’t write formulas to a google sheet, trying to prefix anyhting with = when writing a table will put ’ infront of it in the google sheet
-
RE: Inquiry about some stuff
@011830-0a42ef84 I’m just wondering if jeff would like to help me with a project I am dedicated to expanding in an overly complicated way, api is how you interact with special services, like discord bots use the discord bot api
-
Inquiry about some stuff
@jeffreyrb03-gmail on a scale of 1-10, how much experience do you have with using node js for api interactions, I am thinking about doing something very overly complicated to make message storage easier for my chatrooms project. I can do this programming myself but if you have the knowledge to help me make some scripting I’d welcome all the help (I have already used the api I need to use and made several projects so I can do it if you don’t want to help)