Jump to content

  • Log In with Google      Sign In   
  • Create Account

Thomas Wiborg

Member Since 05 Jan 2013
Offline Last Active Nov 20 2015 06:23 PM

Topics I've Started

What should i learn to become a gamedev?

27 October 2015 - 07:21 AM

There are many roads to Rome. I know that.
But what should my friends and I do if we want to become gamedevs(Programmers, we use C#)?

Is it good to learn alot of basic and advance programming?
Should we for example learn different sort algorithms and such things? To have a good background before jumping into gamedev?

What about math? What sort of math is important to know when we want to make games as mario. Diablo 2. In other word 2d and isometric games?

Other things we should learn before we hit gamedev?

I known some developers jump straight into games and learn it that way. But is that better than having a solid background in basic/advance prog, math and then start creating games?

Thanks for all replies smile.png


Terraria clone. What do I need to learn

27 August 2015 - 10:43 AM

Hello fellow programmers.

I want to make a terraria clone. Ofc in alot smaller scale. And i therefor wonder what kind of skills i need to learn to do so.

What is the difference between procedural generation of my map and perlin noise generating my map array. Ive tried out Perlin, to get my array filled with random numbers.
Are those the same thing or am i all wrong?

What other skillset do I need to learn?

Im newbie so go easy on me smile.png

Mouse pointer out of applicationresolution when running fullscreen

30 July 2015 - 05:58 PM

Im having some problems when running my application at fullscreen.

My game is currently running at 800x600 resolution. When im in windowed mode my mouse pos x and y is 0.0 upper left corner and 800.600 bottom right.
If im running my game in fullscreen its still 0.0 in upper left corner but at bottom right it changes to 1920x1080.
My mouse then follows the resolution of my screen and not the applications resolution.


Is there a way to fix this, maybe a workaround or something like that?

Here are my constructor for Game1.cs and Initialize

  public Game1()
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            Window.IsBorderless = true;

            graphics.PreferredBackBufferWidth = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            graphics.IsFullScreen = true;

        protected override void Initialize()
            Mouse.SetPosition(0, 0);

            IsMouseVisible = true;

            currentGameState = GameState.MainMenu;

Pong. Reflection of ball intersecting paddle

18 July 2015 - 03:17 PM

Hello all,


I have a newbie question.


Im using Monogame/XNA to make a Pong clone.


I want to reflect my ball when it hits the paddle. If it hits the middle i want it to reflect horizontaly. The closer it get to the edges i want it to reflect sharper and sharper.


How can this be done EASILY? ive tried using angle/radians etc, but i just cant get the hang of it. Can i use any of the C#/XNA/Monogames inbuilt library to do this? Or is there some other way?


Ive googled up and down, but i cant find any article that is easily explained :)


Ofc, when it reflects and hits the wall i want it to keep the angle untill it hits the other paddle.


Thanks for all replies!

Monogame, Ray Intersection not working correctly

19 June 2015 - 04:27 PM


Im having some sort of trouble with my collision detection when using Ray.
I have a enemy which follows my player. If my player moves horizontally or vertically of my enemy, the intersection works flawless. It finds the center on my player and stops on top of him. The problem starts when the enemy chases my player diagonaly/sideways.

When it then hits my player it starts vibrating, and dosent seems to hit my players BoundingBox.

Here is my code. Ive done some breakpoints and found out that when the "enemyToPlayerNormalized" direction is something else than 0 or 1, meaning decimal for example x = 0.5346, y = 0.2453 (then going sideways)
The "enemyToPlayerRayDistanceResult" wont recieve any results, It then returns "null".
What can I do so my "enemyToPlayerRayDistanceResult" recieves a result when the direction is something else than 0 or 1?

public void EnemyToPlayer(Vector2 enemyToPlayerNormalized)
            //Creating a ray which has enemy position and tracks down the direction to the player. Enemy to player direction is normalized to get unit vector 1
            Ray enemyToPlayerRay = new Ray(new Vector3(enemy.TextureBoundingBox.Min.X, enemy.TextureBoundingBox.Min.Y, 0.0F), new Vector3(enemyToPlayerNormalized.X, enemyToPlayerNormalized.Y, 0.0F));

            //If there is a chance for my enemy to hit the players bounding box, it will return a float value of the distance between them
            var enemyToPlayerRayDistanceResult = enemyToPlayerRay.Intersects(player.TextureBoundingBox);

            //moving the enemy
            enemy.position += enemyToPlayerNormalized;

            //If it has a value and is less than 1 away from the player, it will set its position to the player.
            if(enemyToPlayerRayDistanceResult.HasValue && enemyToPlayerRayDistanceResult.Value < 1)
                enemy.position = player.position;