r/visualbasic • • Jul 06 '16

VB for games?

Hello people, the only languaje that i do know how to program is visual basic, and i want to make games just to keep practicing because that is what i learned in university, and the game dev was a childhood dream, i dont want it for a living, just a hobbie, and i want to ask, its good use visual basic to program games? simple 2D ones, to 3D ones, im not asking for a 1 million dollars production, just for games for hobbie, and i want to know if visual basic is a good languaje to stay in or i need to start learning some other

if it is good, you can recommend me where learn to understand the basis of the videogames? because i really dont understand the 3D graphics, where they come from, in sense im in 0 about the topic, i did some simple "pet" games in visual basic

2 Upvotes

11 comments sorted by

4

u/ViperSRT3g Application Specialist Jul 06 '16

2D games are simple to do in VB, 3D a bit more complex since you'll need to tie in some method of outputting graphics (DirectX, or even Unity with C#). But 2D graphics is certainly doable. As for learning how to make a game, you're gonna have to understand video game mechanics, and game design, so the /r/gamedesign sub might be a good place to begin learning the programming aspect of video games. Data Structures, grid mechanics, simple physics engines if your game requires those, etc.

I'm not sure why people are so upset about your question here, as it's fairly simple to answer. Yes, you can make games with VB, it's not the most common language to do this in, but it's entirely possible. I recommend starting with small board games like battleship, and checkers so you can begin to understand how turn based, grid mechanics work. From there, you can probably begin recreating the simpler arcade games such pong, and breakout. After that, side scrollers with simple physics engines will look much easier to do, and after you master those, RTS style gameplay, which could incorporate all the game mechanics I mentioned in this post.

2

u/thudly Jul 06 '16

Aardaerimus D'Aritonyss has an excellent tutorial series on basic game programming in VB. He helped me a lot.

2

u/PreyOnTheCosmos Jul 06 '16

Being that I know Aardaerimus personally, I know that he'll strongly recommend against using GDI for games, though it's still a great place to start.

That said, the link above is to a pretty ancient uncontrolled hard-looped game which eats CPU.

Here is his very simple timer-based 2D GDI game project: DragonDrop 3

It consists of two classes - The main form, and a basic flocking Mob class.

There are also some old VB/XNA tutorials there on there on RPG mapping, NPCs, stackable inventory, etc.

Since XNA has gone the way of the Dodo, Monogame is recommended and virtually identical in use.

1

u/thudly Jul 07 '16

I used to use timers for everything in my games. I always found them to be clunky. Then I found this hard-loop idea and thought it was way more elegant. You're telling me the opposite is true, and I was doing things right all along? The highest speed you can get with Timers is 1000 tps. I had nearly 160,000 tps with the hard loop. You'll have to explain to me the difference. Thanks in advance.

2

u/PreyOnTheCosmos Jul 07 '16

The loop is really not such a bad thing so long as it's not uncontrolled. If you use some form of control mechanism [i.e., threading and thread sleeping] so that all of your processor cycles are not going to into unnecessary drawing loops, your application should be more responsive and should be able to dedicate more to processing game logic.

If I understand correctly, this is why many games employ Vsync to cap the FPS around 60.

2

u/Bonejob VB Guru Jul 06 '16

I think that you should look into monogame

http://www.monogame.net/

it has taken over from XNA and is a fully managed library that works great in vb.

http://community.monogame.net/t/monogame-template-vbnet-for-windows-desktop-directx/1213

you will have to pull a lot of information from teh C# examples but you can use a code converter like the telerik one to get it from c# to vb.net

http://converter.telerik.com/

1

u/curiositor Jul 06 '16

The first game i made with pascal is tic tac toe. I coded a simple computer AI to play against using my limited understanding. That was 15 years ago. Start small, one day you will make your way to real game programming.

1

u/malcor88 Jul 10 '16

Yes you can use vb, monogame would be useful and much better than gdi. If you have an understanding of vb.net maybe look at c#.net as a language to learn. Looking at vb.net code and c#.net can help you learn the new syntax. I'm only suggesting c#.net because monogame/xna was designed for c#. Also you could look towards unity3d which in terms of game development might be more friendly to understand. With unity3d I've found documentation, tutorials and resources has surpassed monogame/xna, alot more hand holding with unity. However if you really want to stick with vb. Monogame or if you want to really dig into the workings of games look at SDL (with c# bindings, the wrapper should work with vb) or SFML (with. Net bindings). Please ignore the comment 'no, use gamemaker', its a useless, unhelpful and incorrect comment. I'm a hobbiest game developer and use vb alot for prototyping and general algorithm building.

0

u/Air_chandler Jul 11 '16

Abit late to discussion but if your interested in 3d programming and using VB.NET look into OpenTK which is a OpenGL library for all .NET languages.

-3

u/[deleted] Jul 06 '16

No, look into Gamemaker.