Notifications
Article
Annual Stuntmen Gathering
Updated 10 months ago
122
1
Annual Stuntmen Gathering
Every year stuntmen from around the world gather at their annual Midnight stuntmen convention.
We are bringing you report from this year edition!
Note: I noticed this challenge like 2 days before it ends. So it will be rushed, it will be dirty but i hope I will finish game on time.
Update: I'm done! Game is finished. You can download it directly from here or from itch.io (link attached)

Final product

download link: https://stadoblech.itch.io/annual-stuntmen-gathering
Direct download:
Video

Idea

First idea was simple: I wanted to create physics game with small cars doing funny stuff (its a lot of fun to watch bunch of miniature cars falling from everywhere or rolling down the hill in high speed)
So I used this simple car made from 2 circles and 2 squares connected with joints. Simple enough.
After I throw bunch of cars into scene, I added sprite shape tool to see what happens. And after while, I ended with this.

No scripts (except of simple cars spawner), just playing with Sprite Shape tool in play mode.

Creating game

So I need to figure out how to move Sprite Shape nodes from script.
First there was need to differentiate dynamic nodes from static nodes. So I iterated through Sprite Shape nodes and stored nodes with ShapeNodeType which i wanted to be dynamic into dictionary (key was node index and value was position of that node).
public ShapeTangentMode modeToSelect; SpriteShapeController controller; Dictionary<int, Vector3> nodes; Spline spline;
void Start() { controller = GetComponent<SpriteShapeController>(); spline = controller.spline; nodes = new Dictionary<int, Vector3>(); for (int i = 0;i<spline.GetPointCount()-1;i++) { if (spline.GetTangentMode(i) == modeToSelect) nodes.Add(i, spline.GetPosition(i)); } }
Rest was easy: custom index (reflecting index in dictionary) was used to determine which node should be selected(active). Left/Right arrows are moving node index
if (Input.GetKeyDown(KeyCode.LeftArrow)) { currentPointerIndex = getNextIndex(currentPointerIndex); } if (Input.GetKeyDown(KeyCode.RightArrow)) { currentPointerIndex = getPrevIndex(currentPointerIndex); }
Up/Down arrow keys are changing Y position of node (while clamping height)
if(Input.GetKey(KeyCode.UpArrow)) { updateNode(new KeyValuePair<int, Vector3>(currentPointerIndex,nodes[currentPointerIndex]),1); updateShape(); } else if (Input.GetKey(KeyCode.DownArrow)) { updateNode(new KeyValuePair<int, Vector3>(currentPointerIndex, nodes[currentPointerIndex]), -1); updateShape(); }
void updateNodeHeight(KeyValuePair<int,Vector3> node, int Ydirection) { if (currentPointerIndex == node.Key) { Vector3 actualNPos = spline.GetPosition(node.Key) + new Vector3(0, 1) * growSpeed * Ydirection * Time.deltaTime; actualNPos = new Vector3(actualNPos.x, Mathf.Clamp(actualNPos.y, botLimit, topLimit)); spline.SetPosition(node.Key, actualPos); } }


Now game needs some main logic. I created "exit zone" and rules for next level scenario, added some test UI and some graphic pointer for terrain modifier

Presentation

Since my initial game vision was ugly failure
I decided to stick with cleaner flat look
I'm not artist so I'm usually trying to keep stuff simple, less colors and no patterns works well for me.

Design

So I decided to add few obstacles
and bouncy block
I had few more ideas but mostly it did not works as expected (but there is possibility of updating game later on with new fresh ideas)

Just for fun

Welcome screen.

Credits

DOTween
http://dotween.demigiant.com

Music:
"Matt's Blues" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
http://creativecommons.org/licenses/by/3.0/

"Whiskey on the Mississippi" Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
http://creativecommons.org/licenses/by/3.0/
BT
Bohdan Taraba
1
Comments
Saurabh Saxena
10 months ago
Founder of Delhi Technology Club
Good work stuntman🏎
0