PaulJay Posted November 7, 2015 Share Posted November 7, 2015 (edited) I have started implementing a Viewer (Java application with graphical user interface), which is able to replay any sprite animation of this game. At the moment the application is able to open an xml and play/pause the animation. Also it is possible to change the animation speed (time factor). Furthermore each frame of an animation can be exported to a single image file. I will post the application here as far I get the GUI finished. The next step will be implementation of useful editing features. like editing sprites of particular frames. Also I plan to implement a layout editor to pack several sprite images of a single animation into a png file. There will also be some automatic layout strategies to reorganize the images in order to get them tightly packed. Edited November 7, 2015 by PaulJay Quote Link to comment Share on other sites More sharing options...
SoulFilcher Posted November 8, 2015 Share Posted November 8, 2015 That's great! I'll be waiting to give it a try. Quote Link to comment Share on other sites More sharing options...
PaulJay Posted November 8, 2015 Author Share Posted November 8, 2015 Hello people, currently it is possible to open a particular animation xml and work with it. I am thinking about making the app. able to set a root folder and displaying all the animations availabe in a hierarchical view. What do you think about it? Otherwise I could add this feature in the next step and keep the application as simple as possible for the moment. Quote Link to comment Share on other sites More sharing options...
aajs Posted November 8, 2015 Share Posted November 8, 2015 Hi PaulJay, This sounds Epic! Previously I was trying to add a whole load of shields to the existing animations, however overwriting the existing images led to issues in the fact that everything currently is packed so tightly. I don't know how possible it is, however if your tool could take an animation resize the source image so that the frame pictures were a lot further apart (more space around them) and update the xml file to the new frame size that would be amazing. Then we could add extra bulky items to the existing soldier sprites. Quote Link to comment Share on other sites More sharing options...
PaulJay Posted November 9, 2015 Author Share Posted November 9, 2015 (edited) I have a little question concerning the <img>-tag in the animation xml files: Do anyone know what the attributes regx and regy do affect? I've already figured out what the equally named attributes do in <frame>-tag, they determine some kind of a fixed point(pixel) for all the sprite images when positioning them relative to each other. This is currently not relevant for the viewer, but will certainly be when the app. will be extended to become an editor for editing or creating animations Edited November 9, 2015 by PaulJay Quote Link to comment Share on other sites More sharing options...
Max_Caine Posted November 10, 2015 Share Posted November 10, 2015 The regx and regy points are registration co-ordinates when placing the sprite on a tile on the map. Quote Link to comment Share on other sites More sharing options...
PaulJay Posted November 11, 2015 Author Share Posted November 11, 2015 (edited) The regx and regy points are registration co-ordinates when placing the sprite on a tile on the map. Thanks, Max . You called it by the right name. After I got the program to successfully run particular animation files my next Goal would be implementing of the following ideas concerning the workflow. It is not really handy to upack all necessary *.pfp archives and copy all animation data to some particular directory. This is why I would like to organize the workfow as follows: When we start the program we specify the working directory (same way we do it when working with "Eclipse"), the program can remember this. For a particular working directory we could then add all folders containing the animation data (incl. *.pfp archives) that should be considered in the working directory (not copying them!) The user can replay any animation he want by selecting one he is interested in. When the user wants to edit an existing animation the program creates a copy in the working directory. In this case the program splits a spritesheet into single images for each frame and stores them in the working directory. After the user has finished his work he can recalulate a new spritesheet and export the animation back to its original location. Creating entirely new animations or new animations based on existing ones could work similar way. Q1: Instead of unpacking the *.pfp archives I would like to make lookups for animation data. But to get this accomplished I need the specification of the *.pfp files. I am not sure if this format uses any compression. Q2:The other question is, is there any known program that can be used to combine several frame images into a sprite sheet. If not, I've found some useful ideas/algorithms, but implementing them will cost more time than reusing an existing tool from inside the program. Got the answer for Q1 concerning the specification of the PFP format last night, the archive begins with a 4 byte signature 'PFPK'. Immediately after that there is an int (4 byte) telling the number of files which are in the archive, followed by the file allocation table. Each entry of the table starts with a byte indicating the number of characters used to store the file's name, followed by the the name itself. The next two int values represent the address of the beginning of the file and the length of file in byte respectively. I am also pretty sure there is no encription or compression used by this archive file format. The code to make lookups for particular files is also accomplished by now . I suppose the most challenging part would be implementing the algorithms to solve the "rectangle packing problem" which is equivalent to sprite packing problem. Feel free to make further suggestions concerning interesting/useful functions The following screenshot shows the AnimationPlayer (sub program) in action. It would be a good idea to draw the tile area in order to highlight the position of the sprite on the map. Edited November 12, 2015 by PaulJay Quote Link to comment Share on other sites More sharing options...
PaulJay Posted November 13, 2015 Author Share Posted November 13, 2015 While watching the animation cycles I've noticed light source rotating with the soldier changing directions. This is probably a mistake made during rendering the sprites for different directions by rotating the light source together with the soldier's model. Actually the light source should stay stationary. Quote Link to comment Share on other sites More sharing options...
drages Posted November 13, 2015 Share Posted November 13, 2015 While watching the animation cycles I've noticed light source rotating with the soldier changing directions. This is probably a mistake made during rendering the sprites for different directions by rotating the light source together with the soldier's model. Actually the light source should stay stationary. When i try to recreate the game lightning at Poser for my mechs, i saw that too so i added some more lights but i never turned them. I think this is for cartoonish style rather then realistic one. Quote Link to comment Share on other sites More sharing options...
PaulJay Posted November 14, 2015 Author Share Posted November 14, 2015 I've got some questions concerning the following excerpt from an animation xml file: <timeline name="main" frametime="..." totaltime="..."> Now I am not sure what the 'frametime' really means. I first thought it specifies the duration of a single frame and totaltime the duration of the entire animation (however this is very rarely used). But after playing with it I got confused . Need some clarification from experts here. Are there some restrictions for possible values for 'frametime'. Also most animations go too fast when playing the game (e.g. machinegun animations). Sometimes the element 'timeline' is not specified - what (default) value for 'frametime' is used in this case. Quote Link to comment Share on other sites More sharing options...
drages Posted November 15, 2015 Share Posted November 15, 2015 There is 2 type of animation in the game. One stops one continues. So total time is for stopping one. If you don't put that code the animation stops after frames are done. Frame time should be frame by second. So the speed of the animation. But I could be wrong. Quote Link to comment Share on other sites More sharing options...
PaulJay Posted November 15, 2015 Author Share Posted November 15, 2015 (edited) You could be right, drages. Maybe I should do some more tests to find this out ... Edited November 16, 2015 by PaulJay Quote Link to comment Share on other sites More sharing options...
Policenaut Posted November 1, 2016 Share Posted November 1, 2016 @PaulJay So... will this ever be finished? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.