Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Nanoha

Member Since 26 Feb 2009
Offline Last Active Dec 07 2011 01:19 PM

Posts I've Made

In Topic: Displaying text in OpenGL. why so hard?

01 December 2011 - 12:51 PM

Displaying text is indeed quite hard with OpenGL. I wouldn't use lines, I'd either go for the texture (you put all letters on a image and draw bits of it around the place) or Freetype. I've not tried freetype, it may be hard to understand but the texture bit is alot of work. A long time ago I used this: http://students.cs.byu.edu/~bfish/glfont.php it worked well. Its the texture type implementation.

Displaying text slowly like you have shouldn't be too difficult. You have 2 strings, one is the text in its entirety, the other is the part your actually showing. Every so often (miliseconds/ticks, whatever time your game uses) you add a little more to the displayed text (substring).

In Topic: How did he do it?

16 October 2011 - 07:04 AM

When implementing my collision detection (which I no longer use as physics engines are so much better) I based it around this: http://www.peroxide.dk/papers/collision/collision.pdf which currently doesn't seem to work but this is similar: http://www.three14.demon.nl/sweptellipsoid/SweptEllipsoid.pdf

No reason why you can't also use a heightmap/terrain, I can see the two working together with very minimal effort and it would bring a speed saving.

In Topic: Whitehouse: We the People petition system

15 October 2011 - 04:58 PM

Not a bad idea I suppose, we have something similar here (Britain) which seems a little more useful, I think parliment has to "debate" the issue rather than someone just "responding" to it. Either way, they don't actually have to do anything about it but I'm not against the idea.

In Topic: mouse

10 October 2011 - 09:46 AM

Whats the "room"? is it the window size? I think the titlebar sometimes gets included in the height. Does this deviation occur on both axis(up/down, left/right) or only up/down. If its just up/down then it might be the titlebars height. You could then account for that (subtracting it from your height (480).

You could also change the projection to be more appropriate - instead of being 13/13 it could be 640/480.

In Topic: [C#] Checking the amount of items in a List?

08 October 2011 - 04:46 PM

Its not a neat solution, for the first item just write it, then for subsequent items write a comma then write the item. Maybe:

bool first = true;
foreach (string items in mInventory.List)
{
    if(first)
    {
        Console.WriteLine(" \"{0}\"", items);
        first = false;
    }
    else
    {
        Console.WriteLine(", \"{0}\"", items);
    }    
}

PARTNERS