This is a thread for programmers. Post your demos here. Will post mine soon.
Programming/TechDemos
>tfw too paranoid about my game to show it just yet
>i have mostly assest, barely any programming put in
Programmer bros I think I fucking hate programming. How do I rekindle the love? I haven't done it in years and there's nothing I want to make.
Are you the same user from /vr/? Can we see it in motion?
I am no progammer but maybe learn a new programming language?
Yes, I am the same user. Give me a sec. I will upload some footage.
Those sprites are place holders. This is a platform game engine for a game I plan on designing. Don't look at this as a full demo even. mediafire.com
I can't even shoot (with mouse) and move at the same time in a 2D game.
I tried using GetInput with Mouse0 and Fire1, then OnMouseDown Event on Camera but nothing seems to work.
I'm kind of losing it.
You use game maker? Post your coding. I might be able to help.
It's Unity actually.And a lost cause.
void Update()
{
target = transform.GetComponent().ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, transform.position.z));
crosshairs.transform.position = new Vector2(target.x, target.y);
Vector3 difference = target - player.transform.position;
float rotationZ = Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg;
player.transform.rotation = Quaternion.Euler(0.0f, 0.0f, rotationZ);
if(crosshairs.transform.position.x < 0)
{
player.transform.localScale = new Vector3(1, -1f, 1);
}
else
{
player.transform.localScale = new Vector3(1, 1f, 1);
}
if (Input.GetMouseButtonDown(0))
{
float distance = difference.magnitude;
Vector2 direction = difference / distance;
direction.Normalize();
fireBullet(direction, rotationZ);
}
}
void fireBullet(Vector2 direction, float rotationZ)
{
GameObject b = Instantiate(bulletPrefab) as GameObject;
b.transform.position = bulletStart.transform.position;
b.transform.rotation = Quaternion.Euler(0.0f, 0.0f, rotationZ);
b.GetComponent().velocity = direction * bulletSpeed;
}
}