Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:28
    JamieSlome opened #7633
  • Dec 07 12:04
    mrhelmut commented #6978
  • Dec 06 21:20
    stromkos commented #7537
  • Dec 06 18:30
    mrhelmut closed #7630
  • Dec 06 18:30
    mrhelmut commented #7630
  • Dec 06 08:27
    JDoucette commented #6978
  • Dec 06 01:52
    nkomp18 commented #7313
  • Dec 05 14:56
    yhl1219 commented #7632
  • Dec 05 14:44
    yhl1219 opened #7632
  • Dec 05 06:40
    cpt-max synchronize #7533
  • Dec 02 00:00
    nsvedberg commented #7631
  • Dec 01 23:58
    nsvedberg commented #7631
  • Dec 01 23:30
    nsvedberg opened #7631
  • Nov 29 08:13
    AlexW57 opened #7630
  • Nov 29 08:10
    AlexW57 opened #7629
  • Nov 29 07:26
    DimitarBogdanov commented #7626
  • Nov 29 07:26
    DimitarBogdanov commented #7626
  • Nov 29 02:14
    JacksonDorsett closed #7619
  • Nov 29 02:13
    JacksonDorsett opened #7628
  • Nov 29 02:06
    JacksonDorsett opened #7627
Romber
@Rombersoft

Hello everybody I've noticed one bug in last version. There is code:

if (keyboardState.IsKeyDown(Keys.R))
{

I start application 3 or 4 times and then nothing happens after R key pressing. I change R to T in code and application again works 3 or 4 times running. Then I return code to R key (Ctrl+Z) and application again works 3 or 4 times running. I even set breakpoint inside {...} block but thread does not come inside it. I think it's real bug

kimimaru
@kimimaru:matrix.org
[m]
How are you updating keyboardState?
Romber
@Rombersoft
KeyboardState keyboardState = Keyboard.GetState();
-W²l
@wlinna:matrix.org
[m]

Hello, I'm new to MonoGame, and I'm trying to help my friend to port his game to Linux. The project originally uses "WindowsDX" instead of "DesktopGL". But in "DesktopGL" the game just crashes on certain calls to DrawUserPrimitives. It crashes on both Linux and Windows (his machine). On Linux the only error message I get is "segmentation fault". Windows doesn't give any useful message either.

Here's what the call to DrawUserPrimitives looks like:

_graphics.GraphicsDevice.DrawUserPrimitives(
                      PrimitiveType.TriangleList, vertices, 0, vertices.Length/3, new VertexDeclaration(CustomVertex.VertexElements));

Here's how CustomVertex looks like: https://pastebin.com/buJE0A5C

How can I start to figure this out? What sort of mistake would expectedly lead to a segfault on OpenGL / MonoGame? I couldn't find anything that seemed relevant in the forums.

Thanks!

-W²l
@wlinna:matrix.org
[m]

:point_up: Edit: Hello, I'm new to MonoGame, and I'm trying to help my friend to port his game to Linux. The project originally uses "WindowsDX" instead of "DesktopGL". But in "DesktopGL" the game just crashes on certain calls to DrawUserPrimitives. It crashes on both Linux and Windows (his machine). On Linux the only error message I get is "segmentation fault". Windows doesn't give any useful message either.

Here's what the call to DrawUserPrimitives looks like:

_graphics.GraphicsDevice.DrawUserPrimitives(
                      PrimitiveType.TriangleList, vertices, 0, vertices.Length/3, new VertexDeclaration(CustomVertex.VertexElements));

Here's how CustomVertex looks like: https://pastebin.com/buJE0A5C

How can I start to figure this out? What sort of mistake would expectedly lead to a segfault on OpenGL / MonoGame? I couldn't find anything that seemed relevant in the forums.

I'm using MonoGame 3.8 on core 3.1.

Thanks!

-W²l
@wlinna:matrix.org
[m]
--
Another question I couldn't figure out. Why on DesktopGL GraphicsDevice doesn't have Flush-method? My friend uses it on WindowsDX, and I'm wondering whether I need to replace it with something. For now I just use #if DIRECTX to disable it on DesktopGL
kimimaru
@kimimaru:matrix.org
[m]
I think the first step would be to add logs and step through the code to see where it's crashing and when. the segfault would likely happen on native code as the managed code would throw an exception
1 reply
The situation around Flush is odd - it's mentioned in the docs on the base GraphicsDevice (https://docs.monogame.net/api/Microsoft.Xna.Framework.Graphics.GraphicsDevice.html#Microsoft_Xna_Framework_Graphics_GraphicsDevice_Flush), but it's not in the latest code on develop. I would file an issue for this
1 reply
kimimaru
@kimimaru:matrix.org
[m]
That's the DirectX-specific implementation. The base one doesn't have it: https://github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Graphics/GraphicsDevice.cs
the docs may just be out of date. it's not in the 3.8 code either
-W²l
@wlinna:matrix.org
[m]
That base-one, just like the DirectX-specific one, is a partial class, and it's not hidden from the user, and my friend even calls it (though I haven't asked whether it's necessary), which makes me wonder if I need to do something similar on DesktopGL
kimimaru
@kimimaru:matrix.org
[m]
That's my point. In MonoGame, typically there's a base class with a method (say Flush) and then each implementation has one named "Platform X" - for instance, PlatformFlush
it's odd the docs have Flush on the base class but it's not implemented everywhere else. that was my point
2 replies
-W²l
@wlinna:matrix.org
[m]
Would be nice to step into DrawUserPrimitives code, but apparently not possible, because MonoGame doesn't have PDBs on Nuget. I'll try to compile MonoGame myself
1 reply
-W²l
@wlinna:matrix.org
[m]

I was able to build from "develop" branch and add MonoGame as a project dependency like this:

    <ProjectReference Include="..\MonoGame\MonoGame.Framework\MonoGame.Framework.DesktopGL.csproj" />
    <ProjectReference Include="..\MonoGame\Tools\MonoGame.Content.Builder.Task\MonoGame.Content.Builder.Task.csproj" />

but now the Content won't get built

kimimaru
@kimimaru:matrix.org
[m]
Sorry, I'd like to help but I haven't tried building MonoGame since they switched to .NET Standard. to my knowledge, adding the MG project to yours directly as you did is the way to go there
-W²l
@wlinna:matrix.org
[m]

Okay, I decided to skip that idea, and wen't back to using Nuget packages. What I found out instead is that somehow using POSITION1 in the shader crashes it:

struct VertexShaderOutput
{
    float4 Position : SV_POSITION;
    // float4 PosWorld: POSITION1;
    float2 TexCoord : TEXCOORD0;
    float2 Glow: TEXCOORD1;
};

If I remove comments from PosWorld, the game crashes. But that PosWorld is important, so I'm not sure what's the alternative

I have no prior experience with Direct3D
-W²l
@wlinna:matrix.org
[m]
It turns out that POSITION1 needs to be changed to TEXCOORD3
-W²l
@wlinna:matrix.org
[m]
Textures don't seem to work though
1 reply
Michael Wegge
@Firedragonweb
Hey there! I'm super excited about net6, especially for Android and ios. Is there any indication if monogame will work out of the box for these targets or will it take time to adjust?
Puri Sahib
@purisahib

I am making a new VS Code extension for unity devloper Name :- unity-code Devloper:- Pradeep puri goswami https://files.gitter.im/57a6385440f3a6eec05e3e93/dhgM/Puri.png Link:- https://marketplace.visualstudio.com/items?itemName=PradeepPuriGoswami.unity-code&ssr=false#overview
Create Unity classes, methods, loop, and Statement easily

Features
All the Unity code snippets you need. This extension intends to be the complete collection of Unity snippets for Visual Studio Code.

It takes advantage of latest Visual Studio Code snippets features to create the code faster for you.

MonoBehaviour
Create game classes like MonoBehaviours, NetworkBehaviours and StateMachineBehaviours easily. Also create common methods like Start(), Update() or OnTriggerEnter2D() and log calls.

MonoBehaviour

Editor
Create Editor classes like Editor, EditorWindow and PropertyDrawer as easy as it can be.

Unity Editor

ScriptableObject
You never remember the property that goes with the ScriptableObject to create it via Unity create menu? Not a problem.

ScriptableObject

Installation
As in any Visual Studio Code Extension you have several options to install:

Enter the Visual Studio Code Marketplace, search for Unity Code (or enter directly on the extension page) and click on Install button.
Inside Visual Studio Code, enter in the Extensios panel, search for Unity Code and click on Install button
Run the following command in the Command Palette:
ext install purisahib.unity-code
All the snippets
Start typing the names to create the corresponding snippets.

Game classes:

MonoBehaviour
StateMachineBehaviour
NetworkBehaviour
ScriptableObject
Editor Classes:

Editor
Editor with Reorderable List (NEW)
EditorWindow
PropertyDrawer
ScriptableWizard
MonoBehaviour Methods:

Awake()
FixedUpdate()
LateUpdate()
OnAnimatorIK()
OnAnimatorMove()
OnApplicationFocus()
OnApplicationPause()
OnApplicationQuit()
OnAudioFilterRead()
OnBecameInvisible()
OnBecameVisible()
OnCollisionEnter()
OnCollisionEnter2D()
OnCollisionExit()
OnCollisionExit2D()
OnCollisionStay()
OnCollisionStay2D()
OnConnectedToServer()
OnControllerColliderHit()
OnDestroy()
OnDisable()
OnDisconnectedFromServer()
OnDrawGizmos()
OnDrawGizmosSelected()
OnEnable()
OnFailedToConnect()
OnFailedToConnectToMasterServer()
OnGUI()
OnJointBreak()
OnJointBreak2D()
OnMasterServerEvent()
OnMouseDown()
OnMouseDrag()
OnMouseEnter()
OnMouseExit()
OnMouseOver()
OnMouseUp()
OnMouseUpAsButton()
OnNetworkInstantiate()
OnParticleCollision()
OnParticleTrigger()
OnPlayerConnected()
OnPlayerDisconnected()
OnPostRender()
OnPreCull()
OnPreRender()
OnRenderImage()
OnRenderObject()
OnSerializeNetworkView()
OnServerInitialized()
OnTransformChildrenChanged()
OnTransformParentChanged()
OnTriggerEnter()
OnTriggerEnter2D()
OnTriggerExit()
OnTriggerExit2D()
OnTriggerStay()
OnTriggerStay2D()
OnValidate()
OnWillRenderObject()
Reset()
Start()
Update()
Debug class

Debug.DrawLine()
Debug.DrawRay()
Some useful code snippets:

Debug.Log() (type log)
Debug.LogError() (type logerror)
Debug.LogWarning() (type logwarning)
Debug.LogException() (type logexception)
Unity Keywords

C# Keywords

Loop, Statement etc.

special Words.

If you have any suggestions, open an issue in the Github project page and I'll add them as soon as I can :).

If you like the color theme of the previews, you can download it here: Base16 Ocean Dark Extended Theme.

Thank you for downloading this extension.

Enjoy!

kimimaru
@kimimaru:matrix.org
[m]
This is a channel for MonoGame, not Unity
Aleksanderrrrr
@Aleksanderrrrr
What is the best physics library to start with monogame?
Dominique Louis
@CartBlanche
Are you targeting Windows 10 with a UWP/UAP app/game and making that app/game available via https://itch.io, which requires side-loading on customer machines? This batch file automates a few things required for side-loading and installation on Windows 10. Feedback, contributions welcome - https://gist.github.com/CartBlanche/cc135d46944818864d9d468916c982cd
I also have an uninstall batch file, if that is of interest to anyone.
On a side note, this sort of thing really should be provided by Microsoft via a notary service, like Apple does for macOS apps/games. But doesn't look like MS want to make that simpler for developers. :/
Ruben Hägg
@karpaenbalkong:matrix.org
[m]
Hello
Brien King
@BrienKing
Hello
ilmenit
@ilmenit
Hi
what's the current state of compiling Monogame to web?
Sandy Gutierrez
@sandygk
any tips on how to install and use monogame on archlinux?
kev zettler
@kevzettler
Can anyone point me to the latest guide to compiling monogame for Html5 Web builds?
IndianPrince69
@IndianPrince69
hello
can someone help me with my homework
Obstinatesoul
@Obstinatesoul
Hey y'all developing new gaming application?
Frick
@ImFalling
Hey, is your build server down? I'm struggling to connect to it while trying to install the MGCB-editor. I
I keep timing out while trying to install it on Linux.
"/usr/share/dotnet/sdk/5.0.403/NuGet.targets(131,5): error : The HTTP request to 'GET http://teamcity.monogame.net/guestAuth/app/nuget/feed/_Root/default/v3/index.json' has timed out after 100000ms. [/tmp/xymbo1rl.roa/restore.csproj]"
Pinging the domain teamcity.monogame.net sends no packets back either.
I tried downloading the .nupkg file and installing it manually but got the same outcome. I should mention perhaps that I originally was able to install the stable build a few days ago, but when I was met with an error, I uninstalled it and decided to try a developmental release, which I haven't been able to install due to the aforementioned connection timeout. I can no longer install the stable release either.
Frick
@ImFalling
After disabling the build server source from the dotnet source list I can now install the stable version, but the GTK errors when starting the program persists.
Frick
@ImFalling
"System.NullReferenceException: Object reference not set to an instance of an object.
at Gtk.Widget.DrawnSignalCallback(IntPtr inst, IntPtr arg0, IntPtr gch)"
Gtksharp is installed, as well as libgtk 2 and 3, and I've followed the setup documentations exactly. The console dumps out a bunch of errors and warnings pertaining to GTK and Gdkpixbuf checks which all fail.
Anyways, I'll give you time to respond and check back later. Thanks for maintaining monogame, you guys are doing the lords work.
Tristan Lee Mitchell
@Aternix12
Oh hi there's a chat? How's everyones games coming along ;)
Dominique Louis
@CartBlanche
Morning all. I just tried using XACT 3.0 (June 2010 release) to add a nice rain/thunder track to my game and it seems to have totally fubarred the XNA found file as it throws an exception when trying to read the new files. The wav file played fine inside XACT. To be fair it's been years since I've used XACT, so it's probably something simple. Does anyone know if there is a specific setting I need to toggle?
Also the files size went form 29MB to 9MB. I initially put that down to better compression in the newer version, but now I'm not so sure. Any hints welcome.
Dominique Louis
@CartBlanche
OK it is the compression that breaks the playback. Seems the XAP project didn't store my original no-compression flag from a while ago.
Febriyanto2
@Febriyanto2
Hii