-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some How to run in IDE to README and load icons from data source #37
base: main
Are you sure you want to change the base?
Conversation
2f4c00c
to
732927d
Compare
A few questions/suggestions from looking at this so far:
So basically, the way that I have been usually running this project from source is like this:
To describe what these are, and why they are there, one easy thing to do would be search online how to get started with the LibGDX game engine and how to create a new LibGDX project with their gradle project generator app. If you create a new game project with the LibGDX project generator, using the same over-simplified formatting as above, your project would be formatted something like this:
The idea is that you can instantly open this project in most major Java IDEs, like Eclipse or IntelliJ, and have the LibGDX game project open and run without additional user effort for first-time users. At this stage in the design of Warsmash, however, I was faced with the problem that I wanted to re-use code that I already had from my Java Swing desktop 3D model editor for Warcraft III that would ask the user to locate a Warcraft III installation, and then provide me an API to access assets stored within that Warcraft III installation. This was code that I used over the last 10 years to have Java access to Warcraft III assets conveniently by their file path. So, as you have probably already guessed, this is why there is only a file
At this point, So, that is why we get to the next example, which has a second top-level directory at a different location on the computer that I shall simply represent as
After using the above structure for perhaps a year, I reached a point in time at which I wanted the Warsmash system to have some assets of its own that are Warcraft III simulator assets not LibGDX assets. In particular, this also means they are files that any individual W3X or W3M style of map could override, if the map was Warsmash-aware and contained an imported replacement whose file path matched the Warsmash asset file path. It was at this point in the evolution of the project when I added a
Normally on LibGDX, users were able to build and compile their project using the Gradle task named
Even for an inexperienced user, if you were to send the user the above described ZIP file and tell them to put the ZIP inside of their "Warcraft III: Frozen Throne" folder and then double click on the However, in my experience, end-users on Windows computers hate Java with a passion because of the Java Updater from the 2000s. For the end users, the word "Java" refers to an orange coffee icon that cost them productivity years ago. It makes them upset, and if we ask them to install it, then they will become upset and be turned away. The layout is basically as follows:
As such, this is a folder that can be added into a Warcraft III: Frozen Throne Patch 1.29 installation directory, and then the non-technical user can double-click on In order to make my life easy when using It was about this time that I wanted to change the icon of the running application, and then I ran into the problem that the LibGDX bindings for LWJGL2 (for OpenGL basically) do not allow the user to specify a program variable containing image data as the icon of the application. They only allow a file path, which is then resolved by the LibGDX asset resolving code and not by the Warsmash asset resolving code. So if you remember our example from before, this is why I then introduced the intentionally-redundant name
One of these folders -- the folder located at The other of these folders -- the one located at The reason that these two folders were chosen to have the same name is that when I bundle and release a build of Warsmash, which now is simply achieved by However, until that time, the two types of assets remain split in a very obvious way that is true to form for LibGDX. I would not by any stretch declare that this is the best system that could be conceived, but it is the system that I have now. And I think that if you are going to write the de-facto guide to help new users to run the system, you should know what I have described to this point in order to apply this knowledge to simplify what new users have to deal with. Edit:
As far as I know, it should not be more complicated than these 5 steps, except for hardware that does not support OpenGL 4+ spec. |
Okay sry that is far too much information for a simple request like this. You can also use your 5 steps if you like to. The ini file should have listed possible examples but yes it makes no sense this way. A link to the folder with example warsmash.ini files should be enough. Btw. it is a bit annoying to change the counter and the numbers 00, 01, 02, 03 etc. About the icons: IntelliJ somehow does not load the resources automatically when running a main method it would be helpful to make this work somehow. |
I did not mean to imply that all of my mad ramblings should be in the example readme. But I was hoping that by noting them here for us to know as developers, it might provide you even more information to make an even better readme for starter users. Does that interest you? |
I would simply add the most simple way to make it work in an IDE, so a starter can load his/her map with breakpoints in an IDE. For my pull request I would have changed it to an Reforged only ini and noted that there are other example ini files for Frozen Throne etc. I think the current text "How to Build" does not really help to debug a map in Warsmash. Also simply running ./gradlew runGame and loading your map won't help you debugging it with break points. Maybe I could rename it to "Debug Map with Warsmash" instead. My goal is to run a map in the IDE with Warsmash to use the IDE's features. |
732927d
to
f602100
Compare
|
Looking again at the current state of this pull request, the DesktopLauncher changes seem fairly good in general but your updated README includes information about how to run Warsmash with Reforged, which is no longer supported because Reforged updated to a new game data format that isn't supported on Warsmash. For what it's worth, their new format isn't perfectly supported on Reforged itself, either. It is not a priority for me to update Warsmash to support the new Reforged format, and no one to my knowledge has even opened a GitHub issue asking about the problem. So, with that in mind, Warsmash is probably targeted to Frozen Throne/Warcraft 3 fans instead, who would most likely have some game install that uses the 2003 MDX model format to store 3d files. Because even the "classic" assets on Reforged are in their new format, it's not convenient and doesn't feel like a good use of time for Warsmash to keep updating to retain parity with that. In addition to recommending a non-Reforged, non-CASC configuration in the basic README, I would also suggest not advising users to change or manipulate the current working directory of the game when launching it. In general, doing that is likely to waste more of their time than it would save. I think it is better to tell users to always use the What is your opinion on the changes that I made to the README a month or so ago? Are they a step in the direction you would have wanted, even though they are different than what you suggested? Would you be interested in creating a version of this pull request that includes the changes to DesktopLauncher but maybe uses different wording in the README that doesn't encourage Reforged -- unless your pull request also fixes the Warsmash data parsers to support the new Reforged format for this year? |
I think it is fine in now but you could add the screenshot by linsmod to the "From IntelliJ IDE" section. I think it might be the easiest way to start your map and debug it which is probably what most users want. |
Due to the discussion in #15 I decided to add a section to the README which helped me and to load the icons from a data source since the resources were not found.
Besides, it checks for the [Emulator] now and stops if it does not exist and prints the working directory to avoid confusion.
I do not know how to use -load for a file which is inside one of the MPQ archives like Maps/scenario/(4)warchasers.w3n. Does this work? If this works, some example would also be useful.