I need help on a project (beginner)

Sure but I would create a class for the player
Them you can add things to the class that describe it

Classes just confuse me, especially the space war tutorial. I’ll try it with classes if I can get the hang of how to use them properly

Triangles aren’t an option. I think you need to create it with lines.

And yeah the Atari greatest hits won’t let me have asteroids saying I have “insufficient credit”

Sorry. If I could send you the rom I would. Maybe when I purchased the activision games I got it too…

Here is how the example did the triangle:

translate(self.position.x, self.position.y)

    -- Draw our triangle invader
    -- 60 pixels high, 40 pixels wide
    line( 0, 30, 20, -30 )
    line( 0, 30,-20, -30 )
    line( -20, -30, 20, -30 )

Hope I don’t get a 2.99 invoice for it…

I’m buying a $15 card soon and I’m getting activision anthology and the majority of atari’s greatest hits. Also now how is that triangle 60 high and 40 wide if I’m seeing 30 and a -20?

I can’t get those line segments you posted to draw in codea -_-

I took them from “bit invader” sample.
Anthology is what I purchased. ,wish it was the c64 versions.

I’ll try to draw some lines for a ship and see what I get.

Classes are the way to go.

Alright, and I’m going to try and look into using maybe the ship mesh from space war on here if I can’t get a line version. I’m trying to do a BASIC version and a Lua version since the languages are similar; also thanks for offering help!


-- asteroids

-- Use this function to perform your initial setup
function setup()
    print("Hello World!")

-- This function gets called once every frame
function draw()
    -- This sets a dark background color 
    background(40, 40, 50)

    -- This sets the line thickness

    -- Draw our triangle invader
    -- 60 pixels high, 40 pixels wide
    line( 0, 30, 20, -30 )
    line( 0, 30,-20, -30 )
    line( -20, -30, 20, -30 )

    -- Do your drawing here

Translate sees to change your “starting point” and then the lines draw.

What basic app are you using? IvBasic or Basic!

Never heard of Ivbasic…I’m using misoft BASIC!, love it a lot

Nice ship, I shrunk it by half values to get a better size, I’m thinking of maybe using x and y= touch.x and y to drag the ship around as virtual buttons and tilt are a bit iffy

I have basic! Too. I like Codea more but it is nice.

If you use basic!, you should post some on the forums for it :). I’m working on simple animations in basic! Just for the heck of it, I thought basic! Was easier, but Codea grows quickly in me…especially since its CPU calc is faster than basic! And don’t slow down as much

Basic! Is nice but lua is more modern…

Indeed, I’m going to read and re read the physics lab to make some asteroid polygons, I’m also playing on my Atari 2600 for asteroids! I’ll post more as I accomplish things

I’d be glad to give you any advise you I can, but I am no expert with codea or lua.
I played with rotate some. Might need to see how it affects multiple objects.