---------------------------------------
UPDATE 02/11/20 9:21PM EST
Updated the .ZIP file below again. I made it to level 12 and ... crash. Found the bug and fixed it. The maximum asteroids that can ever be on the screen at once in a perfect scenario is 64 (16 large asteroids times 4 small asteroids). I set the asteroids array to 63 when it should have been 64. Oops.
---------------------------------------
UPDATE 02/07/20 3:15PM EST
The .ZIP has again been updated. The Button function has been completely rewritten to use the vector library's ObjPrint vector text command instead. _PRINTSTRING is just way too resource heavy to be used in real-time menus. Also made a few more efficiency changes. No matter how many objects on the screen now the drop down menu does not slow anything down.
---------------------------------------
UPDATE 02/06/20 11:15PM EST
I updated the .ZIP file below with a bug fixed and some inefficiencies in the collision routines I corrected. I also removed the pre-compiled .EXE to make the .ZIP file smaller.
---------------------------------------
Sorry I have been away for so long but I come bearing gifts :-)
I had to put the Sprite library on the back-burner because of unforeseen problems I encountered with it. Because of that I decided to step away from programming for a bit. When I got my head on straight again I decided to write a vector library. Of course I need to write a game to prove the library so I wrote Widescreen Asteroids.
Widescreen Asteroids is not a clone. It's what I always wanted in an Asteroids game. It's very close to the original with a few enhancements. The vector engine is fast so the game is filled with particle effects and, of course, asteroids. I hope you'll like the game. Please report any bugs or errors you find in the game.
I don't have documentation written yet for the vector library. Below is a crude listing of commands that it supports. I'll have the documentation finished soon.
The ZIP file contains everything needed to run and compile the game. It contains a pre-compiled .EXE so you can run the game right away if you wish. If you prefer to compile yourself simply delete "asteroids.exe".
--- CRUDE COMMAND LISTING FOR VECTOR LIBRARY ---
Sub ObjActive ObjID, Flag Sets the active value of an object
Sub ObjAngle ObjID, Angle Set the angle of an object
Sub ObjBind ObjID, X1, Y1, X2, Y2, Mode Set the minimum X and Y coordinates allowed for object
Sub ObjColor ObjID, Lnumber, Clr Set or reset the color for one or all line segments within an object
Sub ObjDraw ObjID Draw an object to the screen
Sub ObjFriction ObjID, Friction Set the friction amount for an object
Sub ObjInit Initialize variables for object library
Sub ObjLines ObjID Get all line info from an object at current angle (INTERNAL USE ONLY)
Sub ObjMove ObjID Update an object's position based on all current values
Sub ObjPrint tx, tx, Text, Scale, Clr Print vector text at the coordinates specified
Sub ObjPush ObjID, Force Push an object in its current direction
Sub ObjPut ObjID, X, Y Set the X,Y coordinates of an object
Sub ObjRotate ObjID, Angle, Mode Rotate an object to either absolute or relative angle, or auto rotate
Sub ObjScale ObjID, Scale Set the X and Y scale of an object
Sub ObjScaleX ObjID, Scale Set the X scale of an object
Sub ObjScaleY ObjID, Scale Set the Y scale of an object
Sub ObjStamp ObjID, x, y, Angle, Scale, Clr Place a copy of an object on-screen
Sub ObjVectorX ObjID, XV Set the X vector value for an object
Sub ObjVectorY ObjID, YV Set the Y vector value for an object
Function ObjActive ObjID Get the active value of an object
Function ObjAngle ObjID Get current angle of object
Function ObjAngleO2O ObjID1, ObjID1 Get the angle between two object center points
Function ObjAngleP2P x1, y1, x2, y2 Get the angle between two X,Y coordinate pairs
Function ObjBoxHit ObjID1, ObjID2 Return TRUE if two objects touching via bounding boxes
Function ObjColor ObjID, Lnumber Get color of line within object
Function ObjDistO2O ObjID1, ObjID2 Get distance between center point of two objects
Function ObjDistP2P x1, y1, x2, y2 Get distance between two X,Y coordinate pairs
Function ObjFixAngle Angle Return the angle passed in from 0 to 360
Function ObjFriction ObjID Get current friction of object
Function ObjHeight ObjID Get current height of object
Function ObjIntersect p1x, p1y, q1x, q1y, p2x, p2y, q2x, q2y Return TRUE if two line segments are intersecting
Function ObjLineHit ObjID, p2x, p2y, q2x,q2y Return TRUE if a line segment is touching an object
Function ObjLoad File Load an object file into memory
Function ObjObjectHit ObjID1, ObjID2 Return TRUE if any line segments in two objects touch
Function ObjMake ObjID Make an object from objects in memory
Function ObjMax n1, n2 Return the largest of two numbers
Function ObjMaxX ObjID Get maximum X coordinate allowed for object
Function ObjMaxY ObjID Get maximum Y coordinate allowed for object
Function ObjMin n1, n2 Return the smallest of two numbers
Function ObjMinX ObjID Get minimum X coordinate allowed for object
Function ObjMinY ObjID Get minimum Y coordinate allowed for object
Function ObjNCosine Angle Get the cosine value of a negative angle
Function ObjNSine Angle Get the sine value of a negative angle
Function OBJPCosine Angle Get the cosine value of a positive angle
Function ObjPSine Angle Get the since value of a positive angle
Function ObjRadius ObjID Get current radius of object
Function ObjRadiusHit ObjID1, ObjID2 Return TRUE if two objects touching via radii distance
Function ObjScale ObjID Get scale of object if X and Y scales are the same, otherwise -1
Function ObjScaleX ObjID Get X scale of object
Function ObjScaleY ObjID Get Y scale of object
Function ObjSpeed ObjID Get current speed of object
Function ObjVectorX ObjID Get current X vector of object
Function ObjVectorY ObjID Get current Y vector of object
Function ObjX ObjID Get current X coordinate of object
Function ObjX1 ObjID, Lnumber Get start X coordinate of line within object
Function ObjX2 ObjID, Lnumber Get end X coordinate of line within object
Function ObjY ObjID Get current Y coordinate of object
Function ObjY1 ObjID, Lnumber Get start Y coordinate of line within object
Function ObjY2 ObjID, Lnumber Get end Y coordinate of line within object
Fucntion ObjWidth ObjID Get current width of object
Function onSegment p, q, r Return TRUE if point q lies on line segment pr (INTERNAL USE ONLY)
Function Orientation p, q, r Returns orientation of ordered triplet pair (INTERNAL USE ONLY)