Search found 5 matches

by exor674
Tue Dec 09, 2008 12:30 pm
Forum: Programming Discussion
Topic: Collision Detection Hint please
Replies: 13
Views: 1393

Re: Collision Detection Hint please

... okay. OP, have you considered going about this the way that the originals did? that is, reduce your code to just test for a point in a box. (which is easy and fast, and also makes it alot easier to do soft collisions) what they did was this. take the width/2 and hight/2 of the one box, and add ...
by exor674
Tue Dec 09, 2008 11:11 am
Forum: Programming Discussion
Topic: Collision Detection Hint please
Replies: 13
Views: 1393

Re: Collision Detection Hint please

if ( (pX >= sX+2 && pX <= sX+6 && pY >= sY+2 && pY <= sY+6) || // top left (pX+8 >= sX+2 && pX+8 <= sX+6 && pY >= sY+2 && pY <= sY+6) || // top right (pX >= sX+2 && pX <= sX+6 && pY+8 >= sY+2 && pY+8 <= sY+6) || // bottom left ...
by exor674
Tue Dec 09, 2008 11:03 am
Forum: Programming Discussion
Topic: Collision Detection Hint please
Replies: 13
Views: 1393

Collision Detection Hint please

I am having some issues with figuring out collision detection. pX and pY is the top-left corner of the player, and sX and sY is the top-left of what I'm tring to collide with. Both objects are 8x8 square, and I want to be able to detect entering the object from any point. This is really CLOSE but de...
by exor674
Wed Dec 03, 2008 5:01 pm
Forum: Programming Discussion
Topic: I want to make lua more like C++ / C#
Replies: 8
Views: 1160

Re: I want to make lua more like C++ / C#

You can do stuff like this if you wanna manage the thing totally in lua (There is a way to set this up from C too, but I'm not aware of how as my lua experience comes mainly from WoW modding). foo = {} function foo:setSomething(what) self.something = what end function foo:getSomething() return self....
by exor674
Tue Dec 02, 2008 8:17 am
Forum: Programming Discussion
Topic: Why does c++ need a compiler? Does ruby use a compiler?
Replies: 9
Views: 1385

Re: Why does c++ need a compiler? Does ruby use a compiler?

Ruby is a scripting language too.

Technically, you could think of a browser as the "compiler" for HTML, if you use the term compiler loosely.