Popular Post curiosity Posted February 16, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Popular Post Share Posted February 16, 2016 Hi all, Sometime last year I started working on a Ragnarok client. (Again...) It's very close in behavior to the original client, using DirectX and the original 3rd party libraries (granny2.dll, mss32.dll etc). It doesn't have a name yet, but I like to think of it as my "SakExe", since that's what it's based on. At this point it can be used for basic gameplay, though much of the user interface is still missing, as well as a lot of the effects. Recently I've made a few changes, making an alternative rendering implementation using OpenGL. After a little work I was able to compile my client for Linux and finally Android. I'll use this topic as a showcase/work log. Feel free to ask any questions. And now for some pictures... DirectX mode on Windows 8. Some features like the Granny3D actors are only supported on Windows. It's working great on Android, although some additional tweaks are needed to make it more accessible. What I've done so far is to scale the UI to make it easier to hit buttons, and adding touch gestures for things like camera rotation. This is with OpenGL ES rendering on my x86 Android phone (1920x1080). It also runs on 32 bit ARM. I've been testing it on both my newest phone and my old Samsung Galaxy Note II, the latter of which is a little over 3 years old at this point. Originally I got like 0.5~2 FPS on my phones with my naive GL renderer, but after some work the performance it pretty solid on both of my phones. 16 Quote Link to comment Share on other sites More sharing options...
Neffletics Posted February 16, 2016 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 149 Reputation: 24 Joined: 02/11/16 Last Seen: May 16, 2023 Share Posted February 16, 2016 Woah! Awesome! I'll keep on checking this thread for updates. Quote Link to comment Share on other sites More sharing options...
vBrenth Posted February 16, 2016 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 311 Reputation: 46 Joined: 11/06/11 Last Seen: 45 minutes ago Share Posted February 16, 2016 Sounds interesting hope this project will stay active Quote Link to comment Share on other sites More sharing options...
Tragedy Posted February 16, 2016 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 37 Reputation: 11 Joined: 11/10/11 Last Seen: March 26, 2021 Share Posted February 16, 2016 (edited) Amazing Edited February 16, 2016 by Tragedy Quote Link to comment Share on other sites More sharing options...
Nova Posted February 16, 2016 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Share Posted February 16, 2016 Had been waiting to see a peek of this. Looks great Curiosity. Quote Link to comment Share on other sites More sharing options...
Ninja Posted February 17, 2016 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted February 17, 2016 Awesome job! Will be looking forward to this. Quote Link to comment Share on other sites More sharing options...
Kanner Posted February 26, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 12 Reputation: 0 Joined: 10/30/13 Last Seen: August 21, 2016 Share Posted February 26, 2016 (edited) Amazing! it's possible to reach the 2048x2048 resolution limit of original clients? Edited February 26, 2016 by Kanner Quote Link to comment Share on other sites More sharing options...
Moriarty Posted February 26, 2016 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 135 Reputation: 13 Joined: 06/20/12 Last Seen: April 14, 2018 Share Posted February 26, 2016 Why not open source? Quote Link to comment Share on other sites More sharing options...
curiosity Posted February 27, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Author Share Posted February 27, 2016 Amazing! it's possible to reach the 2048x2048 resolution limit of original clients? Resolution is no problem with OpenGL rendering. Why not open source? Haven't decided yet. It's still not finished. Quote Link to comment Share on other sites More sharing options...
Ninja Posted February 27, 2016 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted February 27, 2016 Why not open source?Haven't decided yet. It's still not finished. I think development will be faster if you have inputs from different people especially on bug hunting and fixes. Quote Link to comment Share on other sites More sharing options...
curiosity Posted March 1, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Author Share Posted March 1, 2016 Improvements continue. Most notably I finally added NPC shops. I had completely forgotten there was a little window above the purchase window. Has that actually ever worked on any client? It's supposed to show how much your stats will be raised by buying a piece of equipment (by pulling attack and defense from itemparamtable.txt), but it seems completely broken. 5 Quote Link to comment Share on other sites More sharing options...
Spilph Posted March 1, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 17 Reputation: 6 Joined: 01/30/13 Last Seen: April 22, 2018 Share Posted March 1, 2016 I'm an iPhone guy, but after reading this topic, I've been thinking about getting an Android... Quote Link to comment Share on other sites More sharing options...
Nova Posted March 2, 2016 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Share Posted March 2, 2016 I don't remember that ever working actually. Quote Link to comment Share on other sites More sharing options...
curiosity Posted March 2, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Author Share Posted March 2, 2016 I'm an iPhone guy, but after reading this topic, I've been thinking about getting an Android... I'd love to port it to iOS as well, but I don't have a recent device. I think iPhone 5 and anything later would run it pretty well. Maybe I can pick one up for cheap sometime in the future. Quote Link to comment Share on other sites More sharing options...
Spilph Posted March 3, 2016 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 17 Reputation: 6 Joined: 01/30/13 Last Seen: April 22, 2018 Share Posted March 3, 2016 I can't wait until that happen, I wish you have a smooth development process and continue to improve Quote Link to comment Share on other sites More sharing options...
curiosity Posted March 3, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Author Share Posted March 3, 2016 A brief look at RagExe Game Framework Class (GFC) is Gravity's own name for the game engine or application architecture used in Ragnarok Online. With the Ragnarok beta release in 2001, Gravity announced the finalization of GFC 2.0. But what exactly is GFC, and where did it come from? Most game developers use commercial proprietary engines for their games, while GFC is an in-house product by Gravity's RND-1 development division. In truth, it's misleading to call it a game engine, as GFC in its current form has been used in exactly one game and is tightly coupled to it. In all likelyhood the name GFC and the notion of a game engine are just buzzwords Gravity used in an attempt at impressing investors in their early days. However, my client is strictly based on Gravity's RagExe implementation, and I guess it can therefore be said to be a clone of GFC. Here's a brief look at its history. Gravity Corp. was a relatively small developer before Ragnarok Online became an international success. Certainly no one outside of South Korea knew of them. In fact, right up until Ragnarok become ready for alpha testing they were still just Team Gravity. In 1999 they partnered up with Sonnori Entertainment in a joint venture to develop an action RPG. Arcturus: The Curse and Loss of Divinity was released with success in 2000. At this point Gravity obtained the rights to publish a game based on the popular Korean comic Ragnarök. They decided to reuse source code from Arcturus. While Arcturus and Ragnarok don't have much in common in terms of game play, resemblances can be noticed in aspects such as artistic style and music. Making Arcturus into the Ragnarok we know today required a severe overhaul of the code base. However, in many architectural decisions were left intact. What was retained became the base of GFC. Ragnarok, like Arcturus, is a 2.5D game. While Gravity at one point experimented with 3D actors in Ragnarok, the main focus has always been on sprite-based characters in a 3D world. Most of the file formats from Arcturus could therefore be reused directly in Ragnarok. This is one of the reasons why some of Gravity's file formats have strange features. For instance the world resource format (RSW) contains strings pointing to scripts files, a feature not used in Ragnarok. Some formats, like RSX (think RSM for actors) were retained and is still in the code base, but never used. A few formats from Arcturus you may know include: SPR - indexed color bitmap format ACT - actor animation RSM - hierarchical 3D models with basic animation support GND - tile based ground mesh GAT - tile based property map RSW - map format (defines a scene with objects) They also made new formats, like the worthless IMF format that no one understand what is supposed to do... (Just kidding, IMF is used when combining ACT files for player characters, but it turns out it wasn't really necessary or useful. The client uses IMF offsets when drawing the player on the character select, which is probably why headgear sometimes looks a little wonky there. It also uses it for drawing order for player character sprites in-game.) While based on DirectX 7.0, from a modern perspective GFC can be said to be software rendered. If you've ever wondered why Ragnarok uses so much CPU, that is why! Direct3D is only used as a glorified triangle rasterizer with blending and depth buffering. GFC has a fairly large entity-based actor system where every actor is responsible for rendering themselves every frame. There are a few principal object types: ground (GND), models (e.g. RSM) and game objects (actors, effects, etc). Rendering done by registering a render pass from with the renderer - basically a list of screen projected vertices and a texture. The renderer sorts the render passes by depth, opacity and other attributes, and draws everything at the end of each game cycle. This all makes for a pretty horrible design. Easy to work with, but unnecessarily taxing on the system. The only reason it worked in the first place is the low amount of polygons on the screen. (Typically below 10,000 triangles at any time.) Game objects communicate by passing messages around to each other. In Ragnarok, there is also a global state (the session) and the current game mode, which is responsible for tasks like processing input, creating actors, handling network messages and signalling actors. The diagram above shows part of the base object hierarchy in Arcturus, which is pretty tall and convoluted. In Arcturus, each enemy needed its own class specialization. In comparison the diagram below shows the object hierarchy at the time of the Ragnarok alpha release. While simplified, the principal structure is the same. I have colored a few classes that provide similar functionality in the two games. CRenderObject is any type of object that is draw on the screen, while CGameActor is any object that can be interacted with. CPc is the object type for characters controlled by a player. CNpc covers static NPCs and monsters. In Arcturus you could interact with certain 3D models (e.g. doors, chests), so C3dActor was a part of the game object hierarchy. In Ragnarok, all 3D models are just decoration and not part of the game play and aren't considered game objects. (The exceptions to the rule are Granny actors and traps, the latter of which are actually RSM models drawn by a Skill object.) From the Ragnarok alpha to commercial release the renderer was improved a bit, and the 2D actor system become more flexible. A few libraries from RAD Game Tools was integrated to provide sound, video playback and a more practical 3D format (namely GR2, thought it's only been used for a few models). Aside from that, not much has changed. 12 1 Quote Link to comment Share on other sites More sharing options...
Nova Posted March 3, 2016 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Share Posted March 3, 2016 Really cool stuff! Had never heard of Arcturus before. Quote Link to comment Share on other sites More sharing options...
curiosity Posted March 11, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Author Share Posted March 11, 2016 Want to try Ragnarok for Android? There are a few bugs, and still some graphical issues with the OpenGL ES rendering, but it's possible to play already. Here's what you need to do: Have a somewhat recent Android phone or tablet. Supported architectures are armeabi-v7a and x86. Download the APK and install it on your device. You will need some game assets. If you have an old GRF around, maybe that will work. The client will look for data.grf and data2.grf. Both need to be present or it will crash on start. You can download this data pack that I'm currently using. Rename the BGM folder to lowercase. (I forgot to do this before uploading...) My client is based on the old Sakray clients and uses an outdated version of the client protocol. I'm not sure if rAthena can work with this packet version anymore. While I plan to add support for more recent emulators at some point, at present I suggest you should use this old version of eAthena for testing. After modifying clientinfo.xml to point to your login server, copy the data to your Android device. The client will request files from the "external" app data folder. Note that on most Android systems this seems to be the internal memory, though it can probably vary. On the devices I've tested, the path you should copy to is /sdcard/Android/data/com.ragnarok.ragexe/files. Just put the GRFs, music and data folder under there. At this point you should be able to play. The app doesn't shut down cleanly at present, so unfortunately you will have to force quit it from the app list if it crashes or you exit the app. 5 Quote Link to comment Share on other sites More sharing options...
Conflicts Posted March 11, 2016 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 317 Reputation: 63 Joined: 11/13/11 Last Seen: March 23 Share Posted March 11, 2016 Seems like I've missed this one, I'll be following it from now though. Great work curiosity! Quote Link to comment Share on other sites More sharing options...
Nova Posted March 11, 2016 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 265 Reputation: 96 Joined: 09/30/14 Last Seen: May 15, 2024 Share Posted March 11, 2016 I'm so gonna try to run this android thing. Quote Link to comment Share on other sites More sharing options...
Secrets Posted March 12, 2016 Group: Developer Topic Count: 36 Topics Per Day: 0.01 Content Count: 588 Reputation: 437 Joined: 01/26/16 Last Seen: Wednesday at 03:00 PM Share Posted March 12, 2016 Do you have any plan to publish the client's source code? I don't want to see another masterpiece of work left abandoned again. (Shinryo's client) Quote Link to comment Share on other sites More sharing options...
Neo-Mind Posted March 12, 2016 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 806 Reputation: 221 Joined: 03/13/12 Last Seen: September 17, 2024 Share Posted March 12, 2016 Wonder why I never saw this topic till now. Didn't know you put up a topic about it Curiosity . *Follow Mode ON* Quote Link to comment Share on other sites More sharing options...
ViteFalcon Posted March 14, 2016 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 7 Reputation: 1 Joined: 03/19/12 Last Seen: December 18, 2022 Share Posted March 14, 2016 A brief look at RagExe Too much good information to be hidden away in a form post. I took the liberty to copy this over the wiki: A brief look at RagExe. Thanks, curiosity! 1 Quote Link to comment Share on other sites More sharing options...
Mystery Posted March 15, 2016 Group: Members Topic Count: 94 Topics Per Day: 0.02 Content Count: 2192 Reputation: 253 Joined: 11/11/11 Last Seen: June 24, 2020 Share Posted March 15, 2016 That looks amazing. Good work so far! Quote Link to comment Share on other sites More sharing options...
curiosity Posted March 15, 2016 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 133 Reputation: 189 Joined: 05/20/12 Last Seen: November 7, 2016 Author Share Posted March 15, 2016 Not that much to report, but I do a little work every now and then. I implemented some more UI like storage and added some more skill effects. I have played "single player" from Novice to second job a couple of times now without encountering any missing features or major bugs. I can usually implement skill effects for a class in pretty short order. Since last time I've finished a lot of skills for blacksmith and hunter. Do you have any plan to publish the client's source code? I don't want to see another masterpiece of work left abandoned again. (Shinryo's client) No plans at the moment, maybe in the future. A brief look at RagExe Too much good information to be hidden away in a form post. I took the liberty to copy this over the wiki: A brief look at RagExe. Thanks, curiosity! Probably not too many people are interested in reading about things like that. Glad you liked it 3 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.