# Questions about processing 3, Asteroids (the game) and AI

**URL:** https://discourse.processing.org/t/questions-about-processing-3-asteroids-the-game-and-ai/18348
**Category:** Project Guidance
**Tags:** homework
**Created:** [March 3, 2020, 1:51pm UTC](https://discourse.processing.org/t/questions-about-processing-3-asteroids-the-game-and-ai/18348 "2020-03-03T13:51:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gabs](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@gabs](https://discourse.processing.org/u/gabs)
#### Post date: [March 3, 2020, 1:51pm UTC](https://discourse.processing.org/t/questions-about-processing-3-asteroids-the-game-and-ai/18348/1 "2020-03-03T13:51:17Z")

</div>

Hey y’all,  
This is my first post to this site and I’m pretty new to processing in general. I honestly don’t know where to start with this (it’s a project for my robotics course, high school) and all i really know how to do is the size of the screen, how to make a couple of shapes, mouseX and mouseY, and if statements (||, &&, that’s about it, along with basic structures like void set up, void draw, writing your own void).

I got the link for this site [HERE](https://processing.org/discourse/beta/num_1159643085.html)

I was trying to figure out how to make it using that site but it used some code I  
A) wasn’t familiar with, and  
B) wouldn’t work in processing 3.

I think that the reason it directed me here was because it was outdated but I honestly don’t know.

I also used.  
[THIS VIDEO](https://www.youtube.com/watch?v=hacZU523FyM)  
which is a youtube video about asteroids, got sidetracked and ended up at

a youtube channel called code bullet (I tried to put the link bu because I’m new I’m only allowed to put 2 links in, still a super cool channel, you should go check it out!)

which I thought was really neat. It got me thinking about how I could incorporate AI into my game but I wasn’t really sure if I could even do that in processing. Anybody know what’s up?

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [March 3, 2020, 3:43pm UTC](https://discourse.processing.org/t/questions-about-processing-3-asteroids-the-game-and-ai/18348/2 "2020-03-03T15:43:54Z")

</div>

Asteroids is a pretty simple game.  
The bullets go in straight lines.  
The asteroids fly about at random.  
And there’s a spaceship.

Normally a person controls the spaceship, but since you want to use AI, I assume you want a spaceship under AI control.

… But first you need a spaceship for it to control.

So the first thing to do, then, would be to get a classic game of asteroids working.

You’ll probably need three classes, one for the Ship, one for the Bullet, and one for an Asteroid.

You will probably also need a setup() and draw() function, an instance of the Ship, and ArrayLists of Bullets and Asteroids.

So write that first. Post the code of what you come up with for more help - it’s a pain for us to start from scratch if you have a game working already!
