Asteroids

Hello members.
Here are a couple of months after learning Unity and the decision with which the first game to come on the scene I decided to make the game asteroids, in fact it is a game where you move through the asteroid field, you avoid the same, disables enemies and pass levels. For now, the game in the first phase of development and only has one level. In the next two weeks to complete the plan and put the other materials.
In making the decision making and greatly helped me with lessons unitytutorials.com and unity community forum. Thanks a lot.
News about the progress of the game publish and developing will be heard here on the forum and on my site. I hope you will like it.
Game you can see on my site http://woodgamesfx.com/ in page Asteroids .

Hey, congratz on your first project. This is actually the first project I want to make in Unity as well.

http://www.dulcefina.com/Ferano/game/asteroids.html

I made this in Flash about one or two years ago, cant remember now. Looking to convert this to Unity so I can basically get a good idea on how to program in Unity.

About your game. The idea was good and the graphics and effects are also pretty nice. The explosion effect was neat, I liked it. However, the game mechanics are not properly done. The spaceship is way too difficult to control and you get instantly thrust into a battle which is very hard to escape. Fix those two issues because they make your game unplayable. First project or not, you want your game to be playable and fun.

Suggestions:

Make the thruster mechanics similar to the original game. This will provide more familiar controls.

Start the level without any enemies around so that you can freely start moving around and testing out the game shooting up innocent asteroids. That way you will be ready for those pesky spaceships once they come round your way.

Thank you for the advice.In the future development I will make note on the gameplay and add a few upgrades in the game.
I looked at your game asteroids made in a flash and I must admit that is work great.

Another Asteroids clone, made in Unity here.

–Eric

Yeah thanks. Yours is looking great too, just work out those kinds and I think you are going to have a solid and interesting game with enemy fighters and everything.

I have a question though, how did you get the foward thrusters to move the ship in one direction. I am new to UniScript so I dont know how to do the Math.Cos and Math.Sin functions to get the right trigonometry. How do you do it in Unity?

Use the physics engine: http://forum.unity3d.com/viewtopic.php?t=15346&start=1

–Eric

Wow, how different are AS2 and UniScript and the engine…

if(Key.isDown(Key.UP))
	{
		radians = ship._rotation * Math.PI / 180;
		ax = Math.cos(radians) * speed;
		ay = Math.sin(radians) * speed;
		vx += ax;
		vy += ay;
		ship.gotoAndStop("flame");
	}

Thats the AS2 code to get the ship to move like if it were in outer space. I cant believe how simple it is in Unity;

if (Input.GetKey("up"))
        {
            rigidbody.AddRelativeForce(Vector3.forward * -20);            
        }

That is stupid easy! Thanks bro. There seems to be a lot to learn about how to do things the Unity way that I am oblivious to. What is your recommendation on how to learn coding the Unity way? I have looked for tutorials but obviously I must be missing something. Are there any tutorials that are completely programming oriented?

There are several tutorial sites for Unity tutorials (I believe there’s a list on the wiki) which probably have what you’re looking for, but I also did this tutorial a while ago which has some “Unity way” programming stuff in it. Just for the sake of reference, the Unity math functions are under Mathf (cos, sin, pi, etc.).

–Eric

Yeah thanks, ill look at your tutorial and definitely recheck whats available. Its been a while since I searched for some so there may be some new things available. I am also learning ZBrush and C4D so you can imagine, I got a lot of work ahead of myself. I also study full-time and work part-time, yet I still find a few hours here and there to practice. Hopefully I can do something much more intensive once the Christmas vacation comes along. I will probably make my own version of Asteroids just to serve as a practice project.

Sounds good…I think it’s a law that all game programmers must make a version of Asteroids at some point.

–Eric

It’s a rite of passage. Kind of like Hello World only a lot less lamer.

2DShooter tutorial looks great.
I also made some improvements in my game :
1. Now you can hide behind the other objects ( for now only behind asteroids, because it’s only neutral game object on the scene ).
2. When you approach to some enemy ships they will chase you and shoot at you for some time ( when you in the visual range ) .
3. I add helth bar to the GUI

Improvements I plan to make in the next few days.
1. Better control of the ship
2. Different types of weapons
3. Energy shields
4. improved AI

I made some improvements to my game ( AI, Sounds etc… ).
http://woodgamesfx.com/?page_id=138
Now you can download it for PC and Mac.

Yup, that definitely plays a lot better. The AI is great, you can just stand from the outside and pick them off. I actually got trough the level :slight_smile:

Some additional suggestions that I think may improve gameplay;

Don’t zoom out as much, it makes the fighting distances a little too difficult. Find the balance between bullet speed and zoom out so that it’s not as hard to connect your bullets. Also at longer distances, you might want to make the rotation slightly slower to get the right angle on the enemy.

Increase the thruster speed. The ship still feels unmaneuverable. Increase the speed so acceleration and change of directions is easier.

I finish te Beta 2 version . The new features in Beta 2 is re spawn effects, mission objective text in the left upper corner . And I made some improvements in game play and AI.
I hope you love it.

PS.
The upgrades are only available for Web player and Windows version. In beta 7 , final beta version, I will publish for Macintosh also.

In the game Asteroids we add three level.
In level one you need destroy more then 80% of all enemy ships.
In level two you need destroy all enemys , take fuel cell and rescue the neutral ship
In level three you need destroy all enemy ships , but in this level you fight with some more dangerous enemy’s :lol: