Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 18 Apr 2013
Offline Last Active Today, 01:22 AM

Posts I've Made

In Topic: Problem with Quaternion. Instantiate does not work properly

22 April 2015 - 09:19 AM

Okay, I'm tired and maybe I'm missing something.
However, it appears that you simply adopt the orientation of firePoint for the
newly instantiated game object. I assume firePoint is the tip of the gun and its a child
of the player game object.
So, I'd say you turn the player in direction of the mouse, the firePoint turns accordingly
and then you instantiate the bullet with the same orientation.

What you want to do is shoot the bullet in direction (mousePos - firePoint.pos).
If I recall the Unity API correctly, you could simply assign that direction
to transform.forward. Alternatively, there is a method Quaternion.LookRotation.

In Topic: Give me your Java and Python code

28 February 2015 - 07:29 AM

Hey guys,

great links, thanks! I find pygame.org especially useful, because it shows screenshot
of the games.

In Topic: Filling in the gap: What to do while waiting on the game to finish an action ?

06 February 2015 - 08:09 AM

They seem to create constant opportunities to carry out tasks by deliberately making the interface non-user-friendly in very specific ways!

That's interesting, I haven't thought about it this way before. I don't know much about SC2, but I've played WC3 a lot (lot).
In WC3, there are research queues.
Both games focus on micro-management of single units or small groups of units. That's a design decision that forces you to have little automation (including AI) of movement and casting, because that's how players compete. I like the idea, that most of what happens is caused by direct
player input.

I agree that the player has to carry out a lot of tasks, but I don't think they want to keep the player busy clicking.
The assignment of drones to minerals, for example, has been automated in SC2, simply because it's a boring task with no
consequence for the outcome of a match.

In Topic: When to use pointers or objects in 'Composition'?

02 February 2015 - 03:27 AM

I prefer method 2 for composition, although I sometimes use method 3 for the following reasons.

1. using pointers, you can forward declare class Graphics in the header to reduce dependencies, which in turn

reduces compile times when you modify class Graphics

2. using pointers, you can put all the initialize() work in the constructor and you don't have to worry about

your object being in invalid state. (in cases where you can't use initializer lists)

In Topic: Keep 3D Game Object 'Stationary' On Screen

11 January 2015 - 09:46 AM

It sounds like the weapon is rotated around it's center and then translated, so maybe the order of

transformations is a problem and you can try to change translate * rotate to rotate * translate.


In general, you want the weapon to have a fixed position in camera space.

Therefore the easiest way is to not transform the weapon at all.


If you transform all your objects by the same "world" matrix, however, you want to give the weapon

a local transformation that cancels this effect. that is the weapon matrix is the inverse of the world matrix.

Try using a standard Invert() method first and see if it gives the desired results.


After that you can try to replace the Invert() call with a product of translation and rotation matrices.