MonoGame and Visual Basic

I have a CornFlowerBlue screen! Yay!

Thank you so much for your help. I will try moving everything over from my XNA project tomorrow. I’ll let you know how it goes.

Cheers!

Perfect! Glad I can help.

Unfortunately trying to move my code from the old XNA project to the Monogame project isn’t working at all, the Monogame.Framework references ok but doesn’t give any support for any of it’s members. The project is also not connecting or binding to Microsoft modules correctly, there’s no support for basic functions, although the name spaces are imported.

I don’t suppose you still have a copy of the original version you spoke of?

How would I go about putting a request in for better VB support?

I don’t think it’s so much a need for VB support. .Net isn’t C# vs VB. The same libraries work just as well for both languages. The lack of “VB support” comes from the contributors being mainly C# (and whatever other languages they personally know). My ability to answer your questions come from my limited time writing VB6 code 15 years ago and just applying my C# knowledge to a VB syntax. So for the most part, you should be able to just grab a C# example and just translate the code to a VB syntax and it should (in theory) work.

What I can do for you is write a slightly more “complex” sample. Hopefully that’ll help you out. Unfortunately, I might not be able to provide said sample until next week. I’m planning on participating in the Global Game Jam, so there goes my weekend.

Haha, happy weekend!

I would be most grateful, although I could transcribe C# example, it wouldn’t be in an app with all the references in place.

The sample I tried today was missing simple command stuff like RND and other basic stuff, although all the imports were in place. So that confused me. Also the Monogame.Framework was imported, but it wasn’t picking it up at all.

When I asked about VB support, what I meant was a Starter Template in the New Project form as there is with C#. Now of course that’s really just an empty name space, I guess if you could get a template working for me I could copy it to the right location anyway.

I can’t thank you enough for your help on this. I’m itching to get started properly but I fear I’m a bit long in the tooth to start doing battle with (())()('s!!

Hey @MuntyScruntFundle,

So I updated the zip on my OneDrive. It doesn’t do much more, simply renders a texture (MonoGame logo) and moves it across the screen, then wraps it around when it leaves the edge of the viewport.

https://onedrive.live.com/redir?resid=61EAAB8E9F5BA8D9!34889&authkey=!ADZvhU1ydvQnsAo&ithint=file%2Czip

Thank Vogles. Unfortunately I have 194 Errors this time. Could you post a picture of your solution explorer with the references block expanded?

I just followed the steps I mentioned here: MonoGame and Visual Basic

Then added the monogame logo to the content folder and moved it around in the SampleGame class.

This is really bizarre. I’m starting to wonder if things aren’t installed correctly.

Could you list, or link all the things that need to be installed for Mono? I have mono installed and it references fine, but something obviously isn’t right. I really don’t understand why, when I start a blank project, then drop in your modules it doesn’t work. Even more strange why I lose connection with some really basic functionality.

Please let me know about the install list and I’ll continue trying to get this working.

Thanks again Vogles.

Hi Vogles, I think I might be getting somewhere. I’m currently trying to manually build a new template, trying to reference XamlGame in the MainPage.xaml is failing. But, I can’t see see XamlGame in your sample I downloaded.

Where and what is it? I’m assuming it should be see in the Solution Explorer? If so could you please post the file for me to import?

Thanks.

I’ve sorted that problem, but now when adding the game=xamlGame initialisation in Sub New of MainPage, I can’t find anything that matches your swapChainBackgroundPanel of “dinglepops”.

I wonder where the dinglepops have gone!

Hey Munty,

The swapChainBackgroundPanel is in the MainGame.xaml.

I actually did a conversion on the MonoGame 4.3 but you can change it to use the newest stuff if you create it from template first.

The C# templates that start off by default were what i converted and made them as a normal built in template for VB.net the same way. Just look for the VB.net installer posted somewhere here on the forums itll have a dropbox download. It shouldnt come with any runtime errors -> includes DirectX, Mobile, and OpenGL conversions(Though i cant guarentee the mobile ones would work as I could never test them)

I downloaded that template a while ago, it’s what I’ve used to get started, but it doesn’t have any references or imports for Mono, it’s XNA only. Or is that how it should be?

I have got confused beyond belief!

I’m thinking of just making a template, since you seem to have so much trouble with the projects I upload.

Also I’m working on a short tutorial series for my website that will get people started. I’ll make sure to target it to both c# and vb users

Hey @MuntyScruntFundle,

I just created a VS2015 template for a Windows 10 UAP project. You can find it at the link below. I also submitted a PR. Hopefully it can be part of the next release of MonoGame so others can take advantage of the template w/o scouring the forums for my link.

https://onedrive.live.com/redir?resid=61EAAB8E9F5BA8D9!34958&authkey=!AJAtfiVpxzU2-tY&ithint=file%2Czip

Well, I’ve downloaded your template, and when I try to load it I get 143 errors. :o(

I must be missing an installation of something. I have the latest DX, I have the Latest Mono. Could someone send me an installation check list? !

Is this a Framework Target problem?

Type universe cannot resolve assembly: System.Runtime, Version blah blah…

A google of this error suggests the framework target may be incorrect, however if I look in the Properties/Application tab there are no options to target a framework version, Only a Windows 10 Build version. Changing from 10586 to 10240 makes no difference.

There must be a fundamental difference in the way we have our VB’s setup. Or I’m missing something so obvious I’ll eat my toes when I find it!

The template installer I made has worked between multiple computers pretty well, tested on Visual Studio 2010 and 2015, I dont recall having missing references, but what MonoGame projects usually come with is:

DirectX:
System
MonoGame
System.Xml

OpenGL:
System
MonoGame
OpenTK
LibSDL
System.Xml

You can manually reference them yourself, to check for the references, look in the Extensions tab from the Normal Framework stuff(Top tab, then its second subtab).

However, I am well aware of the runtime error you may get, it happens because visual studio likes to change which version of MonoGame that is references to Windows Phone version… So I recomend probably selecting it manually from the folder if this is the case. I usually just delete the other monogame versions im not using when building something with monogame so it cant change the version to a pointless one like the windows phone.

If you would like, (Should you still be having troubles) You can message me on my email and we could do something for screen sharing or use team viewer and i can assist in getting your project to work :slight_smile: I have helped a few people before getting started with MonoGame and VB using the Template installer i made.

Edit: Almost forgot my email…

ArchaicOokami@gmail.com