Hi
I startet to learn unity for 1 year ago and still not managed to put together a full mobile game. I start my development many times and get stuck, i get depressed and i quit. So now i am going to try for the last time. I am going to post all my game development process here in this post. Please give feedback to my development process
What i am going to make this time is for only learning process. So iam going to copy game like The line Zen
What i have done so far
-Player Script
-MoveingPlatform
My first question;
Should i make the ball move forward or make platform(level) move as i have done it now?
If ball is moving forward:
How can i spawn random levels easily(Object Pooling)?
How will this affect gameplay?.
Can use DontGoThroughThings.cs if ball is moving forward.
If Platform(level) moving backward
How can i spawn random levels easily(Object Pooling)?
How will this affect gameplay?.
I cant use DontGoThroughThings.cs if ball is not moving forward.
Player Script: Ball can only be moved left and right.
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour {
[SerializeField] private float ballSpeed = 800;
private Rigidbody myRB;
void Awake(){
myRB = GetComponent<Rigidbody> ();
}
void FixedUpdate(){
float moveH = Input.GetAxis ("Horizontal");
Vector3 movement = new Vector3 (moveH, 0f, 0f);
myRB.velocity = (movement*ballSpeed*Time.deltaTime);
}
}
Anything i should do differently in Player script?
Moving Platform: This is attached to every level.
using UnityEngine;
using System.Collections;
public class MovingObject : MonoBehaviour {
public float speed = 200;
void Update () {
Move ();
}
void Move(){
Vector3 movement = Vector3.back * (speed / 10) * Time.deltaTime;
transform.Translate (movement, Space.World);
}
}
