2D Shooting game support

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.

12 Likes

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.

7 Likes

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

4 Likes

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)

6 Likes

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.

2 Likes

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.

3 Likes

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

1 Like

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

1 Like

yeah, I thought of that, i just think it might be touch creating physics, like shooting and stuff using it

1 Like

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.

1 Like

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

1 Like

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

2 Likes

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.

1 Like

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.

1 Like

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.

2 Likes

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

1 Like

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.

1 Like

Use an ImageLabel and set it’s ID to that png -after uploading it to Roblox, obviously-.

1 Like

wait, how do i set that to the character? aren’t there like a requirement like you must have a mesh or something?

1 Like

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.

1 Like