Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 13 Feb 2012
Offline Last Active Aug 23 2013 06:33 PM

Topics I've Started

FADD vs FMUL time

17 April 2013 - 06:24 PM



I've been some comparisons in C between the 4 basic arithmetic operations (+ , - , * , / ), and surprisingly (for me), add and multiply operations takes the same time: I did the work testes using int and doubles data types and it's the same thing.

Analizing the dissamble code generated by gcc (-S parameter) I noted that the opcodes used are fadd and fmul. According wikipedia, x87 FPU in Athlon 64 employs the same time processing both opcodes.

I'd like to know what is the reason of this curiosity.





What is functional programming and how can it help us in game developing?

28 March 2013 - 09:29 PM



I would like to know some opinions about this programming paradigm: It is useful? How much? Could have an important role or participation in game design and/or coding? It is complementary, opposite, or totally uncomparable to OOP?



What is the difference between "Entity" and "Sprite"?

03 February 2013 - 09:04 PM

Just that. Thanks.

Simplify reference system and vector movement

01 February 2013 - 05:55 PM



Well, I spend a whole afternoon trying to implement a simple navigation system using vectors. Finally it worked, here's a fragment of what I did (from a Spaceship class):


def moveForward(self):
    self.center -= self.step * Vector2D(1,0).rotate(self.angle).invX()
    self.rect.center = self.center.toPoint()

Basically, I use right and left arrow keys to rotate the spaceship to right or left direction, respectly. And, I have the previous fragmente code to move forward. Due the fact that (0,0) grows from left to right (x-coordinate) and from top to bottom, I have to invert the x-coordinate (invX() method) from the rotated vector in order to "correct" the spaceship navigation. Is there another way to make this simpler, for example, changing the origin or somewhat like that?


Thank you

Examples of well-designed 2D games (from source code view point)

22 January 2013 - 06:24 PM



I'm looking for 2D games (preferably small and open-source) in order to analyze and understand some aspects from game engine design such as event handling, entities models, 2D vector using, physics, etc. I don't care the language.