Results 1 to 11 of 11

Thread: 2D game development for the desktop as well the long gone WM2003 OS

  1. #1

    Thread Starter
    Member pocket's Avatar
    Join Date
    Oct 2013
    Location
    Greater London
    Posts
    37

    Question 2D game development for the desktop as well the long gone WM2003 OS

    Hi there,

    I wanted to type asking about 2D game creation in Visual basic. I came across an old topic post, and it is an example for use in Visual studio 2008 or something, I imagine it may work in 2003, and 2005.

    http://www.vbforums.com/showthread.p...87#post3739387

    ^Nice example.

    But what I noticed was something about DirectX, than how exactly was it for the PocketPc Windows mobile stuff years ago? That doesn't have direct x running on it.

    The example in the above link isn't going to work on an old WM device so long as it is configured?

  2. #2

    Thread Starter
    Member pocket's Avatar
    Join Date
    Oct 2013
    Location
    Greater London
    Posts
    37

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    I guess other languages were used using VS for mobile programs and not vb itself.

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    Nope you can still use visual basic. In fact I have a few example of using visual basic developing 2d games, just check out my 'Game Contributions' link in my signature. If you're wanting to develop for the windows phone, you can do so with XNA. I also have a few example here on the forums as well, just look under my XNA contributions. DirectX isn't really supported in Visual Basic, well it is, but it isn't if you kind of get my drift. Just take a look at some of my suggestions and get back with me.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  4. #4

    Thread Starter
    Member pocket's Avatar
    Join Date
    Oct 2013
    Location
    Greater London
    Posts
    37

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    I don't own a Windows phone. I'm not a computer programmer, how ever lets say with old sotfware such as VS 2003 and the old dated Windows mobile 2003 OS, it may be possible to create a bare bones scenario. Nothing complex.

    Perhaps a slight variation of the Space War classic, two ships and a gravity field. The computer controlled ship would have a slight advantage of firing more missiles than the player would. Move would be possible, but nothing flexible. I guess a fight to the death essentially is what the idea is, not quite Space war, but a bare bones basic of it. Perhaps vertex graphics can be used for the effects?

    Nothing special about the effects. I don't know why there aren't any tutorials on this or why nobody has seemed to of I guess they are around.

  5. #5
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    I suppose you could, I know I have a Visual Studio 2005 Pro and on the installation it has a windows mobile project already on there. I got to say, I uninstalled it because:

    A) It's 2005 and I'm spoiled to LINQ
    B) I don't have an older phone, in fact I don't even use my newer cell phone
    C) Took up to much space on my desktop

    But if you want I can re-install it and send a screenshot of what it looks as well as post any code that might get automatically generated with it.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  6. #6

    Thread Starter
    Member pocket's Avatar
    Join Date
    Oct 2013
    Location
    Greater London
    Posts
    37

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    I don't think that would really be necessary.

    The WM dev is similar to desktop programming. But leaving that aside, I think images are probably easier to move than vertext graphic pieces? I noticed a lot of 2D games are made that way. Perhaps vertex graphics can be used for debris/explosion damage. I don't know, what ever.

    As for a tutorial on a variation of the space war shooter game, there are no tutorials on how to begin and perhaps configure it differently.

    Unless ofcourse, the gravity effect would be a loop of slow movements towards the field, while being fired upon and having to dodge the missiles from the other ship, while having a bit of free movement, left and right, engine burn , essentially that is how it could be done. Though the way I have explained the theory it doesn't appear dynamic, but then no game is freely dynamc, just instructions in loop.

  7. #7
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    Well in XNA the way a game flow is constructed is:

    1) Initialize
    2) Load
    3) Update
    4) Draw
    5) Unload

    And your loop is preforming Step3 and Step4 until you're ready to unload. There are a few examples of a managed game loop in vb.net, but I have one that I use on my website. Just click on 'My Snippet Website' in my signature and go to Articles -> Managed Game Loop. From there you'd just place your update commands in one sub and your draw commands in the other.

    When using GDI+ you don't really need to redraw the image every time because VS does that for you. Here is some pseudo code of using controls that VS gives you like a picturebox:
    Code:
    Private lives As Integer = 3
    Private move_horizontal As Integer = -5
    Private move_vertical As Integer = -5
    
    Private Sub Update()
       Asteroid.Left -= move_horizontal
       Asteroid.Top -= move_vertical
       
       If Asteroid.CollidesWith(Ship) Then
          Call DestroyAsteroid()
       End If
    End Sub
    
    Private Sub DestroyAsteroid()
       Asteroid.Image = DestroyedImage
    End Sub
    
    Private Sub GameLoop()
       If lives > 0 Then
          Call Update()
    
          ExecuteAfterPause(8, New MethodInvoker(AddressOf GameLoop))
       Else
          Call EndGame()
       End If
    End Sub
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  8. #8

    Thread Starter
    Member pocket's Avatar
    Join Date
    Oct 2013
    Location
    Greater London
    Posts
    37

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    GDI+ is vertex graphics for VB.

    With python, I don't know if it's as simple as the way you have described it. I have tried Python Pygame, and I have my vertex ship, but to move it using an arrow key...I don't get it, it requires changing the radius or something.

    Is VB doing something much easier than what would have to be done in Python, if you are familiar with that language?

  9. #9
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    Yeah, I've been doing a bit of Python work lately. I take it you didn't take a look at my Game Contributions because my last 2 games I've uploaded were in Python. The only thing is that I haven't done any GUI work in Python, only stuff in the command prompt.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  10. #10

    Thread Starter
    Member pocket's Avatar
    Join Date
    Oct 2013
    Location
    Greater London
    Posts
    37

    Question Re: 2D game development for the desktop as well the long gone WM2003 OS

    Quote Originally Posted by dday9 View Post
    Yeah, I've been doing a bit of Python work lately. I take it you didn't take a look at my Game Contributions because my last 2 games I've uploaded were in Python. The only thing is that I haven't done any GUI work in Python, only stuff in the command prompt.
    I've only just read this page on the site about gameloops, I guess the part about CPU usage is for complex 2D games right? . I guess some of the examples for 2D games should probably work okay.

  11. #11
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,712

    Re: 2D game development for the desktop as well the long gone WM2003 OS

    Not necessarily, I've actually been in the process of changing over all of my stuff over to a managed game loop. The whole point you should get from that article is that:

    1) Busy waits are a terrible abomination
    2) Timers are OK when you start out

    If you want an example of a simple 2d game that only takes into account collision and uses a timer for the game loop(with the exception of the update) take a look at my Bouncy Ball game.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

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