Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 27 Mar 2013
Offline Last Active Jan 02 2014 08:05 AM

Topics I've Started

Is there any places where I can sell my project?

08 September 2013 - 09:39 AM


Let's say I made a mobile game, but it's not really a successful and ads almost don't bring me any money. Is there any websites, where I can sell my project? I mean take it down from play store, send all project files to a customer and get some money.

How does a “Build” button in game engine editor window works?

12 August 2013 - 11:40 AM


I'm thinking about making my own simple game engine and a level editor for my next game and I was wondering, how does a "build" button works for example in Unity game engine window? How are these used assets, scripts, models, textures packed? How are these being playable? Can someone explain what happens behind? P.S. I'm not sure if techniques are the same or different on each platform, but I'm looking for techniques for an android platform. And I'm not concerned to Unity only, would love to know different techniques.


Drawing infinite grid

29 March 2013 - 08:16 AM

I'm making a 2D map editor and I'm trying to make an infinite(pseudo of course) grid. And then later I need to check in which grid's square is the certain point(mouse pointer). The grid shouldn't stick on the screen like a GUI, user should see grid like so(like "scrolling"):
How can I do that?
P.S. I'm using winforms and opentk if it makes any sense.

c# opentk - converting screen coords to world coords

27 March 2013 - 10:12 AM

I'm making a windows forms application with opengl view and I'm using c#, openTK . I need to get the mouse coords converted to the opengl world coords. Well, my Y coord gets converted wrong. It's hard to explain, so here is the video: http://tinypic.com/r/23sal8k/6. I'm constantly pressing left mouse button and the red dot should be where the mouse is(but it isn't). How to fix this? Here is the code:

       private void glview_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
            if (e.Button == MouseButtons.Left)
                Point worldCoords = convertScreenToWorldCoords(e.X, e.Y);
                shitx = worldCoords.X;
                shity = worldCoords.Y;

        // functions:
        public static Point convertScreenToWorldCoords(int x, int y)
            int[] viewport = new int[4];
            Matrix4 modelViewMatrix, projectionMatrix;
            GL.GetFloat(GetPName.ModelviewMatrix, out modelViewMatrix);
            GL.GetFloat(GetPName.ProjectionMatrix, out projectionMatrix);
            GL.GetInteger(GetPName.Viewport, viewport);
            Vector2 mouse;
            mouse.X = x;
            mouse.Y = viewport[3] - y;
            Vector4 vector = UnProject(ref projectionMatrix, modelViewMatrix, new Size(viewport[2], viewport[3]), mouse);
            Point coords = new Point((int)vector.X, (int)vector.Y);
            return coords;
        public static Vector4 UnProject(ref Matrix4 projection, Matrix4 view, Size viewport, Vector2 mouse)
            Vector4 vec;

            vec.X = 2.0f * mouse.X / (float)viewport.Width - 1;
            vec.Y = -(2.0f * mouse.Y / (float)viewport.Height - 1);
            vec.Z = 0;
            vec.W = 1.0f;

            Matrix4 viewInv = Matrix4.Invert(view);
            Matrix4 projInv = Matrix4.Invert(projection);

            Vector4.Transform(ref vec, ref projInv, out vec);
            Vector4.Transform(ref vec, ref viewInv, out vec);

            if (vec.W > float.Epsilon || vec.W < float.Epsilon)
                vec.X /= vec.W;
                vec.Y /= vec.W;
                vec.Z /= vec.W;

            return vec;