Search found 62 matches

by Joeyotrevor
Tue Jul 07, 2009 5:32 pm
Forum: Programming Discussion
Topic: std::string-to-int converter
Replies: 36
Views: 2859

Re: std::string-to-int converter

Actually bitwise NOT is ~, ! is a boolean NOT.
by Joeyotrevor
Fri Jun 26, 2009 4:01 pm
Forum: Programming Discussion
Topic: Need code optimization suggestions
Replies: 17
Views: 1184

Re: Need code optimization suggestions

I've always wondered about the "C" in "CItem" habit (seen it a few other places), I'm guessing this is a general way of saying something is a container? Nah, it's just in case they forget it is a class. IMO it's kinda stupid. Wow seriously? That's like starting variable names wi...
by Joeyotrevor
Fri Jun 26, 2009 1:58 pm
Forum: Programming Discussion
Topic: Need code optimization suggestions
Replies: 17
Views: 1184

Re: Need code optimization suggestions

dandymcgee wrote:
I've always wondered about the "C" in "CItem" habit (seen it a few other places), I'm guessing this is a general way of saying something is a container?
Nah, it's just in case they forget it is a class. IMO it's kinda stupid.
by Joeyotrevor
Sun Jun 21, 2009 4:51 pm
Forum: Programming Discussion
Topic: Should STL be used in game programming
Replies: 29
Views: 1988

Re: Should STL be used in game programming

Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
Uh... what?
by Joeyotrevor
Thu Jun 18, 2009 12:11 pm
Forum: General Gaming
Topic: Final Fantasy XI Online
Replies: 16
Views: 2789

Re: Final Fantasy XI Online

All I've heard is that it's a major grindfest.
by Joeyotrevor
Tue Jun 16, 2009 1:23 am
Forum: Programming Discussion
Topic: [Solved] SegFault with SDL_DisplayFormat?
Replies: 12
Views: 854

Re: SegFault with SDL_DisplayFormat?

Code: Select all

 if(init == false)
    {
        getError();
        return 1;
    }
You don't seem to have any parentheses after init, so I would guess it is comparing the memory address of init to false. That shouldn't even compile.
by Joeyotrevor
Mon Jun 08, 2009 9:49 pm
Forum: Programming Discussion
Topic: [SOLVED]Help with SDL/C++ Space Invaders Clone
Replies: 5
Views: 640

Re: Help with SDL/C++ Space Invaders Clone

Thanks, glad I could help. :)
by Joeyotrevor
Mon Jun 08, 2009 9:44 pm
Forum: Programming Discussion
Topic: [SOLVED]Help with SDL/C++ Space Invaders Clone
Replies: 5
Views: 640

Re: Help with SDL/C++ Space Invaders Clone

Not sure if this is your problem, but in your switch statement you never break, which means everything after the true case will also be executed, meaning you are drawing multiple times for the same block but in different places. switch(drawY) { case 0: apply_surface(((SCREEN_WIDTH / 8) - (BLOCK_WIDT...
by Joeyotrevor
Mon Jun 08, 2009 9:33 pm
Forum: Current Events and Science/Technology
Topic: Project Nay-Tal
Replies: 27
Views: 4526

Re: Human-AI interaction; Project NATAL

I would be surprised if it works as well as it does in the videos when it is released. Look like it would be a bitch for program for.
by Joeyotrevor
Sun Jun 07, 2009 11:52 am
Forum: Programming Discussion
Topic: Book Recommendation Needed
Replies: 14
Views: 872

Re: Book Recommendation Needed

You'll really want to understand how linked lists work since they are the foundation of lots of other data structures. Queues and stacks can both be implemented with linked lists. This tutorial has lots of pictures that show what is going on with them and will help you to understand the basics of h...
by Joeyotrevor
Sun May 03, 2009 4:54 pm
Forum: Programming Discussion
Topic: Collision Detection
Replies: 3
Views: 518

Re: Collision Detection

You really only need to do something like this: bool check_collision(int x1, int y1, int x2, int y2) { if((x1 <= x2+32) && (x1 + 32 >= x2) && (y1 <= y2+32) && (y1 + 32 >= y2)) { return true; } return false; } Then for your movement you would have: if(left key is down) { x -= ...
by Joeyotrevor
Fri Apr 24, 2009 10:12 pm
Forum: Programming Discussion
Topic: [SOLVED]Winsock problem
Replies: 3
Views: 336

Re: Winsock problem

I used ioctlsocket() to make the sockets non-blocking.
by Joeyotrevor
Thu Apr 23, 2009 6:34 pm
Forum: Programming Discussion
Topic: [SOLVED]Winsock problem
Replies: 3
Views: 336

[SOLVED]Winsock problem

I'm making a MUD in C++ and I'm using winsock for the networking. At first I had the server spawn a new thread for every connected client, but this would obviously be extremely slow if lots of people were to connect. I changed it so the Server class has an array of Clients, and in the main loop it l...
by Joeyotrevor
Tue Apr 21, 2009 10:05 pm
Forum: Programming Discussion
Topic: Lua help
Replies: 4
Views: 504

Re: Lua help

You have to put quotes around lua.h instead of brackets.