Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unnamed Marble Game - In Space!

Discussion in 'Works In Progress - Archive' started by BinaryOrange, Jan 9, 2014.

  1. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    Hi all,

    I decided to start the new year right by actually producing a game of some kind with Unity! I made a personal challenge to complete a game in 1 or 2 months, so far progress is steady!

    To give myself some ideas, I watched several tutorials, and the one series that really struck me was the "Roll-A-Ball" series. I decided to take that same basic idea and change it to something completely different!

    The idea behind the game is that you're a marble, reminiscent of "Marble Blast", "Marble Madness", and I've been told even "Kula World", and the goal is to unlock the "Warp Gate" at the end of every stage by collecting all of the gems. The game will also be set in space, because that makes sense. :D

    As the game progresses, you will encounter enemies, traps, puzzles that you'll need to solve in order to reach some gems, and I'm even thinking about making the stages timed. Each stage also adds between 15-30 gems from the previous stage, although in the later stages this number will probably be different!

    Here's a couple of screenshots:




    And a video of the gameplay (although a bit outdated)!


    And one of me building stage 2:



    Here's how the game is different from Roll-A-Ball:


    • There is a score and lives system in place (although no logic to handle any "death sequence" yet, still need to add a game over screen)
    • The camera rotates automatically at certain points to make the stages very linear, and to let the player know that they're headed in the right direction
    • Although not yet implemented, there will be enemies, traps, puzzles, different block types that affect the player's movement (for example; ice, rough patches, "trick blocks" that the player will fall through)
    • "Wind Tunnels" that can be used to the player's advantage, for example, wind blowing from the bottom of the stage could help the player reach some otherwise trickily placed gems! Or the Wind Tunnels could be a nasty trap in certain scenarios!
    • The first stage is a tutorial stage, which will teach the basics of the game, the controls, and all sorts of fun stuff like that!
    I'm targeting the web player for this, but I eventually plan on releasing this on PC, Mac, Linux, and maybe even OUYA, since I do have one kicking around! The game will be entirely free since a), it's my first official game, and b), there's probably going to be some (unintentional!) "infringements". :p

    The demo I have uploaded to my site here is going to be vastly different in the next few days:

    • The tutorial messages will be replaced with floating, rotating question marks that when the player is touching them, they will be given the option to press "A" or something, and THEN the message will appear
    • The tutorial stage will be entirely redone and made bigger, to teach the player more about the game
    • Stage 3 will be released with the next demo, or at least a part of it will be!
    • I'm going to make some custom models for the Warp Gate, ground objects, and railing, so that I can stop using Unity's primitives since they're pretty limited in looks. I need slopes! And less of a polygon count for the web.
    • New textures, new colors, different styles of text
    • Skybox textures will be included in next demo!


    Of course with every WIP, there are known issues and bugs, and here they are!

    • Upon completing stage 2, since there isn't a stage 3 yet, you'll just keep replaying stage 2. Your score will continue to increase! :p
    • Sometimes, the physics freak out a bit and the ball won't jump as high as it should. Not sure why this is. It's only an issue about 0.1% of the time. Could be because it's on the web?
    • The rotating camera can be a bit touchy, and if you get stuck between the different camera zones, you can end up in a loop of back-and-forth viewing action! Need to not place the zones so close together, or if it's fine, let me know!


    Alright, that's about all I can think of at the moment. Please let me know what you think so far!
     
    Last edited: Jan 12, 2014
  2. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    (Apologies if there are rules against bumping!)

    Hey everybody, just letting you know I've updated the demo. The game now has a game over screen, better tutorial messages, slightly better models and the physics have been adjusted a tad to make it feel better.

    Here's a screenshot!



    Any feedback is always welcome! :)
     
  3. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    I think the best one is still switchball and will ever be unless someone mans up to create an even better marble game. Awesome graphics, awesome music, awesome physics and awesome puzzles!

    Now here's some feedback:
    • Moving the marble feels very weird. It seems like it slides on the ground, especially when changing direction. It slides slower when in air?
    • Jumping feels weird too.
    • It's in space! Why is the ball not floating away?! Idea: planet-like levels with a center of gravity in the middle and the marble rolling around on the outside
    • The info things should be closed with a different key so it doesn't automatically make you go left when closing it
     
  4. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    Thanks Zeblote!

    The marble might feel like it's sliding due to the way unity handles velocity changes - I've had to limit the maximum velocity, but in order to get the marble to look like it's rolling fast, I still had to put it in a really high number for the initial movement speed. This may be why it feels like it's sliding.

    I've created a "Friction" physics material, it helps quite a bit already but definitely needs tweaking. Also, the marble doesn't slide in the air as much because of how "heavy" it actually is - I can change this though, maybe make it a little more controllable! :p

    I agree, jumping does feel weird. I may possibly take it out entirely - the only reason I really have it right now is because it just felt like the game needed it. I'm using rigidbody.AddForce() to move the player and to jump - this may be why the jump feels weird, I might be confusing the physics engine. I'll see if there's a way I can change it to feel better.

    The ball isn't floating away is because all of the ground objects have their own field of gravity. All of this will be explained in the redesigned tutorial stage - There will be different fields of gravity, just like Mario Galaxy, that will have their own specific look. A lot of the future stages will require the player to toggle a switch which will then change the field of gravity, and it must be used to solve future puzzles.

    And yes, the info things do need to be closed with a different key, I'll get right on that, too!
     
  5. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    -
     
    Last edited: Jan 18, 2015
  6. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    That doesn't solve the problem I was having. The ball's velocity kept exponentially increasing, so I limited it by using Vector3.ClampMagnitude while the player is grounded, and when the player isn't grounded, I don't clamp the magnitude, instead I take the moveHorizontal and moveVertical floats and divide them by 20 in order to keep it around the same speed it was at while it was rolling around on the floor. I forget where it was, but I found it somewhere through Googling, I didn't exactly come up with it on my own. :D

    What do you think about the camera? Some people tell me they like the way it works, others say it's too jarring when it moves. I've been tweaking it since the last demo update, but I'm not sure what more I can do. I can't take it out, it's by far too much of a gameplay element, plus if games like SwitchBall can do it, I should be able to do it, too. :p
     
  7. Zeblote

    Zeblote

    Joined:
    Feb 8, 2013
    Posts:
    1,102
    Yeah I'm having this problem too. I'm still not sure how to fix it without breaking the ball physics, for example it should be able to roll down a slope and build up speed, but you shouldn't be able to build up that speed on a flat plane. Maybe one could take the velocity vector, and the pushing vector, and lower the ammount it pushes (in the direction the ball moves to only so you can brake and turn!) as it gets closer to the maximum speed?

    I think the turning is fine. But I noticed that it gets closer to the ball as it turns, are you just moving to to the new position? You should lerp some float instead and make it actually rotate around the ball

    Switchball lets you freely switch between 3 camera modes though, one being auto camera (like the one you're using right now, auto turns at corners etc) or follow camera (follows the ball and turns like you would expect a camera to do in a console 3rd person shooter) or manual camera (basically free look but snaps to 45 degrees).
    You can also free look by holding right click. Always give full camera control to the user in a game like this!
     
  8. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    I haven't tried anything with slopes yet, but one solution I can think of is to have slopes marked with a tag, and check to see if the player is on that object with the tag. If they are, disable the magnitude, and the velocity should increase as expected. When they're off the slope, the magnitude will get clamped again, and the ball will slow down.

    That's just one super-easy way I can think of to do it, your idea would probably be a bit more realistic!

    And yes, I am just turning to the new position, but rotating the camera as well. I was using Lerp for the position change and Slerp for the rotation change, but I had an error with it and this demo, so changed it to RotateTowards and MoveTorwards - but I solved the problem I was originally having and have since gone back to Lerp and Slerp, much more smooth!

    I will add a few different camera modes for sure, that's definitely on the agenda. The game will automatically launch in auto-camera mode, and the player will be able to toggle between different states. Or, maybe I'll just have the auto mode, and a mode where you can zoom in and out, and then choose the viewing angle - I've been using a Mouse Orbit script I found, and it actually takes away some of the "feel" of the game. I'll just have to see what happens!
     
  9. BinaryOrange

    BinaryOrange

    Joined:
    Jul 27, 2012
    Posts:
    138
    I've realized the way I've set up the game is not great at all.

    I've just learned of Singleton-based GameState managers, and I *really* need one in order for this project to work the way I want. I also have some more ideas for the gameplay elements I want.

    Basically, as I've said before, this will be a physics-based puzzle game, currently set in space. How the marble stays on the ground and doesn't float away is because of the gravity of the ground objects, and the gravity will be a key part of the puzzles in the future. There will be "Fields of Gravity" (or F.O.G) that can be inverted by the player by pressing switches.

    So, I should probably start most of this over and base it around the GameState manager, which will help me a LOT! So, I'm going to let this thread die until I can get the game updated to a decent level. I probably shouldn't have posted this WIP at all, but at the time I REALLY needed feedback on the controls and other basic mechanics. When I post the new one, expect a much, MUCH better demo! :D