1,913 questions
0
votes
0
answers
19
views
Texture Slicing for displaying pseudo 3D planes in XNA/Monogame
currently I'm drawing pseudo 3D road segments to achieve a fake 3D road by drawing lines.
This is what it looks like:
The road is also moving smoothly. Here is my code:
public void Draw()
{
...
0
votes
0
answers
35
views
Fake Road 3D Effect in C# Monogame
currently I'm trying to achieve a fake road 3D effect in monogame. I used this tutorial so far:
https://www.youtube.com/watch?v=xTyURl8qjZw
I successfully translated the first part where the road goes ...
0
votes
1
answer
54
views
Save/Load Class into Json - Monogame
internal class Quest
{
public int[] StatsBonus;
public int[] StatsMalus;
public string Title = "";
public string Description = "";
...
0
votes
0
answers
64
views
How to create instances of different objects that take same parameters? [duplicate]
I'm trying to make a touhou-style game where any sprite, that can shoot bullets, can shoot any type of bullet it is given, with the shot cooldown coming from the bullet. But, I can't figure out how.
...
1
vote
0
answers
30
views
Error calling a C# generic method from Lua script with NLua
I am making a game with Monogame and NLua, but running into an error.
This is the Lua script, where the issue occurs on the third line, and stops before moving into the C# method:
function ...
1
vote
2
answers
92
views
C# memory allocation with Memory<T>
I am casually reading about the Memory<T> class in C#, to figure out if I can use it to "format" memory allocations to be more contiguous. I don't know a lot of the finer details of ...
0
votes
0
answers
57
views
Why is my program moving upleft when zooming?
I am trying to create a 2d coordinate grid with panning and zooming, I was following this tutorial https://www.youtube.com/watch?v=ZQ8qtAizis4 and I am using C# and Monogame in VS 2022.
When I attempt ...
0
votes
0
answers
54
views
Having trouble getting the correct position to draw my sprite to when rotating it
I'm having trouble drawing my animation to the correct position. I draw my animation from an atlas, and offset the position of the animation by how many pixels have been trimmed when packing the ...
0
votes
1
answer
74
views
How can I pass a generic function to a class in C#
I'm currently working on a Entity Component System (ECS) for a game I'm developing in C# and Monogame.
My GameObject class has a dictionary with all its components, and this method is written to ...
0
votes
0
answers
34
views
How can I add 3d collision in an isometric tile map in Monogame
So I'm trying to add a 3d collision in my 2d isometric collision. I want to use Vector3 to help me. The z position will be the depth. But i tried it and it does not work. Is there any way of adding a ...
0
votes
0
answers
31
views
Isometric collision detection error in Monogame
So, I have this problem where the collision does not work properly. I tried many techniques. The red tiles were supposed to show the collision with the green tile. The problem is when I try to convert ...
0
votes
1
answer
51
views
How to crop text in monogame?
I'm making a game in monogame that uses fake windows as a puzzle element. I'm able to resize the windows, and I figured out how to crop images at the edges of the window, but I can't figure out how to ...
0
votes
0
answers
47
views
Monogame says I don't have an XNB file, when I do
I have a function to load a list of images from a folder with the MonoGame Content.Load<Texture2D> () function. the code for the function is as follows:
void loadImageList(ref Texture2D[] ...
0
votes
0
answers
33
views
Platformer game collision detection not working
I'm trying to implement collision detection into a platformer style game in XNA/MonoGame.
I'm following two separate tutorials, one for an animation manager, and another for adding collision. I'm ...
1
vote
1
answer
106
views
Visual Studio 2022 has hang-ups while Running code
I wrote a little program in C#/Monogame which allows me to move a piece on a chess board by keyboard commands. One tile at a time.
While testing the code I noticed, that sometimes the program is not ...