GithubHelp home page GithubHelp logo

tversteeg / castle-game Goto Github PK

View Code? Open in Web Editor NEW
90.0 3.0 7.0 87.26 MB

:european_castle: 2D destructible terrain strategy game

Home Page: https://tversteeg.itch.io/castle-game

License: Other

Rust 100.00%
rust game destructible-terrain tower-defense

castle-game's Introduction

Ferris

Metrics

castle-game's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar lberrymage avatar tversteeg avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

castle-game's Issues

Suggestion: make it a real game

At the moment, castle-game is more of a simulation than an actual game. Few things could make it become a real game that would be fun to play:

  • make an enemy unit generation to have more than just 1 wave of enemies coming from the other side
  • make a gold/credit system to buy units
  • make a HP system for the base or a zone to reach in order to win
  • make few more units, eg: cavalry (fast, can charge through units), mage (expensive and weak but can buff surrounding alliees and cast powerful spells), catapults (expensive, weak and don't move, units can pass through it. high damage, high reload time).

failed to build

error: failed to run custom build command for castle-game v0.1.36

Caused by:
process didn't exit successfully: /var/folders/05/dfw4d4ds0nx2xyyn7yt5ky3r0000gn/T/cargo-installCAaHzb/release/build/castle-game-41450b48c6d8df5e/build-script-build (exit status: 101)
--- stderr
thread 'main' panicked at 'Failed to clone repository: authentication required but no callback set; class=Ssh (23); code=Auth (-16)', /Users/${homedir}/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-2eab394af869c8a2/castle-game-0.1.36/build.rs:97:13
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: failed to compile castle-game v0.1.36, intermediate artifacts can be found at /var/folders/05/dfw4d4ds0nx2xyyn7yt5ky3r0000gn/T/cargo-installCAaHzb

Bug: enemy melee pass through units

Enemy melee units pass through units, without stopping to attack mine, like if they didn't detect mine.
It happened also that my melee units pass through enemy units.

Linux x64 start failed

Hi, thank you for game. I downloaded last pre-release version, set executable flag and tried to run game:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.

On this machine I have not rust compiler and maybe other build tools.
I would like to help you by giving feedback.

md5sum 42b1dd4940e82d83af0102b09810b8e7 castle-linux-64bit
size 17791144

cargo run --release

Hello, I am on Windows 10 and I followed your instructions to build and run the game. First, I installed CMake and made its path global. Then I cloned the repo and went in it. Then I typed cargo run --release, but my shell told me "command not found: cargo". I tried ./cargo, cargo.toml, ./Cargo.toml, etc... nothing worked. It seems that I can't use your sources.

Lots of unused stuff

This happens when running cargo run --release

warning: unused variable: `ally_melee1`
  --> src\level.rs:80:33
   |
80 |     let (projectile1, bighole1, ally_melee1, enemy_soldier1, enemy_archer1) = {
   |                                 ^^^^^^^^^^^
   |
   = note: #[warn(unused_variables)] on by default
   = note: to avoid this warning, consider using `_ally_melee1` instead

warning: unused variable: `dt`
   --> src\terrain.rs:114:13
    |
114 |         let dt = dt.to_seconds();
    |             ^^
    |
    = note: to avoid this warning, consider using `_dt` instead

warning: unused variable: `entities`
   --> src\terrain.rs:116:14
    |
116 |         for (entities, mut rect) in (&*entities, &mut rect).join() {
    |              ^^^^^^^^
    |
    = note: to avoid this warning, consider using `_entities` instead

warning: unused variable: `rect`
   --> src\terrain.rs:116:24
    |
116 |         for (entities, mut rect) in (&*entities, &mut rect).join() {
    |                        ^^^^^^^^
    |
    = note: to avoid this warning, consider using `_rect` instead

warning: unused variable: `e_state`
  --> src\ai.rs:56:37
   |
56 |             for (e, _, e_pos, e_bb, e_state) in (&*entities, &enemy, &pos, &bb, &state).join() {
   |                                     ^^^^^^^
   |
   = note: to avoid this warning, consider using `_e_state` instead

warning: unused variable: `ubb`
  --> src\turret.rs:99:37
   |
99 |                 for (epos, _, walk, ubb, state) in (&wpos, &enemy, &walk, &ubb, &state).join() {
   |                                     ^^^
   |
   = note: to avoid this warning, consider using `_ubb` instead

warning: unused variable: `ubb`
   --> src\turret.rs:117:37
    |
117 |                 for (apos, _, walk, ubb, state) in (&wpos, &ally, &walk, &ubb, &state).join() {
    |                                     ^^^
    |
    = note: to avoid this warning, consider using `_ubb` instead

warning: method is never used: `x`
  --> src\geom.rs:53:5
   |
53 |     pub fn x(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(dead_code)] on by default

warning: method is never used: `y`
  --> src\geom.rs:57:5
   |
57 |     pub fn y(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `width`
  --> src\geom.rs:61:5
   |
61 |     pub fn width(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^

warning: method is never used: `height`
  --> src\geom.rs:65:5
   |
65 |     pub fn height(self) -> f64 {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

HiDPI Support

It's tiny on a 4k screen and doesn't seem to be able to resize. If I toggle fullscreen from X11, the game crashes:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UpdateFailed("Update failed because input buffer is too small. Required size for 3840 x 2160 window (1x scale) is 33177600 bytes but the size of the input buffer has the size 2764800 bytes")', src/libcore/result.rs:1084:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.34/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:47
   3: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:36
   4: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:200
   5: std::panicking::default_hook
             at src/libstd/panicking.rs:214
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
   7: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:384
   8: rust_begin_unwind
             at src/libstd/panicking.rs:311
   9: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
  10: core::result::unwrap_failed
             at src/libcore/result.rs:1084
  11: castle_game::main
  12: std::rt::lang_start::{{closure}}
  13: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:49
  14: std::panicking::try::do_call
             at src/libstd/panicking.rs:296
  15: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:80
  16: std::panicking::try
             at src/libstd/panicking.rs:275
  17: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  18: std::rt::lang_start_internal
             at src/libstd/rt.rs:48
  19: main
  20: __libc_start_main
  21: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.