https://github.com/arvmor/crypto_upset
Game of (My) Life – A Rust-powered life simulator where you can aimlessly wander, get (or avoid) a job, mine for virtual wealth 💸, and interact with Ethereum smart contracts 🏛️. Because even a fictional life needs decentralization! 🎮
https://github.com/arvmor/crypto_upset
blockchain ethereum rust simulation
Last synced: 7 months ago
JSON representation
Game of (My) Life – A Rust-powered life simulator where you can aimlessly wander, get (or avoid) a job, mine for virtual wealth 💸, and interact with Ethereum smart contracts 🏛️. Because even a fictional life needs decentralization! 🎮
- Host: GitHub
- URL: https://github.com/arvmor/crypto_upset
- Owner: Arvmor
- Created: 2025-02-11T16:37:41.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-02-11T16:47:46.000Z (12 months ago)
- Last Synced: 2025-05-16T09:07:40.510Z (9 months ago)
- Topics: blockchain, ethereum, rust, simulation
- Language: Rust
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Game of (My) Life
Ever wanted a game that accurately simulates the beautiful chaos of real life? No? Well, here it is anyway! 🤷♂️ This Rust-powered masterpiece lets you move around, get a job (or not), earn virtual money (that’s still worth nothing 💸), and interact with a blockchain-based smart contract—because what’s life without a little decentralization?
## Features
- **Move Around Aimlessly**: Navigate the world with no clear purpose, just like real life.
- **Get a Job (Maybe) 💼**: Stand on the magic work square and suddenly become employed.
- **Make Money (A Whole 0.01 Per Mining Success!) 💰**: Uses a blockchain-based mining mechanism that pays out just enough to keep you going.
- **Ethereum Smart Contract Integration**: Because even fictional lives need an immutable ledger.
- **Existential Crisis Mechanic**: Monitor your happiness, sleep, and will to live—just like in reality!
## Installation
1. Clone the repository:
```sh
git clone https://github.com/Arvmor/crypto_upset
cd game-of-life
```
2. Install dependencies:
```sh
cargo build
```
3. Create a `.env` file and add the following variables:
```sh
CONTRACT_ADDRESS=53f4E4DF2c7B9f5B628eAf41Fd5621d08f833912
RPC_URL=https://mainnet.base.org
PRIVATE_KEY=
```
4. Run the game:
```sh
cargo run
```
## Usage
- Use **arrow keys** to move around the game world.
- Work by reaching the job location at `[80.0, 80.0]` / `+`.
- The mining mechanism runs asynchronously in the background.
- When a valid hash is found, it updates the contract and earns money.
## Contribution Guidelines
We welcome contributions! Follow these steps to contribute:
1. Fork the repository.
2. Create a new branch (`feature/your-feature` or `fix/your-fix`).
3. Commit your changes with clear commit messages.
4. Push your branch and open a pull request.
### Code Style
- Follow Rust best practices.
- Use `cargo fmt` and `cargo clippy` before submitting changes.
### Issues
If you encounter any issues, feel free to create a GitHub issue with details.
## License
This project is licensed under the MIT License. See `LICENSE` for details.
## Acknowledgments
- **ggez** for game development.
- **alloy-rs** for Ethereum integration.