shine-o / shine.engine.emulator

GNU General Public License v2.0
0 stars 0 forks source link

Some questions / expanding README guide for new contributors #46

Open 0x6080 opened 2 years ago

0x6080 commented 2 years ago

Hello @SterlingAr! Love the project so far, and just had a few questions in regards to set up so I can start knocking down some of these issues and contributing:

If you could answer these questions, I'm sure a lot of it would be re-usable in the README for any other new contributers as well. Thanks!

SterlingAr commented 2 years ago

Hello @kenvogg , I'm glad you're liking the project so far

Where should we get the https://github.com/shine-o/files.git files or access to them? What is in them?

It's a private repository with server-side binary files containing game data, it is needed to start the zone service for example and get info about mobs, npcs and maps, some of the files are replicated in the public client.

Are you just using the Gamigo client from the official site? If not, is there a suggested location to get a client? From the videos it looks like you wrote a .bat file to do ./Fiesta.bin -osk_server 127.0.0.1 -p 9010. So having that with the current official client is all that is needed to set up the full end-to-end experience?

It is the official Gamigo client, however, I needed to lock the emulator to a specific client version, given that some of the changes in the official client were messing with my progress, there were some changes regarding authentication, and I figured I should stay with that version until I finish building the base features of the emulator. I have this client version reposited too, I will share this with you along with the server files.

What code generation tools are being used? Aside from GRPC for protobuf which is pretty clear, it seems like the contents of pkg/structs are generated somehow (based on comments).

I use go generate stringer to output a map with a string version of some constants, it was useful for debugging and logging.

What is your process like for using the packet sniffer?

I execute the packet sniffer using the config file in configs/ , then I start the game and connect to the official servers, if all goes well, meaning that you're listening on the correct interface and ports, you'll see a stream of data with all packets, almost all packets are identified and its structure know thanks to a leaked PDB file of the game client.

Are the current issues still relevant and the most important things todo next?

I would disregard these, it was an attempt to organize my development and it didn't work too well, I always did too many things in one issue, I need to look up alternatives like JIRA, with epics, features, tasks and bug tags.

What gaps would need to be filled to get from the current state (10/30/2021) to a "full" server emulator implementation that would have all the functionality of the official game?

My idea was to make a basic emulator that would cover:

My focus was on making these work really well, so I could easily hook up zone events with a scripting engine, which would allow for much flexibility when making the game play.

Once the basics are covered, I can focus on more complex mechanics, which I think would be easier to implement if I have a good foundation.

In retrospection, there are a few things that I do have in the backlog for this project in order to make it easier to develop and for other people to pick it up, for example:

Adopting the clean architecture, with a focus on Use Cases

I need to separate what is domain logic (basically the zone) from the other layers like DB, event senders and receivers or external services (like login, server select).

Another thing I really need to do and I wish I had done before, is make the interaction between these layers using interfaces, so I can easily test it.

image

Other things I had in mind:

On a ending note, I will have to revisit the README and update it so that you can set up the emulator in your machine, I will also share with you the other repositories.

As you may have noticed, I couldn't update this project lately, namely because I started a new job and that is my priority right now.

Once I get more free time I will revisit it, its a gargantuan task that If I knew what I was getting in, I wouldn't have started it, but the things I learned were worth it ... :P

If you have any other questions you can add me on discord, I'm more readily available there, my tag is: Greebo#5785

0x6080 commented 2 years ago

Thanks for the reply!

I definitely think some kind of full usage guide for connecting up a versioned client to the running emulator setup would be great. Some set client version with instructions on where/how to download it (or if it's not publically available, then added to this repo or organization?).

Also the relationship between the client SHN files <-> server SHN files is something that could use some clarity around. For example, the client has some ressystem/ItemInfo.shn but is this equivalent to the git submodule files/shn/ItemInfo.shn? If not, what differences might there be?

Congrats on new job! You being busier might be a good thing as it gives me and anyone else interested some time to get familiar with things. A small team could help with this gargantuan task 😃

I'll add you on Discord and we can figure out what the barriers are for machine setup.