Giter Club home page Giter Club logo

westiny's People

Contributors

domonkossuranyi avatar rbdevil avatar susu avatar titapo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

westiny's Issues

Bullet prediction

TODO description here

  • srv sends ShotEvent (position, velocity vector, time/distance limit)
  • Remove NetworkId from bullet

No scope: client "Player shooter system"

Weapon pellet

Current:
The weapons can shoot only one piece of bullet per shot. (!! Not talking about per trigger ("per click"))
to clarify: A shoutgun's shot parameter would be Shot::Single, because a shotgun shots once per trigger-pull. But it releases multiple pellets which would be represented as bullets in the game yet.

Task:
When the weapon: Weapon shots N bullet entities should be created where N is the number defined in weapon.details.pellet field.

Player respawns after died

Respawn should happen on a random new position.
Instant respawn is OK for now, some timeout should be considered later.

Receive and apply entity transform updates from server

  1. Create a network receiver system on client
  2. Create a transform update event
  3. network receiver system writes the event on this channel
  4. an entity updater system updates the entity's transform

(later the system should be extended to be able to create the entities that not exists)

Black window on startup of client

OS: 5.13.11-1-MANJARO
rust version used to build: 1.47.0
Device data: AMD Ryzen 3 2200G with Radeon Vega Graphics | Memory Size: 6 GB + 512 MB (total is 8gb but radeon card uses the rest of memory)
The terminal output keeps printing [INFO][westiny_client::systems::client_connect] Network event: Disconnect(1.2.3.4:5745) but nothing happens.

Add Damage System

When a projectile which have Damage component collides with an entity with a health component, this should be drained.

Register clients on server

  • Server should accept multiple connection from clients
  • Server should store client addresses in order to send them messages

Bullet spread

Current:
The bullets direction is perfectly accurate to the aiming point.
The weapons have a parameter which tells their accuracy (spread).

Task:
The direction of a shot bullet should have a random spread calculated from the WeaponDetails' spread field.
Note: It's not necessary to be deterministic due to the ShotEvent sends the direction of every bullet to the client

Broadcast player death

Every client should know that a player dies.
Common:

  • Create a PlayerDeath network event (fields: PlayerName, dead_player_position)
  • Remove NetworkId from Corpse
    Server:
  • In DeathSystem broadcast this event when a player dies
  • Remove Corpse from server
    Client:
  • Receive PlayerDeath event
  • Raise a PlayerNotification about
  • Put a corpse with the dead player's last known transform
  • Add a Lifespan component to the corpse (e.g. 2 min)

Thus when a player dies, 2 messages will be broadcasted: a PlayerDeath and a NetworkEntitiyDelete.
The receiving order is irrelevant. Remove player entity on NetworEntityDelete, put the corpse and raise notification on PlayerDeath

Sprite rendering: control visibility order

Currently it seems that sprite visibility has not defined order. Amethyst has support for that, but it requires further investigation.

(abel: I have found sprite visibility sorting system, but it wasn't obvious when I tried to implement this)

Reload on `Reload` input

Current:
The reload happens automatically when the magazine got empty.

Task:
Remove autoreload.
When the Reload input flag is set the player should start the reloading process.

Update Readme.md

In the released version Readme.md should contain description, usage and config options (username, server address/port, etc.)

Convert Input to component

Input should be a component attached to the same entity as the player. PlayerMovement system and Shooter system should use this without accessing the input handling resource (currently InputState should be the only updater for Input component on client side)

Generate UEID for player on connect

  1. Client sends a ConnectionRequest.
  2. Server creates a Player entity with UEID additional component.
  3. Server sends the UEID to the client as the ConnectionResponse.
  4. Client creates an entity with the components: Player, UEID.

UEID should contain a unique u64 ID

Separate audio handling

Currently systems directly plays audio which makes hard the client-server separation. For idea, check the more-audio branch and consult the doc section about audio handling.
Currently we need just a minimal solution.

Add ammo pickup

  • Display ammo on HUD
  • Add AmmoItem which increases active Weapon's ammo in Holster when collides with if magazine is not full & disappears when picked up.

Add health pickup

A pickup that increases player's health with a certain amount when picked up. Then disappears.

Client handle server disconnect

For now the client does not even writes a log entry if the server turns unavailable during PlayState. It just freezes which is not the prettiest fault-handling

Move serialization/deserialization to a common place

Now we call bincode::serialize/deserializer everywhere. Should be moved to a single place, and abstracted away.

With other words: game logic is not interested in the binary format we use on wire.

Then it can be replaced or optimized easily.

Add feature list to README

The README should explain the implemented but non trivial features.
for now i think just reload and weapon switch

Switch weapon by key 1...5

Weapons should have different properties

  • damage
  • distance
  • number of particles
  • spread

Distinguishing revolver, shotgun and rifle would be a good MVP.

Segfault at client

I just ran both commands to build and run either the server and the client. The client ran pretty well, but the client segfaulted just right in the startup. Fallow the output error:

[INFO][amethyst::app] Initializing Amethyst...
[INFO][amethyst::app] Version: 0.15.3
[INFO][amethyst::app] Platform: x86_64-unknown-linux-gnu
[INFO][amethyst::app] Amethyst git commit: UNKNOWN
[INFO][amethyst::app] Rustc version: 1.52.1 Stable
[INFO][amethyst::app] Rustc git commit: 9bc8c42bb2f19e745a63f3445f1ac248fb015e53
[INFO][winit::platform::platform::x11::window] Guessed window DPI factor: 1
[WARN][rendy_factory::factory] Slow safety checks are enabled! Disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][rendy_util::wrap] Slow safety checks are enabled! You can disable them in production by enabling the 'no-slow-safety-checks' feature!
[INFO][westiny_client] Starting client
[INFO][westiny_client::states::connection] Server address: 1.2.3.4:5745
thread 'main' panicked at 'attempted to leave type `platform::platform::x11::util::input::PointerState` uninitialized, which is invalid', /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/mem/mod.rs:660:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_resource::escape] Terminal must be dropped after all `Escape`s
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(262144) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(4096) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(2097152) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(512) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(327680) is still used
[ERROR][rendy_memory::allocator::dynamic] Memory leak: SizeEntry(32768) is still used
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
[ERROR][rendy_resource::escape] `Escape` was dropped after a `Terminal`?
Segmentation fault (core dumped)

Use magazine size

When the magazine is out of ammo the player should not be able to shoot until reloading finished

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.