VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



UPDATED A Subspace Replica

by Chad Bjorklun (2 Submissions)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (7 Votes)

If you're lucky, you've played the game Subspace (aka Continuum) If not, download it. Well, this is the beginning of my attempt to copy it. Even though it isn't finished, this is a complete program. The reason I've uploaded it now is just to show some examples of trig algorithms for movement and BitBlt being used in a loop. For me, starting to use BitBlt inside a continuous loop was difficult at first because it can be tricky to get rid of the flickering. Anyway, here's my code and how I did it. Oh yeah, also has an example of GetAsyncKeyState, a good API to know.
UPDATE: Bombs, Bullets, Explosions, Enemies, Walls, Energy Bar. If you downloaded it already, dowload it again! The program has reached the point where it is too big to upload so if you want an up-to-date version, just email me.

Side Effects
If you close it wrong, you will get a bit of memory leakage, not much though.
API Declarations
Public Declare Function GetAsyncKeyState Lib "User32" (ByVal vKey As Long) As Integer
Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Public Declare Function LoadImage Lib "User32" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
Public Declare Function CreateCompatibleDC Lib "gdi32" (ByVal HDC As Long) As Long
Public Declare Function SelectObject Lib "gdi32" (ByVal HDC As Long, ByVal hObject As Long) As Long
Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Public Declare Function DeleteDC Lib "gdi32" (ByVal HDC As Long) As Long

Rate UPDATED A Subspace Replica

Download UPDATED A Subspace Replica

Download UPDATED A Subspace Replica (2 MB)

UPDATED A Subspace Replica Comments

No comments have been posted about UPDATED A Subspace Replica. Why not be the first to post a comment about UPDATED A Subspace Replica.

Post your comment

Subject:
Message:
0/1000 characters