Alright, so I know this is a stretch and this is most likely an error on my part, but hear me out. I tried to give as much detail as I could.
There are two ship models the player gets welded to - a small(a) and normal size(b) version.
So, I weld the player using a “SeatWeld” to a when flying around, and then weld b to the player when landing. When a player lands on a planet or leaves a planet the game checks for welds in both ships and destroys them before creating new ones. The unused ships are being placed into the player.
So, the bug. Occasionally when landing on a planet, every enemy on the planet will act as if the players location is at the ship. If they are close enough to the ship they will attack as usual and if far enough away they will sit there until shot - they act completely normal, and there are no errors.
If it matters, the welds are removed via a localscript and enemies run on a serverscript.
The reasons why I think this is a bug with roblox and not me?
-
The players position is not stored anywhere in the enemy script. It goes through a loop and every iteration searches through the player.character of all players, and uses the humanoidrootpart.Position. There is no “var = target.Position”, so there isn’t a chance that it is just using the old saved position.
-
The loop isn’t broken. The enemy still attacks and checks to see if it was shot which is in the same loop as checking for the player’s rootpart, meaning that there isn’t a chance that the enemy just found the player’s position once and then broke, making it only move towards that one spot. And of course there are no errors, which obviously makes it more likely that this isn’t the case.
-
It doesn’t hurt the player if it cannot find the torso or humanoidrootpart. I placed the players character into replicated storage, and removed the torso/humanoidrootpart and while the enemy still did damage when the character was in replicated storage (It finds the torso via player.Character, so no surprises here) it stopped when the torso/humanoidrootpart was removed, even though the humanoid health was still above zero, indicating that the enemy is once again, indeed finding the torso.
-
I am unable to replicate this in studio. I have tried finding this bug in a studio server for 10+ hours, with replication lag set to 0.2. It is extremely common normally, suggesting strange behavior.
-
I have not changed any enemy or ship welding code recently, and the bug appeared out of the blue. Suggesting it was caused by a roblox update.
Basically, I can’t come up with any other possible solutions as to why the enemy may be acting the way it is, besides the enemy thinking that the player is still welded to the ship (server side) or by extension thinking that the players torso is located at the ship. Not sure if the problem is welds not replicating properly or what. I am not using filtering enabled.
The game: SF Test Server - Roblox
I couldnt replicate the bug, but here is some errors I got while playing (and dying a few times):
Also some feedback cuz I played it for whole 3 minutes after all:
- Make sure youre using RenderStep (preferably the new bindtorenderstep function), to make the mouse hover menu(s) perfectly smooth (if youre currently using regular 30 FPS loop). Not sure if they were or not, hard to tell. Just something to check.
- Add more feedback when you hit an enemy (sound / change crosshair). Simple, but would improve it a lot.
- Also I found it hard to hit enemy when they were at my face, I think it would be nice to add some special case handling there, change how the aiming works close range, or maybe add a knife button of some kind.
- You should have thumbnails with actual gameplay on them, even if its not the first one (like a screenshort of the map, to show scale of the game). Only having fake ones is always suspicious.
- I got annoyed waiting for tutorial text to show sometimes. Maybe speed it up a tiny bit. It would also be nicer if it was bigger, as its pretty important element.
- Put the map on a shortcut like ‘M’ (if it already is, make the tutorial tell me to do that instead of clicking around). Its just more intuitive. Even if you do keep the regular mouse interaction.
- I initially tried to steer the ship with camera instead of A/D. Maybe that could be an option, or the default? I think it would give the ship more ‘weight’ feel, currently feel somewhat separated from the ship, as the camera and ship arent linked much.
- When warping, you could smoothly change the camera FoV during warp initiation, to make it more warpy.
- Obviously I tried to kill all the police around the station during the tutorial, include that as part of the tutorial if it already isnt, and make sure players arent punished for that first mistake (if they currently are).
- Add a loading GUI or such to cover the screen while spawning as a ship. Very immersion breaking to see giant character sitting in middle of space for a second and then transform to a ship… (or make character transparent before doing the things that take time)
- Maybe for guns, give them a “Design ID” that would show something like “7 / 5001”, to immediately tell players theres a massive amount of guns, right in the tutorial (when selecting a gun). Like under the name or something. Keeps people interested. Also gives stronger identity to each gun, I feel. I thought theres like 5 guns. After reading the description, I still felt theres like 5 guns, because a claim in a description isnt ‘material’ enough to change the initial impression.
- You should put even more emphasis on faction points or whatever you have. While its already great to show when you help your faction in some way, its even better if you see the full progress.
- I disliked having to press the button to leave planet/station. It would feel better to have to actually enter the ship to leave. I assume some point in future youll add a proper ‘takeoff sequence’ or something when theres time, though.
- If there had been a pressing need for me to do something, like enter/capture a planet, I would have stayed and played even longer. Maybe you can mark few such planets on map “go there in next 1 minute and kill aliens, to get stuff”.
- You should more clearly show which faction I played last time, when showing the selection screen again (if thats the progress bar on bottom, that should stand out more)
- Maybe you can add particle effect on the stars (solar flares), that would look cool. If you do, make them move slow, to emphasize large scale of space.
- If you can find cool space skybox (with many white dots on it), that would make the game instantly much prettier
Overall, seems like a solid base for the game.
May I ask how you implemented the data-store saving of the planet map? I have a kinda similar system, except the map is a separate place, and Im currently using a single table and updateasyncing it for simultaneous read/update (from all servers). Just wondering if you had any issues I might want to prepare for, or if you have different approach.
The planets and guns are both generated - when the description says there are 6000+ guns, that was just to show the amount of possible, noticeably different generations for all of the guns. Of course there are millions if you count the color combinations and the stats and the like, but the gun generation system is going to be overhauled in a while anyways, as like you said, they mostly feel and look very similar.
The planets were generated using a seed and a custom random number generator, and I just keep the seed the same throughout the servers so that I can customize different specific planets as I please later on.
As for the rest of the feedback, honestly it was all great. Very thought out and detailed. Lots of that stuff is already planned but I keep forgetting about it.
As far as the bug goes, any staff out there willing to look into this? I have been trying to fix this bug for two weeks now. It is pretty major for my game, at times. Lots of dislikes were from the glitch happening early on when players join.
As explained,I really think that this is some sort of replication-based error.