• Create Account

# nkint

Member Since 11 Apr 2010
Offline Last Active Jul 15 2012 07:03 AM

### In Topic: Extend curve to tube surface (part 3)

27 June 2012 - 07:17 AM

i had vound a bug in the code, i was missing an if statement! thanks anyway!!

### In Topic: yet another stupid post on RAY PICKING

22 December 2010 - 11:16 PM

ok i got it it was stupid : )
picking ray needs to be horizzontal to clipping cube

### In Topic: yet another stupid post on RAY PICKING

22 December 2010 - 08:27 AM

ok if i put mouse coordinate z (3° input in gluUnproject) as 0.8 instead of 1
everything is ok.

why? ho can i calculate the exactly z value with other canvas dimension or different projections matrix?

### In Topic: what about programming?

09 September 2010 - 04:30 AM

Quote:
 Try to use correct grammar and punctuation in your posts.

: ) thanks for advice, i'm learning english! forums is additional helps

Quote:
 Remember, programming is communication.

+1

Quote:
 But game code gets used once, has a single high-cost intensive debugging phase (alpha & beta cycle), and then is largely discarded; TDD does not make sense for it.

yeah, but i think TDD is only a design practice, functional tests is only a side-effects, and not totally fill test phase in software lifecycle

### In Topic: how to set dimensions of game grid ? AS3 CS3

05 September 2010 - 10:48 PM

i don't think that mat and physics is the best section in which write about grid issues.. mayebe isometric land is better
(and also i don't think this is the best forum for actionscript language..)

Quote:
 so, how can i programaticaly find the point of (row x column)

the data structure at the base of a grid is a bidimensional array,
so you can use a nested for loops to get some points:
`for(x=0;x<10;x++) {    for(y=0;y<10;y++) {        // do something with point x-y}}`

this will iterate trought a 10x10 grid.

Quote:
 how can i draw this Grid programaticaly to locate x and y

in Actionscript tou can use a Sprite object to draw,
now i don't remember exact syntax but you can fin it here:

Quote:
 how can i find X and Y using ActionScript 3.0 Functions?

you have a virtual coordinate system that is your grid.
for example you know that there is an actor at coordinate 3-5 (row 3, column 5)
in the screen space the real X is 3*pixel_of_each_gridbox
the sprte is large 100 pixel, you've got a grid of 10x10 formed by 10pixel box.
the real position of actor in sprite coordinates is 30x50

Quote:
 how can i calculate the distance between x and y ?

i think using pitagora formaul is the best way

i leave you some links, mayebe could be useful

http://www.as3blog.org/?p=50