Coder Social home page Coder Social logo

aliwoto / ltw-client Goto Github PK

View Code? Open in Web Editor NEW
8.0 7.0 1.0 9.06 MB

Last Testament Of Wanderers (LTW) Game Client

License: GNU General Public License v2.0

C# 99.58% Shell 0.07% CSS 0.15% HTML 0.20%
ltw last-testament csharp game game-client online-game monogame monogame-framework

ltw-client's Introduction

Last Testament Of Wanderers

====================================

Welcome to the LTW source code!

Last Testament Of Wanderers, is a open-source MMORPG game. From this repository you can build LTW game, all of the Contents are included.

Supported Platforms

We support only Windows and Linux right now. If there is a platform we don't support, please make a request or come help us add it.

  • Linux

    • Ubuntu 20.04
    • Ubuntu 19.10
    • Ubuntu 19.04
  • Windows

    • Windows 7
    • Windows 8
    • Windows 8.1
    • Windows 10

Support and Contributions

If you think you have found a bug or have a feature request, feel free to use our issue tracker. Before opening a new issue, please search to see if your problem has already been reported or not. Try to be as detailed as possible in your issue reports.

If you need help using LTW or have other questions we suggest you to join our telegram community. Please do not use the GitHub issue tracker for personal support requests.

If you are interested in contributing fixes or features to LTW, please read our contributors guide first.

To get started using GitHub:

  • Create your own LTW fork by clicking the Fork button in the top right of this page.
  • Install a Git client on your computer.
  • Use the GitHub program to Sync the project's files to a folder on your computer.
  • Open up LTW.sln in your IDE.
  • Modify the source codes and test your changes.
  • Using the GitHub program, you can easily submit contributions back up to your fork.
  • Do not commit to master, for each feature create new branch.
  • When you're ready to send the changes to the LTW repo for review, simply create a Pull Request.

Advanced topics:

  • You can update your master branch by executing:
  • If your master is tainted and any branch you make contains junk, you can do hard reset. All unmerged commits on master branch will be lost.

Source Code

The full source code is available here from GitHub:

  • Clone the source: git clone https://github.com/ALiwoto/LTW.git
  • Open the solution LTW.sln or project file LTW/LTW.csproj

For the prerequisites for building from source, please look at the Requirements file.

License

The LTW project is under the GPL v2 License. See the LICENSE file for more details.
Third-party libraries used by LTW are under their own licenses. Please refer to those libraries for details on the license they use.

ltw-client's People

Contributors

adashinobenio avatar aliwoto avatar ammarfaizi2 avatar araragi10 avatar arthuriadx avatar artoria10 avatar debarchitodev avatar mayura75 avatar rokurobenio avatar saber14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

debarchitodev

ltw-client's Issues

InputElement necessary features

Some of the features which should be added to the InputElement:

  • LinerIndex (character indexing, so it supports left and right clicks)
  • Select text
  • Copying text
  • Support emojis (hard task)
  • Support multi-line
  • Support markdown (never mind this one, it's for far future)

Don't raise events in separated threads

Using Task.Run is not acceptable everywhere

	[EditorBrowsable(EditorBrowsableState.Never)]
	protected internal virtual void OnRightUp()
	{
		Task.Run((() =>
		{
			// raise the event in another thread.
			this.RightUp?.Invoke(this, null);
		}));
	}

So what's wrong with this code?

  1. You are creating a new thread, even if the action won't do anything.
  2. You are running every single event on a whole separated thread.

This will cause some problems in the future, such as hug memory leak.


So what to do?

I think something like this will be okay:

	[EditorBrowsable(EditorBrowsableState.Never)]
	protected internal virtual void OnRightUp()
	{
		this.RightUp?.Invoke(this, null);
		if (this.RightUpAsync != null)
		{
			Task.Run((() =>
			{
				// raise the event in another thread.
				this.RightUpAsync?.Invoke(this, null);
			}));
		}
	}

This way, we won't create new threads over and over.

Failed to create graphics device

I think it's better to prevent this error with a try...catch:

Unhandled exception. Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoGame.OpenGL.GL.GetString(StringName name)
   at MonoGame.OpenGL.GL.LoadExtensions()
   at MonoGame.OpenGL.GL.LoadEntryPoints()
   at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info)
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup()
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi)
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   --- End of inner exception stack trace ---
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice()
   at Microsoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.CreateDevice()
   at Microsoft.Xna.Framework.Game.DoInitialize()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at LTW.Program.Main() in /home/runner/work/LTW-client/LTW-client/LTW/Program.cs:line 44
/home/runner/work/_temp/b23d8555-d18e-4640-b831-7b70b0e74f92.sh: line 1:  2187 Aborted                 (core dumped) LTW/bin/Debug/net5.0/linux-x64/LTW
Error: Process completed with exit code 134.

Shortcut keys for InputElement

We need to create shortcut keys for InputElement

Like:

  • Ctrl + V : paste the text
  • Ctrl + C : copy the text
  • Ctrl + A : select all the text

StrongString operators bug

they won't check if left or right is null or not.
they will just call GetValue() directly, so it will result in a NullRefrenceException

public static StrongString operator +(StrongString left, StrongString right)
	{
		return left.GetValue() + right.GetValue();
	}

Mouse events bug when elements are not applied

see the code below:

	//test.Apply();
	//test.Show();
	testInput.Apply();
	testInput.Show();
	//events:
	this.InitializeMainEvents();
	//---------------------------------------------
	//addRanges:
	this.ElementManager.AddRange(
		this.FirstFlatElement,
		test,
		testInput);
	//---------------------------------------------

as you can see here, test (which is a sandbox in this case), is not applied nor is it visible.
but if I try to trigger one of mouse events on testInput element, it won't be triggered (like MouseEnter effect)
it won't, because we have add this to ElementManager and it won't check for testInput anymore.

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.