Hey, Can you give us more real life example of your "How to use module scripts right" video? Like how you would approach things by maybe remaking popular game genres or a whole rescripting of an old roblox game
Thanks! I’ve learned to be organized over time. Like anything you fall into habit over time, so I’ve slowly started to develop my own layouts and templates for organizing everything. The key is to find what works best for you!
Hey great video! ❤❤❤ Would you mind doing a video on how OOP works in Lua? Even something like how the *self* magic in your component system works will do :3
Thanks for this was actually struggling with incorporating this system almost precisely into my game. Will really help me in terms of replication from server to client as well, how would you cope with a somewhat large amount of parts doing something like this?
Hi, I'm not sure if you're checking comments on this video anymore, but I'm a bit confused. Making my own projectile system, I've tried to implement the counter-latency logic by getting the network lag, similar to your way. I was unable to do this. os.time() returns a whole number, representing the UNIX time. A float is required to get the network lag, not a whole number, so I couldn't use this method, so I'm not sure if this actually even did anything in your script (the network lag would almost always be 0 using this.) So I turned to tick(), which does the same thing, except it does return a float. This also didn't work, Roblox has some inconsistencies with the tick() function where some Windows devices would return a phenomenally low number (Something like around an hour after January 1, 1970.) So I was unable to use that as well. So I decided to remove that part of the script altogether, if you know a way to get around this, or you did get around this here and I just didn't notice, please let me know. (:
I found a major issue... sometimes the raycasts fail to work (Lets the ball go through objects) & when the velocity is set to higher (1000+) it fails 99% of the time
7 months late response, but in case if you were still wondering, you could change step projectile function to this:
function StepProjectiles(t, dt) CastParams.FilterDescendantsInstances = {LocalPlayer.Character} for visual, projectile : SharedType.ProjectilePacket in ProjectileCache do local timeNow = os.time() local projectileInfo = Projectiles[projectile.ProjectileType]
local steppedVelocity = projectile.Velocity + (projectile.Acceleration * dt) local steppedPosition = projectile.Position + (steppedVelocity * dt)
local castResult = workspace:Raycast(OG_Pos , projectile.Position - OG_Pos, CastParams)
if castResult then ProjectileCache[visual] = nil HitSomething(castResult, projectile) visual:Destroy() elseif timeNow - projectile.StartTime > projectileInfo.Lifetime then visual:Destroy() end end end
@@nickz1479 it's better, not enough tho, it still goes through walls sometimes. I think it is caused by the fact that the raycast range in each runService step is so short that it sometimes doesnt register. My fix to this is to change the raycast direction to (projectile.Position - OG_Pos)*2.
If you need UI work let me know, I can show you some previous works I've done. I primarily use spring in my tweens because it is a very versatile library.
this video made me realise how unoptimized my scripting is lmao
Keep watching his videos fam this guy is legit
Great tutorials. All your videos have been expanding how I think about the client server model and how to work with it effectively.
ew
You did exactly what I tried to do on my own. Perfect video!!
Hey, Can you give us more real life example of your "How to use module scripts right" video? Like how you would approach things by maybe remaking popular game genres or a whole rescripting of an old roblox game
Exactly what a lot of devs need (includig myself)
No more R2D...
Fantastic stuff. How did you learn to be so organized?
Thanks! I’ve learned to be organized over time. Like anything you fall into habit over time, so I’ve slowly started to develop my own layouts and templates for organizing everything. The key is to find what works best for you!
@@qweekertomhow long have you been coding in roblox studio?
Amazing tutorial
I just learned so much about roblox studio
Can you explain what your doing? Might be longer but i'm here to learn not watch a timelapse to copy and paste.
finally a good lua youtuber
Hey great video! ❤❤❤ Would you mind doing a video on how OOP works in Lua? Even something like how the *self* magic in your component system works will do :3
Thanks for this was actually struggling with incorporating this system almost precisely into my game.
Will really help me in terms of replication from server to client as well, how would you cope with a somewhat large amount of parts doing something like this?
the problem with this is single raycasting doesn't quite work if your projectile has a large size, it would look weird
did you find a workaround for this
Shapecasts
@ is that optimized? I’ll try it
your video is great, how can i clone the code and reference it. your video is too fast and has many parts available, i cant re-import the whole thing
Hi, I'm not sure if you're checking comments on this video anymore, but I'm a bit confused.
Making my own projectile system, I've tried to implement the counter-latency logic by getting the network lag, similar to your way.
I was unable to do this. os.time() returns a whole number, representing the UNIX time. A float is required to get the network lag, not a whole number, so I couldn't use this method, so I'm not sure if this actually even did anything in your script (the network lag would almost always be 0 using this.)
So I turned to tick(), which does the same thing, except it does return a float. This also didn't work, Roblox has some inconsistencies with the tick() function where some Windows devices would return a phenomenally low number (Something like around an hour after January 1, 1970.) So I was unable to use that as well.
So I decided to remove that part of the script altogether, if you know a way to get around this, or you did get around this here and I just didn't notice, please let me know. (:
Could you use Bézier curves?
im taking ap physics and python programming and I thought it was cool how I can kinda understand da video
How do you get yellow comment arrows like they in your code?
Those are called "glyphs" it's from the font I use, JetBrains Mono. It's really a "-->" but the font makes it look fancy!
using parallel lua would be amazing for this!
How about taking into account players ping?
How would I change the code for just a linear moving projectile that doesn't interact with gravity?
just make acceleration (0,0,0)
Can you show your scripting setting please😢
I found a major issue... sometimes the raycasts fail to work (Lets the ball go through objects) & when the velocity is set to higher (1000+) it fails 99% of the time
there is no way to fix this unless you update the ball positon 1 by 1 it more accurate but less performance
With that much velocity you don't even need RunService. Just RayCast from start position to end position and move projectile with TweenService
7 months late response, but in case if you were still wondering, you could change step projectile function to this:
function StepProjectiles(t, dt)
CastParams.FilterDescendantsInstances = {LocalPlayer.Character}
for visual, projectile : SharedType.ProjectilePacket in ProjectileCache do
local timeNow = os.time()
local projectileInfo = Projectiles[projectile.ProjectileType]
local steppedVelocity = projectile.Velocity + (projectile.Acceleration * dt)
local steppedPosition = projectile.Position + (steppedVelocity * dt)
local OG_Pos = projectile.Position
projectile.Velocity = steppedVelocity
projectile.Position = steppedPosition
visual.CFrame = CFrame.new(projectile.Position, projectile.Position + projectile.Velocity)
local castResult = workspace:Raycast(OG_Pos , projectile.Position - OG_Pos, CastParams)
if castResult then
ProjectileCache[visual] = nil
HitSomething(castResult, projectile)
visual:Destroy()
elseif timeNow - projectile.StartTime > projectileInfo.Lifetime then
visual:Destroy()
end
end
end
@@nickz1479 it's better, not enough tho, it still goes through walls sometimes. I think it is caused by the fact that the raycast range in each runService step is so short that it sometimes doesnt register. My fix to this is to change the raycast direction to (projectile.Position - OG_Pos)*2.
great tutorial
it goes through walls
does it reduce lag
W tutorial
If you need UI work let me know, I can show you some previous works I've done. I primarily use spring in my tweens because it is a very versatile library.
Types are not necessary