Git Product home page Git Product logo

new-shooter-project's Introduction

About

Rewriting MMC Zombies Project to be better and less dumb

An abandoned project because the Roblox platform is not particularly great for stable projects that don't use the avatar features provided by the platform. There's really, a bunch of reasons why, but they're also quite opinionated...

Maybe you can salvage parts of this codebase for your own needs? Such as:

  • Playing Roblox hierarchy compatible animations (see shared/Animator)
  • Almost pure-Lua events (or signals) that don't struggle with key/value + array tables and have :on(signal), :once(signal) functionality (see common/Emitter)
  • Related with the above, common/NetworkLib may actually be of interest as well.
  • A somewhat of a framework (as much as I hate that word, it kind of forces you to design games in a certain way...) to prototype games. https://www.roblox.com/games/9249236711/la-bomba-sweeper was actually made with this.

You might be wondering: "why is everything wrapped around the Roblox instance equivalents???" - because I wish I could augment them. I wanted it so should changes to an instance happen, I wouldn't have to replace code in various places, but replace code at a single point where I wrapped around an instance. I'm not sure if wrapped is the word to use here, but hopefully gets the meaning across.

Placefile

Grab a copy here and mess around: https://www.roblox.com/games/5014349871/gun-sandbox

Setting up gun rigs

WIP: make a plugin for this

Models are located in assets/Weapons/Models (not mounted)
Animations are located in assets/Weapons/Animations (not mounted)
Configurations are located in assets/Weapons/Configuration

A gun rig is set up with the following tree structure:

+ ModelName                The weapon asset name
|-- Animate                Place all Motor6D's here (not neccessary, but preferred)
|-- Parts                  All design parts here (not neccessary, but preferred)
|-+ Rig                    Required parts and location of arms
  |-+ LeftArm              R15 arm with 0.35 width and depth
  | |-+ LeftHand
  | |-+ LeftLowerArm
  |   |-+ LeftUpperArm     Motor6D Part1 to LeftUpperArm
  | |-+ LeftUpperArm
  |   |-+ LeftUpperArm     Motor6D Part1 to LeftUpperArm
  |-+ RightArm             R15 arm with 0.35 width and depth
  | |-+ RightHand
  |   |-+ RightLowerArm    Motor6D Part1 to RightLowerArm
  | |-+ RightLowerArm
  |   |-+ RightUpperArm    Motor6D Part1 to RightUpperArm
  | |-+ RightUpperArm
  |-+ Handle
  | |-+ LeftHand           Motor6D Part0 being Handle, Part1 leading to LeftHand in LeftArm
  | |-+ RightHand          Motor6D Part0 being Handle, Part1 leading to RightHand in RightArm
  

Design patterns

  • When loading objects by configuration - do not modify configuration values as they should be final. Instead, copy the value and make it a mutable variable.
  • OOP is not enforced, but a lot of code is written with "objects".
  • ContextActionService will be used. UserInputService will be used on cases where we need more raw input.

Code stylization

Text encoding is UTF-8, Line Feed only, 4 indentation spaces

A lot of this follows https://roblox.github.io/lua-style-guide/.
Here's a quick rundown:

  • Variables, functions are camelCase
  • Properties in objects are PascalCase
  • Internal properties in objects are _camelCase
  • Methods in objects are defined with a colon : and are camelCase
  • Static methods in objects are defined with a full stop .
  • Keep one-line spaces between functions
  • Constants or configurable values that do not depend on external modules are top most
  • Roblox services come second from the top most order
  • Game modules come third from the top most order
local CONSTANT = 5

local Debris = game:GetService("Debris")

local GameModule = require(shared.Common.NetworkLib)

function Class:method()
    local pain
    self.PublicProperty = "hi"
    self._privateProperty = "do not touch me"
    -- self exists in this context due to the : token
end

Data specifications

Particle Configuration

Type specifices whether to read configurations for 2D elements or 3D elements.
Expects: string 2D, string 3D
Default specifies a ClassName-based behaviour for objects inside the effect.
Expects: table {} with the instance's ClassName and an instance-specific property table
Specification declares properties for objects by name inside the effect. Expects: table {} with the instance's name and an instance-specific property table

Gun Configuration

TODO

External Tools

  • Moon Animation Suite (optional, used initially so the animation code supports Moon animation saves. Superseded by Blender)
  • Blender + Den_S's blender import plugin, KeyframeSequences copied from the instance during publish

new-shooter-project's People

Contributors

4xmsaa avatar

Watchers

Luke Zammit avatar  avatar

new-shooter-project's Issues

Huge lag spike when switching tools

As title says...

There is a huge lag spike that is so bad - even the microprofiler yells "buffer full" and deletes any information related to the frames where it would be the most crucial to have it.

This happens in both studio and the player

I've tried debugging this myself in the past by commenting related lines to this functionality with no luck (or maybe I didn't try hard enough).
Breakpoints wouldn't be very helpful as when we're measuring time taken, breakpoints cause literal pauses in that time and the end result is that the microprofiler still says nothing of value. It doesn't help that you can't even see the microprofiler itself when the game (and its rendering) is paused.

Considering the project is now public, whoever looks here should probably be aware of it. Maybe it'll get some closure, but I have no interest in trying to develop on the Roblox platform.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.