Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

877342 Posts in 32857 Topics- by 24297 Members - Latest Member: laffertyr

May 19, 2013, 08:59:55 AM
  Show Posts
Pages: 1 ... 14 15 [16] 17 18 ... 22
226  Player / General / Re: US VS EU on: April 18, 2011, 06:00:25 AM
Ive often wondered how using metric vs imperial affects peoples minds.  I live in the US, and although I can see the benefits of the metric system, I still like the imperial better, because I base all my measurement on the size of my shoe (or something about that size).  The metric system's base is 3-4x as big as the imperials, so everyone either has to estimate things in decameters, which I dont think they do, or have a significantly different idea of how far stuff is.  Seems like it would be cool to do a psychology experiment to see if this affects other parts of the subconscious...
227  Developer / Technical / Re: What are you programming RIGHT NOW? on: April 05, 2011, 03:11:12 PM
Learning UDP.  My exe is 30MB thanks to all the useless general purpose functions I have, and I need to copy it over my wifi to test on 2 computers.  Really annoying
228  Developer / Technical / Re: Show us your level editor(s)! on: April 03, 2011, 02:44:58 PM
Ive never actually completed a project that used any of my level editors, but they both turned out pretty well:

This one was for a physics based iPhone game.  You could draw lines, circles, etc and move them.  Overall, its really nice to use, and if I ever need a vector image editor, im going to use it as a base.  Like most first time editors, it uses random keys to change tools, which makes it impossible to use without checking the source code every time...


This one was for a 1-screen puzzle platformer.  It actually has tools at the bottom, although theres still no save dialog...  You can see the required boxes, keys, and buttons that are a staple of all puzzle platformers in abundance.  This is the penultimate level, and as such, is completly ridiculous.  Also, that placeholder text wasnt actually placeholder, that was in the game.
229  Developer / Technical / Re: The grumpy old programmer room on: April 02, 2011, 10:17:04 AM
Just finished a week long break from coding, went back, and now my code (which worked perfectly last week) fails to create a window....  Of course, GLFW doesnt give any errors for the openWindow() function, and looking through version control, I can tell that no lines before openWindow() have been changed in months, and no functions are called.  Im stumped.
230  Developer / Technical / Re: Anyone here rolling their own engine? on: March 16, 2011, 02:15:08 PM
Ive been making an engine in ANSI-C, for portability more than anything else.  I dont want to make a full game using some engine and then not be able to release it on some system because the engine isnt available.

Anyway, Ive designed it around 'processes'.  I have a 3D renderer process, a fps display process, a HUD display process, etc.  This makes it easy to add menus that go over backgrounds, etc, although I havent gotten far enough making a game with it to use menus.  Before I started the engine, menus always seemed to be hacked in over the existing game, and they were really annoying.  Now, they should be much easier.  Also, I can do splitscreen by just adding to renderer processes.  I dont know if this is actually a good idea, but it *seems* excellent
231  Player / General / Re: Hard drive space on: March 09, 2011, 01:26:19 PM
Foldersize/Treesize are also very good (and free!)
232  Developer / Technical / Re: The grumpy old programmer room on: February 28, 2011, 02:23:11 PM
I had that problem too, turned out my string class was allocating one byte too few, and then attempting to write to that byte, overwriting all kinds of stuff
233  Developer / Technical / Re: C/C++ Dynamic Class Instances? on: February 23, 2011, 10:07:53 PM
Instead of searching for the first dead one, when one dies, move the last live one there(since order doesnt matter, and just keep an index to the last one
234  Developer / Technical / Re: C/C++ Dynamic Class Instances? on: February 23, 2011, 08:10:46 PM
Use a vector
Code:
#include <vector>
using namespace std;
vector<Bullet*> bullets;

Bullet *bullet=new Bullet;
bullets.push_back(bullet);
235  Developer / Technical / Re: The grumpy old programmer room on: February 15, 2011, 03:13:51 PM
No, id been writing it all weekend, but I hadnt checked it in yet because it wasnt working properly, and somehow when I said file->save all they got corrupted so after the computer got back from the blue screen they were all empty.

I also impulsively save like every five lines, which is really annoying because codeblocks has a habit of removing all the tabs on a blank line if you save...  Really wird   Concerned
236  Developer / Technical / Re: The grumpy old programmer room on: February 15, 2011, 02:54:35 PM
It should also never crash! And be 100% compatible with open standards and every other OS! It should do all my household chores for me! And it should rain tacos!

All of these things.

sounds like my mac!  Wink
Ha ha.  You has made a joke! (spoken by russian immigrant)

In other, grumpier programmer news, windows blue screened while saving my code, so I lost 4 source files, about 1000 lines each  Angry
237  Player / General / Re: Something you JUST did thread on: February 04, 2011, 05:04:03 PM
Just added the functions catchMouse() and releaseMouse() to my game.  Now I giggle whenever I see them
238  Developer / Technical / Re: What are you programming RIGHT NOW? on: February 02, 2011, 03:04:27 PM
I JUST finished making that myself:
Code:
/**
    Tests if a circle and rectangle intersect

    \param c Center of the circle
    \param r Radius the cirlce
    \param min Bottom left of the rectangle
    \param max Top right of the rectangle
    \returns 1 if they overlap, 0 otherwise
    */
uchar circleRectangle2f(vec2f c,float r,vec2f min,vec2f max)
{
    // Get the center of the sphere relative to the center of the box
    vec2f sphereCenterRelBox=sub2f(c,min);
    // Point on surface of box that is closest to the center of the sphere
    vec2f boxPoint;
    // Check sphere center against box along the X axis alone.
    // If the sphere is off past the left edge of the box,
    // then the left edge is closest to the sphere.
    // Similar if it's past the right edge. If it's between
    // the left and right edges, then the sphere's own X
    // is closest, because that makes the X distance 0,
    // and you can't get much closer than that :)
    if (sphereCenterRelBox.x <0)
        boxPoint.x = 0;
    else if (sphereCenterRelBox.x > max.x)
        boxPoint.x =max.x;
    else
        boxPoint.x = sphereCenterRelBox.x;
    // ...same for Y axis
    if (sphereCenterRelBox.y < 0)
        boxPoint.y = 0;
    else if (sphereCenterRelBox.y > max.y)
        boxPoint.y = max.y;
    else
        boxPoint.y = sphereCenterRelBox.y;
    // Now we have the closest point on the box, so get the distance from
    // that to the sphere center, and see if it's less than the radius
    vec2f dist = sub2f(sphereCenterRelBox,boxPoint);
    if (dist.x*dist.x + dist.y*dist.y< r*r)
        return 1;
    else
        return 0;
}
Also, if its not an AABB, you can lookup the code for "closest point in OBB to point", and just plug that in  Wink

EDIT: Ninja'd
239  Developer / Technical / Re: Pixel Shader Hardware Requirements on: February 01, 2011, 04:39:51 PM
I had this same question about a month ago, and decided to develop for 3.0, but maintain a basic renderer that uses all low end features for that 10%.  It wont necesarally look good, but theyll still be able to play, and 90% of players will have cool advanced graphics
240  Developer / Technical / Re: What are you programming RIGHT NOW? on: January 21, 2011, 12:48:23 PM
Im trying to get a blinn-phong specular shader working, while satisfying my own need to use as few uniforms as possible
Pages: 1 ... 14 15 [16] 17 18 ... 22
Theme orange-lt created by panic