Results 1 to 7 of 7

Thread: VB:Alpha Dogfighter Game 2D

  1. #1

    Thread Starter
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    VB:Alpha Dogfighter Game 2D

    After playing with the concept for a week or so, I finally came up with a polished demo.

    Feel free to modify or ask questions. It's pretty fast but you can make it faster by dropping the speed delay. I can't seem to play it much faster than it is. I get killed too often.

    It uses API calls for all graphics. The sound is Directsound.

    Graphics 32 Bit Alpha Channel files I call *.spr, one of the module includes the sprite file making routine. I've included the Alpha and bitmap files used for the spritemaker so you all can play.

    The controls are the arrow keys up,down left, right and spacebar to fire your rockets. Esc Key exits the game.

    Graphic files make it too big to upload so Here's a link

    http://home.comcast.net/~technorobbo/Alpha.zip
    Last edited by technorobbo; Jan 25th, 2009 at 10:48 AM.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  2. #2

    Thread Starter
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB:Alpha Dogfighter Game

    Version 1.1.0.50 was just uploaded. it includes alternate 4 scenes seamlessly interwoven. So if you can survive that long, you'll have some cool stuff to look at.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  3. #3

    Thread Starter
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB:Alpha Dogfighter Game

    Update Revision 1.1.83 available:
    Mostly code clean up - less memory usage - Some graphics cleanup.

    Added more comments to source to code and arranged the code logically. This way you can dissect and modify easier.

    AI is more agressive.
    How aggressive? It's a constant you can set - I guess you could call that the level of difficulty. The lower you set it the more likely they are to kill you.

    Your plane now drifts to center, not the bottom of screen. Keeps your on your toes!

    Map Loader is now occuring after you get killed in the Tundra Map after the first fork in the river. If you survive the Tundra map will not update. Map replacement causes a pause in the code so I do it during the pause when you get killed.

    There are now 4 maps:

    Tundra Base Map (main map ties together all map transitions)
    Ocean Map (with battleships)
    Desert Oil Refinery Map
    River Canyon Map.
    Last edited by technorobbo; Dec 28th, 2008 at 02:43 PM.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  4. #4

    Thread Starter
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB:Alpha Dogfighter Game

    Revision 1.1.84

    New airplane graphics - All original art now!

    Plane also has banking animaton.

    1 potential bug corrected, No issue had appeared but it was a bug either way.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  5. #5

    Thread Starter
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB:Alpha Dogfighter Game

    REVISION 1.1.89

    By Rewriting the map transition routine to include the map loops and map transitions on 1 bitmap. I halved the size of files needed and was able to load all maps at once. Map Loader routine has been Rem'd out in source code for future use.

    AI Planes (my bogeys) now bank on turns like the players plane - animation graphics included in sample zip.

    - Stay tuned for any new updates.
    Last edited by technorobbo; Dec 30th, 2008 at 05:02 AM.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

  6. #6
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: VB:Alpha Dogfighter Game 2D

    Wow it's nice! And everything is done on one form, and by using one single module. It's great!

    Theres only one thing i found so far. You are forgot to implementing the speed modifier, that is used to keep the game flow on a continous speed. You may noticed that your game speed is fluctuate, based on what it is does at the moment. For example, on each time the map is changed, the game is slows down, then speeds up. It may be a bit annoying. But, you can avoid it, by multiplying all the calculations where you implement speed intervals (just like the MapSpeed, RocketSpeed, and so on..) at _each frame_ with a time interval that is you can retrieve from the last frame your code drawn. To get an accurate timer, you can use the QueryPerformanceCounter() api. I have attached an example, how to implement this api.

    Now, before your program enters the do..loop, call the initialization in the following order.

    modQPT.Timer_InitTimer: modQPT.Timer_StopTimer: modQPT.Timer_ResetTimer

    This will set up the timer, and it sets a valid interval for the timer_elapsed, that is you can call later.

    Create a new value to store the response from the method timer_elapsed(), for later usage.
    Dim FrameDrawTime As Double

    At the very beginning of the do-loop, do a check to see if the value of FrameDrawTime is zero, or negative value, and set it to 0.001 (1 uc). Otherwise it may cause hanging, or reverse movement in the game.

    If FrameDrawTime <= 0 Then FrameDrawTime = 0.001

    Now, in the do-loop, all the movement and speed calulactions, you have done, shold be multiplied by using this value. For the first time you implement this method, it will cause a huge speed drop, because you are multiplied calculations with a pretty small value (0.015 for example). So, to get the same speed you got before, all the speed constants you set, you have to multiply by 1000 for example. Just go and fine tune it.

    Nah.. at the very end of your do-loop, you can retrieve how many microseconds elapsed to drawing this frame by this way:

    modQPT.Timer_StopTimer
    FrameDrawTime = modQPT.Timer_Elapsed 'store the time interval, for using in the next frame.
    modQPT.Timer_ResetTimer

    So..... The purpose of this method is, to keep the game speed in sync. If, drawing a frame took more time, than the previous frame was, the timer will gives a higher value, so the calculated step sizes on the next frame will be higher. But, all you can see is that the map is flowing on a continous speed, because the timer is continously modifies the stepsize, in the right order!

    Not to mention, there is an another big advantage of this method. This game will run on the exactly same speed on all kind of machines. For example, if a machine cannot produce more than 10 frames (or less) per seconds, it doesnt matter, because the timer produces higher values, so the movement speeds got higher values, the game will run on speed, you are set before.

    Did you understand what am i talking about?

    Ps: I love the explosion effect, reminds me the old commodore times
    Attached Files Attached Files

  7. #7

    Thread Starter
    Fanatic Member technorobbo's Avatar
    Join Date
    Dec 2008
    Location
    Chicago
    Posts
    864

    Re: VB:Alpha Dogfighter Game 2D

    I implemented that on the 3D version cause the directX was just too darn fast. My computer ran this GDI version fast but not too. (Allegro non troppo). So I left that out. Since I started the 3D version I shifted all my resources towards it. Maybe someday I'll revisit the 2D game. It was suppose to be reminiscent of the old Commodore and NES type games I'm glad you liked it.
    Last edited by technorobbo; Feb 8th, 2009 at 12:13 PM.
    Have Fun,

    TR
    _____________________________
    Check out my Alpha DogFighter2D Game Demo and Source code. Direct Download:http://home.comcast.net/~technorobbo/Alpha.zip or Read about it in the forum:http://www.vbforums.com/showthread.php?t=551700. Now in 3D!!! http://home.comcast.net/~technorobbo/AlPha3D.zip or read about it in the forum: http://www.vbforums.com/showthread.php?goto=newpost&t=552560 and IChessChat3D internet chess game

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width