Browse Search Popular Register Upload Rules User list Login:
Search:
Smashy Ball Testing

Image:
screenshot of the scene

Author: _XV_

Group: Default

Filesize: 92.75 kB

Date added: 2020-12-15

Rating: 5.6

Downloads: 5817

Views: 469

Comments: 11

Ratings: 2

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

A little two-player game I made. Your objective is to defeat the other player by ramming into them and pushing them into obstacles until they run out of lives!


===== COMPONENTS =====
Lives remaining: Circles that look like players in the top-left (player 2) or top-right (player 1)
Health: Colored bar above each player
Harmful objects: Bright red colored
Healing objects: Bright green colored
Spawns: Matching color platforms in the bottom-left (player 2) or bottom-right (player 1)
Destructible objects: Cyan checkered squares
Death saws: (I don't think this needs much explanation, play the scene and find out)
Attachable lasers (can pull or push your player): Small circular bumps on the left and right side of the arena
Smoky ball thing: Gray circle sitting on the arena floor


===== CONTROLS (numpad required) =====
-- Player 1 (orange) --
[num 8 / num 4 / num 5 / num 6]: move
[up]: boost mode (player becomes light weight and moves faster, use this to move around quickly or to reduce impact damage if you are about to hit a wall)
[down]: heavy mode (player becomes heavy weight and moves slower, use this while ramming your opponent to increase the impact force and do more damage to them)
[left]: laser retract (use this when attached to the laser emitted by the small circles on either side of the arena to pull your player closer to the source)
[right]: laser extend (like above but pushes your player farther from the source)

-- Player 2 (blue) --
[I / J / K / L]: move
[S]: boost mode (see player 1 controls)
[X]: heavy mode (see player 1 controls)
[Z]: laser retract (see player 1 controls)
[C]: laser extend (see player 1 controls)


===== IMPORTANT =====
The different features are explained more clearly in the scrolling tips on the top of the arena. If you are confused about something, click the scrolling tip until it shows what you want to know (It is randomized, so you may have to click it a few times.)


===== UPDATES =====
v1.1: Updated description to explain things better
v1.2: Fixed warning spam in the console and destructible objects not working properly
v1.3: Fixed wrong movement controls for player 2 in description
Last edited at 2020/12/23 15:10:56 by _XV_
Please log in to rate this scene
edit
Similar scenes
Title: Hammer
Rating: 5
Filesize: 3.66 kB
Downloads: 146
Comments: 0
Ratings: 1
Date added: 2015/10/25 01:22:22
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Articulated Physics with - Portal 2 Gels
Rating: 5
Filesize: 0.52 MB
Downloads: 354
Comments: 1
Ratings: 1
Date added: 2013/11/11 23:20:37
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: this is a test
Rating: 5
Filesize: 62.56 kB
Downloads: 110
Comments: 1
Ratings: 1
Date added: 2017/10/25 03:13:45
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Need a hand here!
Rating: 5
Filesize: 82.7 kB
Downloads: 123
Comments: 4
Ratings: 1
Date added: 2015/07/22 03:41:25
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: The Amazing Marble Race Season 1 Part 1
Rating: 5
Filesize: 253.25 kB
Downloads: 316
Comments: 3
Ratings: 1
Date added: 2015/05/03 20:40:30
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Human Skin Crash Testing Vr 3.0 (Human Controllable!)
Rating: 5
Filesize: 0.56 MB
Downloads: 2946
Comments: 2
Ratings: 1
Date added: 2015/08/03 04:06:39
Made with: Algodoo v2.1.0
Rating: rated 5
download
the game it too hard to play burh
@lokyinng I've updated the description to hopefully explain things more clearly.
If anyone wonders why it's called Smashy Ball Testing, it's because I got totally mixed up on which scene to edit and upload and ended up uploading the wrong one. I tried to change the name back but it didn't work and I don't know why.
THIS IS SO NICE CAN! CAN YOU PLEASE TELL HOW THOSE SCRIPTS WORK? PLS PLS PLS
Can I use some scripts?
Please answer. Love your work.
-CatTheFat
@CatTheFat all my scripts are free to use. For a general overview of how the scripts on this scene work:
- The players each have a health value which is synchronized with a public variable and when the health changes the damage / heal ring around the player will light up when it detects the change in the health value. If a player runs out of health, it will either be teleported to the spawn point and get a life removed or disappear completely if there are no more lives left.
- The lives you see at the top of the screen are just objects that will despawn when the life number for whichever player they are representing drop below a certain point. For example, the 3rd life circle for player 1 will despawn when the amount of lives for player 1 drops below 3.
- For boost mode and heavy mode, I created a system where there are two variables, one for the current state and one for the "cooldown". When you use boost mode, the current state will go from 0 to 1 and the cooldown will start slowly counting to 1. The power for boost or heavy mode is calculated based on the difference between the current state and the cooldown. This means that when the cooldown reaches one, there will be no difference between the current state and cooldown and the power will be 0.
- The particle effects are fairly simple. I basically just spawned each particle with all of its properties initialized along with a postStep to control it over time and delete it when it's used up its lifespan.
- Some of the objects will take into account the angle (e.normal) and impact force (e.soundgain) during a collision (saws, forcefields, player collisions) and use that data to spawn particles going in a certain direction. The saws will spawn spark particles going outward from the collision point, the forcefields will spawn sparks going outward from the center, players will calculate the damage based on the impact force and their current mass, etc.
- The camera movement is calculated based on an actual circle attached to springs which you can find above the arena. When the camera gets "shoved" in a certain direction, that circle will get its velocity set in that direction and the camera will be offset by the circle's position relative to its resting position.
Sorry for answering so late, I get no notifications when someone posts a comment on one of my scenes.
Oh its no problem, sorry I am kinda late to respond too, I was sleeping.. so I understood some scripts by looking into them... so I am still wondering about how the devision works. Its becouse I know that it isnt rigged, I thought it could only work with boxes. but I put the scripts in anything and it still worked. also how does the "impact" works? I played areound with the scripts and made a little game! I put the scripts that makes the cam "shacke" into a nuke. That made some fun moments.. anyways, I dont know how to devide an objects size. is it using the nurmal devide commands?
Love your work
-CatTheFat
well can you make the control is wasd and arrow keys pls
the orange one is not working
@CatTheFat the division was kinda complicated. I can't remember the exact equation but basically, for each of the small boxes, it calculates an offset from the center of the big box based on the amount of division, the width of the big box, and the X and Y index of the small box (two nested FOR loops are used to construct a grid of small boxes, one for the X and one for the Y index in the grid); then it calculates the size of the small box with a simple <big box size> / <amount of division>, sets the angle of the small box to the angle of the big box, does a linear transformation (common thing in game engines that handles everything like location, rotation, and scaling) to figure out where the small box would be if the big box is rotated, and finally clones the velocity and angular velocity of the big box to the small box. The whole thing is kinda complicated and requires a lot of math (As mentioned in one of the scrolling tips, 3Blue1Brown is a very good resource for all things math.)
The impact is pretty simple, there is a variable named soundGain on the event object of onCollide which is the total impact force of the collision. The only thing extra I did for the collision damage was multiply the force by 1 / player density. This means that if two players collide mid-air, the one that has less density (if player one is using boost mode and player two is using heavy mode, then that means player one) will take more damage from the collision.