No Code Platformer - Make 2D Platformer without scripting nor visual scripting

No Code Platformer is a work in progress toolkit aiming to help you doing 2D platformer games with no need to script or to use visual scripting.

This tool is based on an intelligent and flexible component. After adding this component to an empty game object, you can change it to whatever you want (static object, dynamic object, player, parallax background, etc …), see details in videos below.

*** Coming Soon To the Unity Asset Store ***

So with No Code Platformer 1.0 you can set up a playable scene by doing few clicks.

The already done features are:

  1. Player Controller
  2. Items (requests like: coins, manas and others that you can add rapidly by using a flexible items system.
  3. Enemy
  4. New Scene loading (support new scenes additively)
  5. Sprite sheet animation, and animator controller that can be connected easily with ‘No Code Platformer 1.0’
  6. Parallax backgrounds

The videos above show how you can set up a player and a collectables system by doing few clicks. I am preparing another videos showing the set up of: parallax backgrounds, enemies, animations and scenes loading.

I planned to add new features like:

  1. A 2D interactive water with waves and swiming player
  2. Triggers that can act on another game objects
  3. A voxel system that is editable in editor and in game (like a sandbox)
  4. Jump boosters, sliders, transfer gates, and other objects to make the game play more dynamic

So I would know if this toolkit can help you in your projects and what features you really need so I can add them to the planned features list.

Regards,

Mezanix (Do it with Unity Assets)

No “Code Platformer” is coming soon to the unity Asset Store.
It aim to help users doing a 2D platformer games in few clicks, without need to code or to do visual scripting.
How “No Code Platformer” can do that ?
It use a meta game object, I called it UGO (Universal Game Object) that user can transform on whatever he want in one click. UGO can be a static object, dynamic object, item or a player, user can switch between these types in one click.

In this post I show you how to set up a player in few clicks ?
in coming posts I will show you another types of UGO, like: items, parallax, scenes transfers and others.

1. Create an Empty game object and call it “Player”:

__ __
2. Add the component “No Code Platformer 1.0” to the Player:

3. Add a sprite to the Player’s Sprite Renderer:

4. In the player’s “No Code Platformer 1.0” component at the “Ugo Type” field choose player:

And it’s done:

With few clicks we can set up a basic platformer player.

The “No Code Platformer 1.0” is flexible to use and to code:
a) Artistes can rapidly change the type of their game object between: player, static/dynamic objects, parallax, items and others …
b) Artist can also request another type of game objects that I can rapidly code for them.
c) Coder can easily extend the functionalities of the tool, because it’s simple, clear, well commented and straight forward coded.

It’s a neat concept!

But how useful is it to have characters that don’t animate? Or collectible items that don’t interface with the UI? Or is No Code Platformer going to implement all those types of features itself?

Thank you for these questions, animations and collectible items are already implemented, I don’t mention them yet because in the earlier posts I wanted light posts to explain the principle of “No Code Platformer”.

So that you ask, here is how collectible items system works:

In the earlier post when I have created the Player, “No Code Platformer” has automatically create 2 UI game objects:
CollectablesUI_Text and HealthUI_Text. Also player is automatically connected to these UIs.

2762589--199491--ice_screenshot_20160823-230134.png

So in the “No Code Platformer_1_0” componenet of the player game object, at the field “Player Font”, all you have to do, is to choose your suitable font:

2762589--199492--ice_screenshot_20160823-230754.png ===========> 2762589--199493--ice_screenshot_20160823-230858.png

and the UIs appear to the screen:

2762589--199494--ice_screenshot_20160823-231122.png

and these UIs are already resolution independent.

Now, when I hit play, the UIs are automatically filled with the player’s attributes.

2762589--199496--ice_screenshot_20160823-231442.png

Creation of a collectible Item:

1. Create an Empty game object and add to it the “No Code Platformer 1.0” component
2. At the field “UGO Type” choose “Collaectable”
2762603--199497--ice_screenshot_20160823-232957.png
3. [u]“No Code Platformer 1.0” will automatically add a “Collectable” component to your game object[/u]
In the “Collectable” component at the field type you can choose the type of your collectible item (Coin, mana, fiere, and what ever you want …)
4. So choose “Coin
2762603--199498--ice_screenshot_20160823-233219.png
5. Add a Sprite to the collectable item in its "Sprite renderer component, I choosen a yellow coin

It’s all you have to do to set up a collectible Item.
Now when I play and the player collect the coin, the coins number grow by one in the player’s attributes and the change is reflected automatically at the UI.

2762603--199503--ice_screenshot_20160823-233548.png

This system is also connected to the “Player Prefs” so when you play a new session, the player Attributes aren’t missed.

But if you want to reset these attributes at the begening of your scene you can tell your player game object to do that:
In the “Platformer Player” component of the player game object choose to reset the collectables.

2762603--199508--ice_screenshot_20160823-234115.png

Now when I play there no more collectables:

2762603--199509--ice_screenshot_20160823-234334.png

The magic of collectibles system:

The magic of collectible system is that is extremely flexible. you can add what ever you want of new items type and the system fits the change automatically. You can name your new item what ever you want, there is no items list proposed by “No Code Platformer”, the user craft its own collection of items according to its own game.

So you have seen in the previeous post that I added a item of type "Coin", now If I want to add a item of type “Schneider21

2762625--199510--ice_screenshot_20160823-235144.png

All I have to do is to fill the “Type” field in the “Collectable” componenet by the expression "Schneider21".

2762625--199512--ice_screenshot_20160823-235504.png

I played a little and I collected 3 Coins and 5 Schneider21.

Now I will add some Items of type that I call “Mexanix”.
I play and I have collected: 3 Coins, 5 Schneider21 and 2 Mezanix.

And so on, you can indefinitely add whatever you want of item types and the system fits to your choice.

2762625--199513--ice_screenshot_20160823-235815.png

Animations in “No Code Platformer”:

As "collectibles system", animations are also extremely flexible. You can create all your animations and put them in your animator controller.
All you have to do finally is to connect your animator controller to your player.

In details:
Assume that you want to create, for your player, a:
0. Idle animation

  1. Walk animation
  2. Run animation
  3. Jump animation

Create these animations normally like you have done for any of your projects. Make transitions between these animations, as you wish, in your Animator.

For the transition “Idle - Walk” I create a float parameter called “velocity_x” and I tell the transition to be activated when “velocity_x” is greater than 2. (Make sure that “Has Exit Time” is unchecked in the transition “Idle - Walk”.

2762713--199528--ice_screenshot_20160824-004009.png

I do the same for the transition “Walk - Run” but now I tell the transition to be activated when “velocity_x” is greater than 3.5

To the inverse transitions “Walk - Idle” and “Run - Walk” I do the same think but “velocity_x” is less than 2 and less than 3.5 respectively.

For the transitions “Walk - Jump” and “Run - Jump” I created a bool parameter called “jump” and these 2 animations are activated when “jump” is true.

To the inverse transitions "Jump - Walk" and "Jump - Run" I created two parameters, a bool parameter called “grounded” and a float parameter called "velocity_y, these 2 transitions are activated if the player is grounded and falling down (velocity_y < 0).

The power of “No Code Platformer” animations system:
All I have done earlier in this post is normal (like we do on any 2D project for animations).
But now I will explain to you, how it is easy to connect the already created animations to the player in the "No Code Platformer" Project.

In the player game object go to the component "Platformer Player" at the bottom of this component you have a field called "Animator Parameters". This field is the gate that connect the created parameters to our player.
So at the Size of "Animator Parameters" put the value 4. Now we have 4 parameters and each one have: a Name, a Type and a Related To.
In the Name fields enter the expressions: “velocity_x”, "velocity_y", “grounded” and “jump”. Make sure that the expressions match exactly the names of parameters created for the animator earlier.
Now that you have filled the names, for each parameter choose the type.
After choosing the type choose the parameter Related To, Related To is very imortant, it link your animator parameters to the player attributes, so I linked them like the following:

2762713--199533--ice_screenshot_20160824-011148.png

And now when you run the scene, you can see the little Bunny:

Jumping
2762713--199534--Jump.png

and Running
2762713--199535--Run.png

2762713--199533--ice_screenshot_20160824-011148.png

1 Like

Parallax in “No Code Platformer”
2764932--199735--output_lh0gWv.gif

For those how doesn’t know it yet, parallax is used in platformers to simulate the depth of background images, so near thinks move rapidly with the player and far thinks seem to accompany the player in his movement (like clouds for example).

Parallax in “No Code Platformer” is very simple de set up:
1. Create an Empty Game object and add to it the “No Code Platformer 1.0” component.
2. In the “No Code Platformer 1.0” component, at the “Ugo Type” field, choose “Parallax Background”.

The work is done, the system will add automatically a component called “Parallax Background” to your game object. In “Parallax Background” component you have 2 fields:
1. Parallax Depth: this field simulates the distance from your camera, it has values from 1 to 10. Value 1 is for nearest thinks (wall for example) and 10 is for farthest thinks (like far mountains or clouds).
2. Main Camera: this field is empty by default, if you have the main camera in your scene, you will let this field empty, because when you run the scene, it will find the main camera itself.

2764932--199737--ice_screenshot_20160825-173922.png

2D Drawer for Shapes Sprites and Textures

1. Announcement
Hello,
I am working on an amazing new feature for the No Code Platformer
The 2D Drawer for Shapes Sprites and Textures
Which offer a flexible way to do: Shapes, Sprites, and Textures in Unity, no need to an another 2D program.

2. Birth of an another Asset Store product
2D Drawer for Shapes Sprites and Textures will be a module in No Code Platformer, and it will also be in a separate Asset Store Product.

3. Coming very soon
Very soon I will talk about this tool, I will also do tutorials for it.