Advice for learning game development?

I’m not sure D: I’m basically calling the update method from the Enemy class, in the Play class and the Enemy class takes “delta” as an argument.

This is the update method from the enemy class.

	public void update(int delta){
		if(active){
			Vector2f speedOf = speed.copy();
			speed.scale(delta/1000.0f);
			pos.add(speedOf);
			
			timer += delta;
			if(timer > MAX_LIFE){
				active = false;
			}

I fixed it :smiley: haha, I made a silly mistake :stuck_out_tongue:

That game must be running REALLY smoothly ;). 60 FPS is about 16-17 ms between frames.

This just makes sure that the bullets enemies last an exact amount of time, regardless of how fast the game is running. I wouldn’t use this because then the bullet would travel less than if the game was running slower and vice versa.

I plan to make them fall and then when one is destroyed, generate another. I just need to figure this out :stuck_out_tongue:

Err, yeah, milliseconds. Not sure why I was thinking nanoseconds. Probably because I was playing with nanotime earlier. ::slight_smile:

So after many hours of frustration and trying to get my enemies to spawn at random locations and fall down, I have finally done it :D. I know it’s simple code but I got to practice my for loops and also arrays which is great! I plan to add the player now, a scoring system and collision detection. Hopefully I can use the skills I learn in this small project in future things

I just wanted to post a quick update. I first of all wanted to say thanks to everyone for being so welcoming and for the great advice.

Yesterday I had little to no experience with game programming and now I have my first working game! :slight_smile: It’s very simple right now but I have really enjoyed making it and have learnt so much and my programming skills are becoming better already. I’ve even added some cool music to my game which is pretty nice. Below is a download for my game if you want a go. Like I said, it’s really basic but I’m proud of it as my first game and now… I’m going back to programming ;D

Just a heads up, the game does get faster as your score increases :stuck_out_tongue: like I said, it’s still a work in progress

Okay… For some reason the runnable Jar has gone weird and won’t work unless the res folder is in the same area? So because of this, the zip file comes with the res pack :slight_smile: just click to run http://s000.tinyupload.com/index.php?file_id=14287848914655492090