I know you wanted to avoid copyrighted material for the comp, (or maybe that was because you were giving out prizes.) and seeing as Atari are still selling asteroids (well I think they are anyway) they may have a problem with it.
Ultimately I want to help promote PlayBasic whenever I can, so I wanted to make sure you could use the game. If you want to that is.
:)
For the compo, My main concern was people ripping truck loads of somebody else's media and using it their game. But the irony is that their remakes anyway. So the potential does exist to get a slap on the wrist from the original owners.. But i'm not too worried..
Anyway, I think you should probably keep it traditional. So I'm wondering how your drawing the shape edges actually. Curious.. :)
I want to make a remake of Asteroid myself for Learning-purposes with Play Basic... i began to start programming, but if i see the demo... too late... medwayman has make a great job... so i can hope, that medwayman will published his Sourcecode (if he want) very late, so i have a chance to finishing my Work... ;)
With asteroid I set off into the world of the video games, then still as Arcade machines version... it is long, long here...
QuoteSo I'm wondering how your drawing the shape edges actually.
Is this what you mean Kevin?
[pbcode]
; PROJECT : Asteroid Shapes
; AUTHOR : Big C.
; CREATED : 26.03.2006
; ---------------------------------------------------------------------
Dim StoneBig(3)
Dim StoneMedium(3)
Dim StoneSmall(3)
; Schiff als Vektor-Grafik erstellen
Ship = GetFreeShape()
CreateShape Ship,4,4
SetShapeVertex Ship,0,0,24
SetShapeVertex Ship,1,10,0
SetShapeVertex Ship,2,20,24
SetShapeVertex Ship,3,10,16
SetShapeEdge Ship,0,0,1
SetShapeEdge Ship,1,1,2
SetShapeEdge Ship,2,2,3
SetShapeEdge Ship,3,3,0
; Den Null-Punkt des Vektors von der
; linken, oberen Ecke verschieben
ShiftShape Ship,-10,-12
; Bullet als Vektor-Grafik erstellen
Bullet = GetFreeShape()
CreateShape Bullet,4,4
SetShapeVertex Bullet,0,0,0
SetShapeVertex Bullet,1,1,0
SetShapeVertex Bullet,2,1,1
SetShapeVertex Bullet,3,0,1
SetShapeEdge Bullet,0,0,1
SetShapeEdge Bullet,1,1,2
SetShapeEdge Bullet,2,2,3
SetShapeEdge Bullet,3,3,0
; Stone #1 als Vektor-Grafik erstellen
StoneTmp = GetFreeShape()
CreateShape StoneTmp,11,11
SetShapeVertex StoneTmp,0,0,20
SetShapeVertex StoneTmp,1,10,15
SetShapeVertex StoneTmp,2,15,0
SetShapeVertex StoneTmp,3,30,0
SetShapeVertex StoneTmp,4,35,10
SetShapeVertex StoneTmp,5,50,15
SetShapeVertex StoneTmp,6,50,35
SetShapeVertex StoneTmp,7,45,45
SetShapeVertex StoneTmp,8,35,50
SetShapeVertex StoneTmp,9,15,50
SetShapeVertex StoneTmp,10,0,35
SetShapeEdge StoneTmp,0,0,1
SetShapeEdge StoneTmp,1,1,2
SetShapeEdge StoneTmp,2,2,3
SetShapeEdge StoneTmp,3,3,4
SetShapeEdge StoneTmp,4,4,5
SetShapeEdge StoneTmp,5,5,6
SetShapeEdge StoneTmp,6,6,7
SetShapeEdge StoneTmp,7,7,8
SetShapeEdge StoneTmp,8,8,9
SetShapeEdge StoneTmp,9,9,10
SetShapeEdge StoneTmp,10,10,0
ShiftShape StoneTmp,-25,-25
StoneBig(1) = StoneTmp
StoneTmp = GetFreeShape()
CopyShape StoneBig(1), StoneTmp
ScaleShape StoneTmp,0.50
StoneMedium(1) = StoneTmp
StoneTmp = GetFreeShape()
CopyShape StoneMedium(1), StoneTmp
ScaleShape StoneTmp,0.50
StoneSmall(1) = StoneTmp
; Stone #2 als Vektor-Grafik erstellen
StoneTmp = GetFreeShape()
CreateShape StoneTmp,12,12
SetShapeVertex StoneTmp,0,0,15
SetShapeVertex StoneTmp,1,15,10
SetShapeVertex StoneTmp,2,20,0
SetShapeVertex StoneTmp,3,40,0
SetShapeVertex StoneTmp,4,35,15
SetShapeVertex StoneTmp,5,50,15
SetShapeVertex StoneTmp,6,50,35
SetShapeVertex StoneTmp,7,35,40
SetShapeVertex StoneTmp,8,35,50
SetShapeVertex StoneTmp,9,15,50
SetShapeVertex StoneTmp,10,10,40
SetShapeVertex StoneTmp,11,0,35
SetShapeEdge StoneTmp,0,0,1
SetShapeEdge StoneTmp,1,1,2
SetShapeEdge StoneTmp,2,2,3
SetShapeEdge StoneTmp,3,3,4
SetShapeEdge StoneTmp,4,4,5
SetShapeEdge StoneTmp,5,5,6
SetShapeEdge StoneTmp,6,6,7
SetShapeEdge StoneTmp,7,7,8
SetShapeEdge StoneTmp,8,8,9
SetShapeEdge StoneTmp,9,9,10
SetShapeEdge StoneTmp,10,10,11
SetShapeEdge StoneTmp,11,11,0
ShiftShape StoneTmp,-25,-25
StoneBig(2) = StoneTmp
StoneTmp = GetFreeShape()
CopyShape StoneBig(2), StoneTmp
ScaleShape StoneTmp,0.50
StoneMedium(2) = StoneTmp
StoneTmp = GetFreeShape()
CopyShape StoneMedium(2), StoneTmp
ScaleShape StoneTmp,0.50
StoneSmall(2) = StoneTmp
; Stone #3 als Vektor-Grafik erstellen
StoneTmp = GetFreeShape()
CreateShape StoneTmp,13,13
SetShapeVertex StoneTmp,0,0,20
SetShapeVertex StoneTmp,1,15,15
SetShapeVertex StoneTmp,2,5,10
SetShapeVertex StoneTmp,3,15,0
SetShapeVertex StoneTmp,4,40,10
SetShapeVertex StoneTmp,5,40,15
SetShapeVertex StoneTmp,6,25,20
SetShapeVertex StoneTmp,7,50,25
SetShapeVertex StoneTmp,8,40,40
SetShapeVertex StoneTmp,9,25,30
SetShapeVertex StoneTmp,10,30,50
SetShapeVertex StoneTmp,11,15,45
SetShapeVertex StoneTmp,12,5,35
SetShapeEdge StoneTmp,0,0,1
SetShapeEdge StoneTmp,1,1,2
SetShapeEdge StoneTmp,2,2,3
SetShapeEdge StoneTmp,3,3,4
SetShapeEdge StoneTmp,4,4,5
SetShapeEdge StoneTmp,5,5,6
SetShapeEdge StoneTmp,6,6,7
SetShapeEdge StoneTmp,7,7,8
SetShapeEdge StoneTmp,8,8,9
SetShapeEdge StoneTmp,9,9,10
SetShapeEdge StoneTmp,10,10,11
SetShapeEdge StoneTmp,11,11,12
SetShapeEdge StoneTmp,12,12,0
ShiftShape StoneTmp,-25,-25
StoneBig(3) = StoneTmp
StoneTmp = GetFreeShape()
CopyShape StoneBig(3), StoneTmp
ScaleShape StoneTmp,0.50
StoneMedium(3) = StoneTmp
StoneTmp = GetFreeShape()
CopyShape StoneMedium(3), StoneTmp
ScaleShape StoneTmp,0.50
StoneSmall(3) = StoneTmp
OpenScreen 800,600,32,1
Do
Cls 0
DrawShape Ship, 400, 300, 1
DrawShape Bullet, 400, 250, 1
For i = 1 to 3
DrawShape StoneBig(i), 200*i, 100, 1
DrawShape StoneMedium(i), 200*i, 150, 1
DrawShape StoneSmall(i), 200*i, 200, 1
Next i
Sync
Loop
DeleteAllShapes
End
[/pbcode]
Big C.
All you do is draw the shape in edge mode (1) Change the colour and redraw the same shape over the top but in vertex mode (0)
This is the loop for the example you posted. Run this in your programme and you should see the effect. :)
[pbcode]
Do
Cls 0
Ink RGB(180,180,180)
DrawShape Ship, 400, 300, 1
Ink RGB(255,255,255)
DrawShape Ship, 400, 300, 0
DrawShape Bullet, 400, 250, 1
For i = 1 To 3
Rem set the desired colour and draw the shapes in edge mode
Ink RGB(180,180,180)
DrawShape StoneBig(i), 200*i, 100, 1
DrawShape StoneMedium(i), 200*i, 150, 1
DrawShape StoneSmall(i), 200*i, 200, 1
Rem change the colour and redraw the shapes in vertex mode
Ink RGB(255,255,255)
DrawShape StoneBig(i), 200*i, 100, 0
DrawShape StoneMedium(i), 200*i, 150, 0
DrawShape StoneSmall(i), 200*i, 200, 0
Next i
Sync
Loop
[/pbcode]
I've shifted development to my laptop and found that this game is totally unplayable on it's LCD screen. Is this a problem with all LCD's or just older ones?
This poses two problems for me...
First, what do I do about the game? I guess I could offer an option to play with antialised images as well as with shapes, although it would be nice to stick with just shapes. What do you think any other options?
The second dilemma is my shape editor. I'd planned to have option to draw shapes freehand for use in vector games like Shapesteroids but is there any point? With more and more people using LCD's all the time (I just assume that to be the case?) no one is going to play them. May as well just use images in the first place.
While laptops can have rather awful refresh rate. But then again, so do most older desk tops. Speed wise, it plays a bit slow on my computer also. Having seen a previous version, I suspect that's a combination of my newer video card (well replacement) having a slower refresh generally and the level of recursion generated from the inter object collisions.
Inter objects collisions can produce a lot of recursion. Ie. 10 objects produce 10*10=100 collision checks, 20objects produce 400 checks. So the more objects the worse it gets!
One way to reduce the collision overhead is by partitioning the screen. In this case, you could sector the display into vertical areas. from 2 to 10 would certainly do. Before updating you tag what sectors each object falls into. Then do that again as you move them.. When checking for collision, you run through your object list, and only check the objects they share a region with. It's a little extra work to set up, but reduces most of the recursion dramas. Generally partition is a slower for a few objects, but much quicker for lots.
Moreover, you (we all should) should look into implementing some type of delta time solution.
That's good to know. thanks for playing :)
Hopefully it won't be too long now (but then you would be mad to believe that coming from me :blink: ) as I'm going to start working on the game tonight.
Just tested it on my TFT at work (bad boy!) with a resolution of 1280x1024 and a refresh rate of 60 Hertz (so that's 60 FPS between graphics card and monitor).
I hope the download from the first post of this thread is the proper one (Shapesteroidsnew.zip)...
48 to 52 FPS (windowed or fullscreen doesn't matter).
Ship accelerates too slow so the game is much too hard. Will try it tonight at home (another TFT).
But looks cool B)
Cheers,
Tommy