I want to create a 2d shooting game on roblox, but since roblox is mostly a 3d game and barely any 2d feature, I’m not really sure where to start. My idea is to create a up and down camera, and like 2d character and stuff. But the main part is the shooting, character aiming, etc. If you have any idea on how I could start this please help.
Why not use UI elements to make a real 2D game? Yes it’ll be complicated but it’ll be good when done, if done correctly.
The thing is everything is gonna be much more complicated, like physics, a ton of stuff, and I’m not even sure if roblox studio have enough feature to make this happen
I think Roblox gives you what you need to do this and more. Are you trying to make a game that resembles the 2d plane of hotline Miami or something top down like balloons tower defense (3d models still top down view)
nope, if your wondering I’m trying to create a game called surviv.io, it sadly got shut downed due to them not making money, and the amount of hackers etc and now the new owner just change the game entirely and made it lead to another game. this game is many people’s childhood, and at one point with 20k ish player active at a time on a IO GAME, this is like a screenshot of what the game looks like, is basiclly a 2d pubg game, I have gotton most of the assets of the game (their png) and I think I might have to go with a top down view because gui might be alot more hard to create and use. I probably will just try to build the map using images. Plus I’m just not sure where to start with the scripting aspect, since theres 2d character, animation, 2d guns, 2d physics etc, and all the things you can think from an shooting game.
It will be complicated but will be better. If you want the easier method, use a top-down camera and decrease the depth of field.
I recommend creating a top down camera. I think this can be achieved by using a point above the players head as the camera position and orienting it down. It would be easier to do it as a technically 3d game just top down than an actual 2d sprite game.
If you REALLY wanted to do a 2d sprite game, you could make the objects using billboard GUI’s
yeah true, since like there wont be any worries about lighting and stuff, but since I’m not that good of a scripter, I’m not sure what to do lol
yeah, I thought of that, i just think it might be touch creating physics, like shooting and stuff using it
The only physics you need will be collisions and u can just use rectangles around ur images to resemble that, you won’t need anything else that needs research, I think. At the end, it’s up to you whether you use UIs or a top down camera.
True, but won’t the bullets, player collision and alot other stuff be harder to create w.uis? I just want to make sure that the ui is capable of doing those
i tried to make something like this before, so trust me when i say that you should NOT use uis, they are a nightmare to work with and many factors depends on the client. just create an topdown 2.5 d game
Lol, I have tried using uis too before, and I know your pain, theres not alot of feature, like particles might take like 10 year to make and everything is just a nightmare. The only good thing about it is you don’t need to worries about its lighting.
AABB is a fairly simple algorithm for detecting collisions between squares, most 2D hitboxes are just a square, even if don’t appear like it. Doing some research on AABB you will be able to get collisions in less than 10-20 minutes, trust me. About being harder than obviously yes, Roblox is mainly a 3D game engine and not a 2D one so it’s 3D capabilities are way better.
One idea would be to disable jumping, and have the camera always be on top of the player and look down towards them.
That way, you will not have to create a physics engine at all.
The following code probably doesn’t work (because I didn’t test it out and wrote it in like 2 minutes), but it should give you a general idea of how you can make that game:
-- Local Script
local RunService = game:GetService("RunService")
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local camera: Camera = workspace.CurrentCamera
local cameraHeight = 30 -- How many studs the camera should be above the character.
camera.CameraType = Enum.CameraType.Scriptable
RunService.RenderStepped:Connect(function()
camera.CFrame = CFrame.new(character.HumanoidRootPart.Position + Vector3.new(0,cameraHeight, 0)) * CFrame.Angles(math.rad(-90), 0,0)
end)
Of course, you can replace Roblox’s default character with whatever you want. This is not meant as a solution, but rather a different path rather than creating your own physics engine.
Thank you, I adjusted the script a little bit, and it works perfectly, tbh, I don’t even know what to do the the game character, I’m not really sure how to add that to everyone’s starter character lol
Thank you, I will do some research on it. Now my next problem is how to change the character lol, I have it as a png, but I don’t know what to do with it lol.
Use an ImageLabel
and set it’s ID to that png -after uploading it to Roblox, obviously-.
wait, how do i set that to the character? aren’t there like a requirement like you must have a mesh or something?
We’re talking about UI here, you will create the character from scratch and animate it like it’s a sprite, this is pretty easy but could get complex very quickly.