Sign up Calendar Latest Topics
 
 
 


Note: This topic is locked. No new replies will be accepted.


Reply
  Author   Comment   Page 2 of 3      Prev   1   2   3   Next
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #16 
Life got kind of busy for me and I haven't had as much time to spend on IAN recently. But I did make some progress on the task of speeding up rendering of top-down silhouettes.

The game models contain a lot of polygons, and for rendering continuously-updating silhouettes, it's too expensive to redraw them all the time. What would be better is to draw the silhouette once, then save that 2D render and simply rotate and scale it as needed.

I've created a new Silhouette class that stores a single 2D render of a ship in a particular color. I've also created a factory class that can create new Silhouettes on demand and cache them. So the first time you ask for a particular Silhouette, it will generate a new one, but the next time you request the same ship and color, you'll just get the same Silhouette object back instead of making a new one.

Actually rendering the scaled and rotated Silhouettes onto a graphics context has required me to get familiar with the AffineTransform class. It's a learning process and I'm having some trouble with getting the rotations to work correctly. I need the image to be rotated about its center, but for some reason it's rotating around a different point, causing ships to sweep around the sector in large arcs as their heading changes. This upcoming week I should have some more time to work on this.
JordanLongstaff

Registered:
Posts: 68
Reply with quote  #17 
While I appreciate the work you're putting into this, my app doesn't need all the silhouettes and 3D grids; it just needs a couple of values added for the new types of ships. Is there info on these values somewhere, e.g. the protocol docs?
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #18 
Can you be more specific about what you're looking for? IAN will extract whatever data is present in the vesselData.xml file for you to access programmatically. Is there some piece of information you need that isn't covered by that?
ryleyra

Registered:
Posts: 2,846
Reply with quote  #19 
Quote:
Originally Posted by Arkantos

Actually rendering the scaled and rotated Silhouettes onto a graphics context has required me to get familiar with the AffineTransform class. It's a learning process and I'm having some trouble with getting the rotations to work correctly. I need the image to be rotated about its center, but for some reason it's rotating around a different point, causing ships to sweep around the sector in large arcs as their heading changes. This upcoming week I should have some more time to work on this.


AffineTransform is pretty complicated. I've done some experimentation myself, but I found it easier to just use sin and cos calculations. If you need a ear to bounce ideas off of, though, shoot me a PM, I'll listen.

Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #20 
Quote:
Originally Posted by ryleyra
AffineTransform is pretty complicated. I've done some experimentation myself, but I found it easier to just use sin and cos calculations. If you need a ear to bounce ideas off of, though, shoot me a PM, I'll listen.

Unfortunately that doesn't work for me because I'm rotating a BufferedImage. It's okay; I'll get it figured out.
JordanLongstaff

Registered:
Posts: 68
Reply with quote  #21 
The problem I've specifically run into is in the ObjectType class. The fromID method throws an IllegalArgumentException because there's no object type with ID 68. My guess is that's supposed to be for a fighter.
JordanLongstaff

Registered:
Posts: 68
Reply with quote  #22 
And there's no object listed in vesselData with ID 68.
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #23 
Yeah, ArtClientLib doesn't work with the latest version of Artemis. The changes I've made with IAN resolve the issue you're encountering.
JordanLongstaff

Registered:
Posts: 68
Reply with quote  #24 
That's my question. What specifically have you done that fixes this? The 3D rendered wireframes you're adding certainly don't. They're cool and all, but I personally have no need for them.

My guess is you've added in the new ID values that I'm missing. I've managed to add in only what's mentioned in the protocol docs which have been updated for 2.3, but I'm still having this problem.
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #25 
That's not the new ID. The problem is that new properties added to the objects transmitted in the packets were messing up the byte offsets when reading the packets. So the 68 you're reading isn't a vessel ID, it's something else. The protocol documentation has been updated for much of this.
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #26 
Real life has slowed me down recently, but I'm planning on getting the last fighter packet changes in soon to finish off compatibility with Artemis 2.3. Once that's in place, I intend to push IAN 1.0 to GitHub so that you guys can start playing around with it. Then it's on to the work for Artemis 2.4 compatibility.
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #27 
I've sorted out the graphical issues and gotten the last packet changes in. I'm in the test/fix cycle now.
hackmancoltaire

Registered:
Posts: 2
Reply with quote  #28 
I'm really looking forward to this release. I've built a TOS style Captain's chair that integrates with Artemis using ArtClientLib. But I need 2.3 compatibility.
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,837
Reply with quote  #29 
Note - IAN is related to modifying Artemis, so the thread is being moved to the Off Topic section.
__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
Arkantos

Avatar / Picture

Registered:
Posts: 419
Reply with quote  #30 
The GitHub repository for IAN is up.

I think I did everything right! I need to port some of the documentation over from the old ArtClientLib repository, but I should be making a release before long.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.