Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ACagliano

Pages: 1 ... 15 16 [17] 18 19 ... 62
241
ASM / Re: 24 bit multiplication
« on: December 08, 2011, 11:12:03 am »
Yes. Basically, here's what I'm trying to do:

1. (x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2  --> Ans , where all x,y,and z coords are 3 bytes large
2. √Ans

242
ASM / Re: 24 bit multiplication
« on: December 08, 2011, 10:38:11 am »
Ok, this is a bit of a stretch, but how about square-rooting a 24-bit number. Because I need to do the distance formula with a three-byte inputs for x1, x2, y1, y2, z1, and z2.

243
ASM / Re: 24 bit multiplication
« on: December 08, 2011, 10:11:48 am »
And, I'm assuming the result is in bc?

244
ASM / Re: Interaction with a 3D Space
« on: December 07, 2011, 07:17:37 pm »
The eastest way for the viewscreen is just render as fullscreen, then overlay with the HUD. It's not the most efficient way to do it, but for only a few ships, it should work.

Ok, easy enough.

For the distance, you can use the Pythagorean theorem. Use the sector as the upper byte and the coordinates as the lower bytes, then do this in 24-bit math: √((X2-X1)²+(Y2-Y1)²+(Z2-Z1)²).

*Stares at computer blankly.

245
ASM / Re: Interaction with a 3D Space
« on: December 06, 2011, 05:09:50 pm »
Ok. You should know, that the whole screen will not have a viewscreen. It will only be about 2/3 the height of the screen and 2/3 of the length of the screen. How does that affect the routine?


Oh, and how do I handle calculating distance between you and ships, taking into account sectors as well?

246
ASM / Re: Interaction with a 3D Space
« on: December 06, 2011, 02:05:32 pm »
Shit, that was way over my head. Let me break this down to see if I understand.

1. The 3D engine uses 8.8 fixed point numbers. What impact does that have on my two-byte position variables?

2. I understand about speed. How do I make Speed variable?

3. Do I need to look for a ship, then call the 3D engine each time I find one? Or does one of those routines handle that?

After I get a handle on those concepts, I think I should be good.

247
ASM / Re: Interaction with a 3D Space
« on: December 06, 2011, 12:42:56 pm »
Oh, question....In the code above, when you say "SubFP", do you mean "call SubFP"

248
ASM / Re: Interaction with a 3D Space
« on: December 05, 2011, 05:17:41 pm »
Ok, question. The format I use has x, y,and z sector (1-byte for each) and an x, y, and z position within that sector (2-bytes each). Can these routines handle two-byte locations?

The two byte locations are they for 8.8, or for a full 2-byte position? Because I intended to have a full 0-65536 position range. Is it possible to do 16.16 or 16.8? lol


For ease of use, should I have the x, y, and z coordinates as 8.8 fixed point already?

As for speed...Well, I have a speed variable. (Speed). 0 = stopped, 1 = 1/4 impulse, 2 = 1/2 impulse, 3 = 3/4 imulse, 4 = full impulse, 5 = warp speed (100 x full impulse)

I also have variables preassigned. (PositionX), (PositionY), (PositionZ). Will simply replacing your (x), (y), and (z) with those break anything?

Can the memory areas from (temp) down be overwritten? Or should I use a memory area that I don't use?

249
ASM / Re: Interaction with a 3D Space
« on: December 05, 2011, 03:42:45 pm »
Bump^^

I plan on remolding the menu GUI's a bit, just for the record.

250
ASM / Re: Interaction with a 3D Space
« on: December 03, 2011, 08:47:47 pm »
You have it exactly right. I want to be able to rotate the ship and fly in the direction it's facing. I have three axises, x,y,and z. I have no idea how to do this in z80 :(

As for the looking in different directions, you are referring to the "view-screen" correct? If so, then yes. I can use a pretty standard space image when there are no ships in front of you...but the issue is looking ahead of you for a ship, then rendering it. Perhaps a perspective projection algorithm is what I need. But, since I have never done this before, i would have no idea how to mold it for my purposes.

251
ASM / Re: Interaction with a 3D Space
« on: December 02, 2011, 06:48:48 pm »
Thus, all I need in order to judge visibility is location. Angle data can be ship-specific. Now, I understand that this system may need to be adjusted, but it should work well without having each ship broadcast its angles as well.
Wait so there is additional data for each ship than what you posted before?

There is alot of data that about ships that do not get broadcast. There is the offline/online status of your systems, health and max health of each system, shield health, weapons armed flag, shields raised flag, current traveling direction and speed of your ship, ect. However, all that gets broadcast to other calcs is your ID (so that a PTP can be sent), the username (so that you see a name, not 5 numbers), and the location (position and sector).

252
ASM / Re: Interaction with a 3D Space
« on: December 02, 2011, 05:27:39 pm »
I will be judging if a ship can see another as follows:

on the active axis (one that the ship is moving on), you can up to 100 units ahead of you and 50 units to the left and right, up and down. If a ship is behind you on the active axis, you don't see it. Similarly, if it is outside the 100 ahead x 100 up/down x 100 left/right, you cannot see it.

Thus, all I need in order to judge visibility is location. Angle data can be ship-specific. Now, I understand that this system may need to be adjusted, but it should work well without having each ship broadcast its angles as well.

253
ASM / Re: Interaction with a 3D Space
« on: December 02, 2011, 04:17:03 pm »
Hmm could you explain how you are storing the coordinates of the ships right now?  Do you also plan to take into account what direction the ships are facing?  Do you want to include non-orthogonal angles?

Right now, the positions of a maximum of 30 ships are in the following format:

5 byte calc ID
8 byte username
6 byte ship location (xx, yy, zz)
3 byte ship sector (x, y, z)

I doubt that would need to change.
No, I only show one generic image if a ship is located in the viewscreen.
What is a non-orthogonal angle?

254
ASM / Interaction with a 3D Space
« on: December 02, 2011, 03:15:47 pm »
I'm looking for someone with experience in programming interaction with a 3D space for my Star Trek game. At present, I only support 6 directions of movement: up, down, left, right, forward, and backwards. This is not truly 3D. I was thinking of using a pair of vectors...an x,y vector and a z vector, but I do not know how to code this. I will need someone to code this up for me.

In addition, if I go with the above, I will need to redo the routine in which we look to see if a ship is in your viewscreen. I'll need that coded, or at least assistance with that, as well.

255
TI Z80 / Re: Star Trek reloaded (bad pun on the 'ld' command)
« on: November 29, 2011, 10:19:04 am »
Star Trek is just a ripped off version of Starwars? :D
JK I know that they are "completely" different ;)

:p  Kirk, the force is non-existent with you.

Pages: 1 ... 15 16 [17] 18 19 ... 62