2D game development

I aiming to create an game based of the Super Smash Bros series (2D game) how would I achieve this?
I thought about restricting the players movement, limiting them to the x and y axis but I don’t know how to achieve that. I have also thought about using forces and moving the player like that.

Any idea’s where can I start or how to limit a players movement to certain axis?

2 Likes

Simplest way is BodyPosition but I think alot of people would frown upon using old ‘legacy’ objects.

Thanks, I’l read into that and see what I can find out.

I’d recommend you to take a look at the Roblox game template Line Runner. This is an awesome learning resource, because you’ll have the Roblox graphics (shadows, depths, etc.) while having the 2D feeling! Editing is very simple and automatic map generation is included too.

1 Like

using context action service just bind w and s to function () end

1 Like

GameActionService doesn’t exist. Did you mean to say ContextActionService? Yes, you could use them, but binding a blank function isn’t sufficient enough. You either need to return Enum.ContextActionResult.Sink in the function or unbind the bindings set by the ControlModule. If using the former option, BindActionAtPriority is required to bind at a higher value than the original W and S action bindings which sit at the default priority value, 2000.

in my game, where i have totaly changed controls i use w to go forward with model, that represents skin and i saw it also replace moving of the charater, so for me it work

and sry for confuzing by my memory (game action service)

You have me confused. Are you disagreeing or agreeing? In either case, see my response for details - binding a blank function is insufficient. If it does work, thats unexpected behaviour that should be corrected.

1 Like

i didnt tested exactly blank function, but i tested function with code that is firing some events,… and it worked without problem and it owerwrited w key movement

Again, refer to my reply. It contains details as to how to disable such movement.