Results 1 to 28 of 28

Thread: Gaming.

  1. #1

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Gaming.

    I tried a demo of a scrolling game...it was awful. I think VB is more suited towards IT systems. I used to be a database programmer, but want to make a scrolling game. Do you think, seeing as you're here, that DirectX and/or XNA with either VB6 or VB.net would be a good choice? I don't have any hope of a very graphical game working well with Vanilla VB6.

    Apologies if this is the wrong forum!

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,624

    Re: Gaming.

    If you are wanting to write a game with a decent level of graphics support then you will definitely want to consider DirectX / OpenGL to deal with the graphics rendering.

    XNA is an older approach to using DirectX with dotnet apps, https://monogame.net/ effectively continued what XNA started however. Most of the monogame samples are in C#, but VB.Net is certainly usable. I made a post at https://www.vbforums.com/showthread....=1#post5634191 with a very basic example of using monogame.

    Monogame is a fairly low level toolkit, if you are after something higher level then https://godotengine.org/ might be worth a look - version 4.0 supports c# (not vb.net as far as I am aware)

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

    Re: Gaming.

    You will be limited if you use Visual Basic, probably more so in VB6 than in VB.NET.

    The last supported version of managed DirectX in VB.NET was version 9 (I think) and XNA was last supported in .NET framework 3.5 although I think they provided continued support for C# (which is basically the "C" based language equivalent of VB.NET) in later versions of the .NET framework but not .NET core.

    However, it is worth mentioning that simple scrolling games can probably be done sufficiently enough using GDI (VB6) or GDI+ (VB.NET) assuming they don't get too heavy. For example, I think you mentioned on my GDI+ scrolling background submission that you wanted to build a flappy bird recreation, and that is certainly light enough to be handled by GDI+. The game loop would look something like this:
    1. Check for collision detection
      1. Against the top/bottom of the screen
      2. Against any of the pipes
    2. Scroll the background
    3. Update the y position of the bird
    4. Update the x position of the pipes
    5. (optional) Update the y position of the pipe if you want them to move up and down (like in later levels)


    This is trivial enough that GDI+ can more than handle this workload without any lag or buffering issues.
    "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
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Quote Originally Posted by dday9 View Post
    You will be limited if you use Visual Basic, probably more so in VB6 than in VB.NET.

    The last supported version of managed DirectX in VB.NET was version 9 (I think) and XNA was last supported in .NET framework 3.5 although I think they provided continued support for C# (which is basically the "C" based language equivalent of VB.NET) in later versions of the .NET framework but not .NET core.

    However, it is worth mentioning that simple scrolling games can probably be done sufficiently enough using GDI (VB6) or GDI+ (VB.NET) assuming they don't get too heavy. For example, I think you mentioned on my GDI+ scrolling background submission that you wanted to build a flappy bird recreation, and that is certainly light enough to be handled by GDI+. The game loop would look something like this:
    1. Check for collision detection
      1. Against the top/bottom of the screen
      2. Against any of the pipes
    2. Scroll the background
    3. Update the y position of the bird
    4. Update the x position of the pipes
    5. (optional) Update the y position of the pipe if you want them to move up and down (like in later levels)


    This is trivial enough that GDI+ can more than handle this workload without any lag or buffering issues.
    OK. That's a good answer. I'll use the GDI just to create a demo. Can you put VB.net 9 on with a recent version of VB.net which I put on a few days ago now, incidentally? With reference to DirectX?

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

    Re: Gaming.

    I'm sorry, I'm having a bit of a difficult time understanding your question. Are you asking for a DirectX9 example in VB.NET?

    If so, then you will need the DirectX SDK: https://www.microsoft.com/en-us/down...s.aspx?id=6812 and unfortunately I think you're limited to the .NET framework 3.5 (keep in mind that this version was released in 2010). So I couldn't provide you an example of a "recent" version of VB.NET.
    "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
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Quote Originally Posted by dday9 View Post
    I'm sorry, I'm having a bit of a difficult time understanding your question. Are you asking for a DirectX9 example in VB.NET?

    If so, then you will need the DirectX SDK: https://www.microsoft.com/en-us/down...s.aspx?id=6812 and unfortunately I think you're limited to the .NET framework 3.5 (keep in mind that this version was released in 2010). So I couldn't provide you an example of a "recent" version of VB.NET.
    I was curious about DirectX, as I want to move onto that after trying the GDI programming with VB. So is it easy to go back to .net 3.5, is basically what I'm asking. Sorry if my questions weren't clear, I'm quite the newbie again. Like I said, basically the last thing I created was a database app back in the nineties, and early 00s. VB was just great for that purpose, which is why I'm not giving it up. It fits in with my philosophy of a paperless business sphere. All work and no play makes Jack a dull boy.

    BTW that insect in your signature is incredibly irritating. I thought it was an insect under the screen of my phone!
    Last edited by ArthurDent; Jun 7th, 2024 at 02:04 PM.

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

    Re: Gaming.

    Quote Originally Posted by ArthurDent View Post
    I was curious about DirectX, as I want to move onto that after trying the GDI programming with VB. So is it easy to go back to .net 3.5, is basically what I'm asking.
    Yeah, it's fairly easy. I'm not sure what version of Visual Studio you're using, but the process is likely similar for most.
    1. Open Visual Studio
    2. Go to Tools > Get Tools and Features
    3. Open the Individual Components tab
    4. If .NET Framework 3.5 isn't selected, then check it and install


    Then to create a new project that targets the framework:
    1. Download the DirectX SDK from the link in post #5
    2. Run the DirectX SDK executable
    3. Install the necessary stuff (I usually exclude the samples and source code)
    4. Open Visual Studio
    5. Create a new Windows Form Application (.NET Framework)
    6. Select .NET 3.5 as the project's Framework
    7. After the project is created, go to Project > Add Reference
    8. Go to the Browse tab
    9. Add the DirectX DLLs (probably just Microsoft.DirectX and Microsoft.DirectX.Direct3D), they are typically installed in C:\Windows\Microsoft.NET\DirectX for Managed Code


    After that it is just a matter of running the DirectX code. Jacob Roman has some great tutorials on the forums, I'd highly recommend checking out: https://www.vbforums.com/showthread....VB5-VB6-VB-NET

    Quote Originally Posted by ArthurDent View Post
    Sorry if my questions weren't clear, I'm quite the newbie again.
    No man, you're good.

    Quote Originally Posted by ArthurDent View Post
    BTW that insect in your signature is incredibly irritating. I thought it was an insect under the screen of my phone!
    I have no idea what you're talking about.
    "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
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    There's an ant creature in the bottom right of your signature. Am I imagining it!?Name:  SyEUJX2.jpg
Views: 404
Size:  69.1 KB
    Last edited by ArthurDent; Jun 7th, 2024 at 03:02 PM.

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

    Re: Gaming.

    No idea what you're talking about.

    Who said gaslighting?
    "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
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Gaslighting? I've just posted a screenshot above. Obviously it's you sense of humour. Ho, ho, my sides are splitting.

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

    Re: Gaming.

    No idea what you're talking about, it looks normal to me.
    Name:  SyEUJX2.jpg
Views: 396
Size:  113.7 KB
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  12. #12

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    No stop, it's too funny. I'll need to be sedated.

  13. #13
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    Quote Originally Posted by ArthurDent View Post
    I tried a demo of a scrolling game...it was awful. I think VB is more suited towards IT systems. I used to be a database programmer, but want to make a scrolling game. Do you think, seeing as you're here, that DirectX and/or XNA with either VB6 or VB.net would be a good choice? I don't have any hope of a very graphical game working well with Vanilla VB6.

    Apologies if this is the wrong forum!
    XNA is pretty much dead. VB.Net only uses up to DirectX 9.0c last time I checked. And VB6 uses up to DirectX8, although there are hacks to get DirectX9 working without HLSL shaders sadly. Keep in mind, we are at DirectX12 now. And even if you are moderately good at working with DirectX, it can become a royal pain hard coding your games, setting up polygons and textures, and that is not counting special effects, collisions, animations, etc. People now and days, even professionals, have moved on to Unity and Unreal Engine. Although I personally believe Unity is easier. It has made game creation a breeze and seamless so developers can focus on gameplay aspects rather than hardcoding every little thing. It's also what I moved on to. I use to be a DX nut back in the day. You can tell by my elaborate projects in my contributions down below. But then Unity blew my freakin' mind. The Unity IDE (not the Hub) connects with Visual Studio automatically allowing you to use C#. Think of it as VB.Net with very minor syntax differences and semicolons if you never used it before. There's not that much of a learning curve, has built in physics / collision / animation, supports 2D and 3D, can do ray tracing, and is multiplatform! Which means you can export your finished projects to not only PC, but Mac, iOS, Android, PS4, PS5, XBox Series S, XBox Series X, Nintendo Switch, Meta Quest 2, Meta Quest 3, etc. And it is capable of doing VR and AR. Just to give you some examples, I will share some screenshots as well as a YouTube video of mine of what Unity is capable.

    Attached Images Attached Images   

  14. #14

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Dark Silence was a good demo, thanks for showing me. Im going to try GDI+ for a bit as I think it'll be the fastest way to get where I want. Do you think GDI will handle an animated sprite, and scroll smoothly, it's just for a demo/joke game?

    I didn't want to just forget my VB coding skills when it's OK for Windows and retail applications. What do you think about Visual Basic?

  15. #15
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    Yuck GDI+ lol. I mean, for a new comer, it's good to learn graphics programming through that, but eventually, you'll hit a brick wall and realize it is severely limited. It uses a mix between software and hardware rendering. And personally, I believe DirectX rendering is much prettier. According to https://learn.microsoft.com/en-us/wi...rect2d-and-gdi:

    Code:
    Existing GDI code will continue to work well under Windows 7. However, when writing new graphics rendering code, Direct2D should be considered, as it takes better advantage of modern GPUs.
    But, the problem is, is that you are going to be focusing on a lot of hard coding every little basic part of the game that is not gameplay. This is why I recommended Unity because it takes that part out allowing you to focus on gameplay elements. It makes it a lot easier to get a game going. A hell of a lot!

    What do I think of Visual Basic? Although I used VB6 and VB.Net the past couple of decades, I found C++ and C# to be my go to programming languages personally. They both have a lot more support and there is a bigger community. Majority of the software engineer job postings out there that is not web dev require you know C++, C#, Java, and Python. VB I feel, although I know it can be capable of doing a lot, is losing support and there is a lack luster of careers in it when compared to other languages and technologies.

    But, lets set careers aside. If you go on Coursera which has nearly every coding language, technology, and concepts you can get certified in, and you type in VB.Net, there are literally only two measly courses: Creating a Simple Desktop App, and Explore Variables and Data Types. It's as though nobody is using VB any more and everyone is doing Python and Javascript instead because of its ease of use. Take a look at these stats of the most commonly used programming languages of 2023: https://www.statista.com/statistics/...sed-languages/
    Attached Images Attached Images  

  16. #16

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    I'll use Unity then. Any advice on a beginner's tutorial/book? I like to learn that way.

    That was an eye opener graph. I thought VB.net was about 20%. Ha, no where near.

    I used SQL a lot. I was pleased to see it sit firmly in the top ten.
    Last edited by ArthurDent; Jun 8th, 2024 at 12:27 PM.

  17. #17
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    Two words. YouTube videos lol

    I'd recommend Coursera as well but you gotta pay 60 bucks a month for it, although I believe the first month was just a buck I believe. I also forgot to mention that Dark Silence demo took me only 4 months for Software Engineering class in college.

    [Edit] Ms Pacman took me 24 hours for a Hackathon

  18. #18

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    You're really good. I'm inspired by the 16bit era, especially the Amiga. I have an Amiga mini and a dongle to connect old joysticks to it. I've just purchased a Speedking, but haven't received it yet. I just hope it's not broken, taking them apart is a pain.

    Have you tried Gamemaker? https://gamemaker.io/en/features
    Last edited by ArthurDent; Jun 8th, 2024 at 01:04 PM.

  19. #19
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    Quote Originally Posted by ArthurDent View Post
    You're really good. I'm inspired by the 16bit era, especially the Amiga. I have an Amiga mini and a dongle to connect old joysticks to it. I've just purchased a Speedking, but haven't received it yet. I just hope it's not broken, taking them apart is a pain.

    Have you tried Gamemaker? https://gamemaker.io/en/features
    I heard of it. But it has no where near the features of Unity and Unreal Engine. Damn you grew up with the Amiga? So did I!

  20. #20

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    One of my favourite devices was the Amiga Backup System which allowed you to store disks onto video tape. http://hugolyppens.com/VBS.html

    I had an Amiga C book, but no C compiler!

  21. #21
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    All I did on it mainly was game hardcore LOL. This btw is the best Amiga song ever from Turrican 2.


  22. #22

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Quote Originally Posted by Jacob Roman View Post
    All I did on it mainly was game hardcore LOL. This btw is the best Amiga song ever from Turrican 2.

    I'm the same, I did hard core gaming too. Well you do at that age, don't you? Turrican was a favourite of mine, actually.

  23. #23

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Quote Originally Posted by Jacob Roman View Post
    All I did on it mainly was game hardcore LOL. This btw is the best Amiga song ever from Turrican 2.

    Hey Jacob. I've got a query you might be able to help with. Does Visual Studio come with MSDN documents, and is it free? I'll be wanting to use C# with it. Thanks.

  24. #24

  25. #25
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    This right here. Get the Community Edition (Free) to use with Unity and, this is completely optional, Visual Studio Code which has nearly every language in existence if you wanna learn a lot more programming languages and use other technologies. I use VS Code for stuff like Kotlin, HTML5, CSS3, Javascript, Python, Go, and Rust just to play around with it lol.

  26. #26

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    Thanks very much. Who says kindness is dying. I'm just watching The Day the Earth Stood Still, so feel very alien. Just patiently waiting on my C# stuff, and break in my leg pains. Yeah, that's great. Thanks to you,Jacob, too.

    Re: film. There wasn't much wrong with the original film, this one has Keanu Reeves. He comes to destroy us, mind already made up, unlike the first one, if I remember right. (Bah, let's call in Turrican! Alien scum.) Ha, ha, ha.
    Last edited by ArthurDent; Jun 9th, 2024 at 01:15 PM.

  27. #27
    Computer Science BS Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,347

    Re: Gaming.

    What you are gonna love about Unity is that its more hands on and a lot less coding. So you don't need to worry about hardcoding rendering, physics, collisions, etc. It's all done for you. All the rest of your code will just be the gameplay. Here's a FreeCodeCamp beginner friendly tutorial just for you:


  28. #28

    Thread Starter
    Member
    Join Date
    May 2024
    Posts
    40

    Re: Gaming.

    I've just received my C# books, and I'm going to make a start learning the language, probably tonight when I get in.

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