Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Member Since 07 Nov 2002
Offline Last Active Dec 24 2014 05:20 PM

#4870828 So who is still around these days?

Posted by alnite on 09 October 2011 - 09:59 AM

Now if you'll only update the site to the Black theme ... that'll be great :)




#4869573 C++ pointer to struct [edited]

Posted by alnite on 05 October 2011 - 03:58 PM

Though I am for using vectors, you still need to learn about memory allocations and deallocations. C++ has so many pitfalls that you need to be aware of. Improper usage of memory can turn your app inside out and you won't know why, and it's hell of a bitch to track down.

#4867776 Something you never knew about Steve Jobs

Posted by alnite on 30 September 2011 - 05:29 PM

Is this an iJoke?

#4860912 Odd memory problems with classes

Posted by alnite on 12 September 2011 - 06:19 PM

Here's a couple of mishaps I noticed:


Body tempStar = Body(starTex);
Body planet = Body(10.0f, -5.0f, 30.0f, fileManager.loadTexture("planet1.bmp"));
shared_ptr<Actor> tempA = shared_ptr<Actor>(new Asteroid());
I see these everywhere. Did you realize that you are making two objects here? You created one and called the copy-constructors. Have you handled copy constructors correctly? You are risking duplicating and leaking huge memory chunks here especially that you also pass along the Model objects. I think what you meant is:

Body tempStar(starTex);
Body planet(10.0f, -5.0f, 30.0f, fileManager.loadTexture("planet1.bmp"));
shared_ptr<Actor> tempA(new Asteroid());

Also, check your World::start() method, you push_back actual instances of Body class, which triggers the copy constructor, depending on what you have inside Body, this could be huge leak and premature deallocations. And you did this 1000 times!

2. It's been a while since I last touched OpenGL, somebody with more expertise can probably enlighten more, but how did you deallocate these textures and models? I see allocations in the Game::start() method, but where did the deallocation occur?

It seems to me that your program hasn't managed memory consumption correctly, which could lead to the problem you are experiencing.

Now, I am not 100% sure if these are going to fix your problem. If you really want to fix this, I'd suggest going back to your old compiler where you can reproduce this bug and start cleaning up your code.

#4859585 Variables... uppercase... merrrrrr

Posted by alnite on 09 September 2011 - 10:21 AM

It's best to follow the convention of the language you are coding in, no matter how horrid it is. The worst thing you couldve ever done is to use one convention in a language that has completely different convention (such as m_strVar in Java)

#4857736 Advantages of MBA?

Posted by alnite on 05 September 2011 - 01:56 AM

Previous posters offered valid advice that MBA is pretty much useless, but I am going to say: TAKE IT.

Here's why:
  • Your employer is paying for it. Nothing is better than free money and free education. Just make sure you read the fine prints if there is any strings attached.
  • Degrees are useless for your brain, but they still look good on resume. I bet that you'll land more job interviews with MBA/MSc/BSc combination than a MSc/BSc. Whether you get the job is a different question, however.

But it all boils down to what you want. Any skills is useless if you never intend to use it, including an MBA.

#4854797 What must a TD Game have for you to buy it?

Posted by alnite on 28 August 2011 - 01:19 PM

I can point out things that I don't like on some current TD games:

  • Towers that don't have obvious benefits. For example, a tower that can't kill a unit all by itself, but once you put a large amount of them, like 20, then you can start seeing lots of kills. Without obvious documentation, no players would be able to reap the benefit of such tower. Some players would say it's strategy, but I'd say it's stupid as you have to invest in this tower with a hope that it'd do something. I have seen such tower. Inferno Tower, I think is what it's called. Expensive. It takes 1% of units health, and splash but low attack rate (I found out about this after I used it. No clear documentation whatsoever that it's doing this. Docs say something like "Awesome tower that burns units!!"). Obviously it's pointless building such tower early game, but you better build lots of it late game when units have 1,000,000,000 health points, and my once-glorious turrets who only deal merely 1000 damage/second are now useless.
  • Interest. I've seen a couple of TD games that add interests to your bank. While this could be a good thing and open up a lot of possible strategies, but from players' perspective, it's downright frustrating. How much spending is too much? A player is holding off building better towers thinking that it'd save him up good later, only to find out that he'd lose in the next wave.
  • Imbalanced units between waves. If I got 100% kill rate on wave 1, I'd expect at least 80% kill rate in the next wave if I do not add an additional tower. However, a lot of TD games out there spent too little time thinking about this.

#4854513 Game Loop Explanation?

Posted by alnite on 27 August 2011 - 12:08 PM

For example, you want to draw a ball on the screen. How do you do it? You need a method to draw and and an x-y coordinate.

ball.draw(x, y);

There you have a ball in front you. That's not very exciting, is it, because the ball just sits there! Now, you want to improvise. You want this ball to move from the left side of the screen (x=0), to the right side (x=w, where w is the width) of the screen.

for (int x = 0; x < w; ++x) {
   ball.draw(x, y);

Now you are excited and want more! You want the ball to keep bouncing left-right left-right infinitely until you tell it to stop by pressing the ESC button!

bool running = true;
int x = 0;
int dx = 1;
while (running) {
   x += dx;
   if (x == w) dx = -1;
   if (x == 0) dx = 1;

   ball.draw(x, y);

   if (esc_pressed()) running = false;

There! Now you know why there is such a thing as a game loop. It keeps the game running!

#4850246 How to find some same-minded people

Posted by alnite on 17 August 2011 - 05:14 AM

Even among real-life friends, team cohesion is difficult to achieve. Project management cannot rely on hobby and self-motivation alone, which is why a lot of online projects fall apart. There's a degree of professionalism and disciplinary actions required to keep team members doing what they are supposed to do.

I would suggest working on your own, then publish a demo with your programmer's art. If there are artists interested in making your game look better, you'll hear from them. If not, you can always pay somebody to do it for you. I actually prefer purchasing for services than relying on friends. When you purchase for art, you can specifically define how you want it to look like because you pay for it. Friends will have their own ways of doing things, and sometimes they want certain unfavorable demands, such as 10% of profit even though all he did was the splash screen. Another reason why teams fall apart: arguments.

Just because you found some people to make games with does not mean all of you will hold hands throughout the project. You will have different opinions about many different things. How the game look like, how it plays, what type of music it should play on the title screen. It can be frustrating to mold these opinions/arguments together into one solid product. Then there's the dreaded miscommunication. People don't always see things the way you do. I am sorry to ruin it for you but making games isn't as fun as you might think it is.

Good luck in your endeavor.

#4845301 What Would YOU Like To See In Today's Games?

Posted by alnite on 05 August 2011 - 07:00 PM

Something different.

If it's an RPG, don't feature 10-year olds beating the crap out of gargantuan dragons with their white/black/red magic shit. Don't insert guns as ancient forbidden technology into a story that begins with sword and arrows and magic. I swear, all these RPGs out there feature the same shit over and over again. No, I don't want to see "Heal" ability in my White mage skills. Why does Heal always have to be "White" magic? Why is there "Heal" at all? And fuck Paladins.

If it's a FPS, don't feature handguns and shotguns as your first weapons and rocket launcher and lazer-pew-pew as your later weapons. Fuck, why don't you just give a rocket launcher at the beginning of the game just so you can blow shit up for a while and give laser in the next mission to make holes with? I don't give a fuck about FPS stories, so you can be creative there or stick to the old blowing-up-aliens storyline is fine with me. Just be creative with the weapons. And I don't want to see moving platforms and be jumping on them on FPS. I can't see where my feet land, and I hate to guess.

#4844201 App developer gets screwed out of $55,000

Posted by alnite on 03 August 2011 - 02:19 PM

I think it's been brought up before that there are legal loopholes that benefit Amazon in the AZ App Store contract. IGDA and quite a lot of other people have made noises about this since the first time the store opened. It benefits them more than it benefits developers. The fact that they signed up for it and complained that AZ took advantage of it is recklessness on their side.

Btw, after knowing about the legal loopholes, I basically uninstalled Amazon App Store App from my Android. I support developers. I don't support corporations trying to cash-in app-store bubbles.

#4843054 Why is there more christianity than others?

Posted by alnite on 01 August 2011 - 02:57 AM

What a DUMB subject! We should limit religious discussion to one active topic at a time.

1) Because it's 2000 years old, and it's everywhere.
2) Get out more, and prove yourself wrong.


#4837040 Relationships

Posted by alnite on 18 July 2011 - 03:21 PM

I actually understand why she said "but I love you", but actually did the opposite. She actually cares about you, but she's not sure if she wants to be with you. She doesn't think you are hot enough. You are not exciting enough. In other words, you are boring now, to her. See, a woman can care for a guy but not sleep with him. Are you friend-zoned? Not really, friendzone is worse than that. Consider that somewhere in between, which also sucks, btw.

Do you have any chance of going back to her? Yes, if you play your cards right.
Am I suggesting you to do that? No. Don't ever try to go back to your ex. She'll come to you when she wants to.

Now, back to you, how do you cope with the loss? Nothing much you can do. Do other things, date other women, eventually it will wear off. Try to be more interesting, develop new skills, new groups of friends, and have some vision to your future (which doesn't involve her).

#4835472 Partial key match on std::map?

Posted by alnite on 14 July 2011 - 05:05 PM

I am pretty sure Auto-Complete is done using regex. It's been a while since I have used C++, but a search for "using regex in C++" returns regex_search function and Boost.Xpressive.

You can probably hook them up to your std::map

#4829805 How to prevent keyboard blocking when 3 keys are pressed?

Posted by alnite on 30 June 2011 - 05:07 PM

Give options to play with gamepads and joysticks. I heard gamepads are all the rage today...