Giter VIP home page Giter VIP logo

potcp's Introduction

Hi there ๐Ÿ‘‹

potcp's People

Contributors

divinity76 avatar znote avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

potcp's Issues

Read the first map packet to confirm that login is complete instead of sleeping for 100ms

sometimes you want the login to be really fast if logging in with multiple characters at the same time, hence the

            // if we don't sleep a little after logging in, nothing will work, talking, walking, etc won't respond for the first
            // few milliseconds or so. (???)
            usleep(100 * 1000);

part in Tibia_client_internal::login() should probably be optional (but on by default, because in MOST situations, it's a good thing) for example, that usleep makes the class unsuitable for making magebombs

  • that said, an even better solution than the usleep would be to read the first map packet to confirm that login is complete. then the login speed wouldn't be "100 milliseconds", it would be the speed of the server and your bandwidth (as it probably should be)

lacking a LICENSE

should really fix that, with an unclear license, people may avoid using it because the license is unclear, or avoid contributing because the license is unclear.

open-source OT projects have traditionally been licensed under the GNU GPL V2 (because the original OTServ project, as well as TheForgottenServer are both GPLv2), but i dislike that license myself.. for reasons.

my go-to license for people can do whatever they want with this code is The Unlicense: https://choosealicense.com/licenses/unlicense/ - it is basically like WTFPL without the swearing, and is so simple that even average humans (non-lawyers) can understand the license without issue:

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

(anyone with basic English can understand that license without issues, wouldn't you say?)

another license i like, if you want to force people to say thanks in their own program for using POTCP in their own programs, is the MIT license: https://choosealicense.com/licenses/mit/

  • and if you're going for the GPL, i urge you to go to the LGPL instead of the GPL, it is a less invasive version of GPL (if you use GPL then every project using POTCP must also be licensed under the GPL, but if you use LGPL then projects that are using other licenses than GPL can also use POTCP - for example, if you license this under GPL, you cannot use it in ZnoteAAC because ZnoteAAC is not licensed under the GPL itself.)

  • The Unlicense and MIT and LGPL are pretty much the only suggestions i've got. (and disclaimer: IANAL)

Read Map packets (tiles, items)

https://github.com/otland/forgottenserver/tree/master/data/items

Parse map packet.
So the server uses items.otb as some sort of dictionary to figure out what id to send to the client, and the client then, using that id figures out what to load from the dat file.
Which is why we call it a dat editor when someone wants to peek into client tile graphics.

For now, we should be able to parse map packets, identify first map packet as a signal that we are connected and can do stuff in-game. (Right now we sleep for 100ms and hope the server is ready to accept our packets).

Perhaps we can reverse lookup the id from the server with items.otb to retrieve the itemid from items.xml?

items.otb, every 2 lines seems to contain an item object of sorts?
image

If we could get this value back to an itemid it would be awesome, and we could already begin to play with a rudamentary UI for loading the screen using an image server such as this: http://items.znote.eu/

http://items.znote.eu/1003.gif
image

Without having to deal with the way the client renders spr/dat files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.