Git Product home page Git Product logo

diamondquest's Introduction

๐Ÿ“š Author | ๐ŸŽค Speaker | โŒš Time Lord

Author of Dead Simple Python (No Starch Press, 2022) and mystery novels. Communication nerd.

Former Principal Software Engineer. Geek in Python, C++, and Linux. Accidental expert in debugging and memory management. Mentor, business analyst, and project manager. Creator of Quantified Tasks standards. Reluctant IT.

Community moderator at DEV.

Member of Ubuntu, Python Software Foundation, Open Source Initiative.

Sometimes I also make Minecraft datapacks.

๐Ÿ”ญ See my CV.

โš™ Selected Skills

  • Python
  • C++
  • C
  • C#
  • Ruby
  • TypeScript
  • CSS
  • HTML5

See full skill list.

๐Ÿ“ซ How to reach me

diamondquest's People

Contributors

adeilh avatar ardunster avatar codemouse92 avatar deciduously avatar harleyndavis avatar mohanedmashaly21 avatar salts633 avatar supakeen avatar yekyam avatar

Watchers

 avatar  avatar

Forkers

yekyam

diamondquest's Issues

Using TNT

This is along the lines as #7 or #8, but is the most complicated of the three tools.

Power level corresponds to blast radius. (The actual in-code rules for blast radius should be coded in a maintainable way, not hard-coded.)

The proposed corresponding blast radius and power level is as follows:

7655567
6543456
5421245
5310135
5421245
6543456
7655567

(You're welcome to suggest changes to the above.)

The hardest part is, once the player sets down the TNT, the character must automatically pathfind to the nearest safe space outside the blast area, and then move there at double or triple normal walking speed. After the explosion, the character must automatically move back to the spot where they had originally been when the player placed the TNT.

Two-Step Animations

While walking (or performing most other actions), there are two-step animations. Show these during that action. (Start w/ walking animation.)

New and Load Game From Menu

The main menu needs to be made functional, such that you can create a new game with a name, or load from an existing profile. We have not yet determined the game file format; bonus points for doing so. Otherwise, just creating the skeleton framework for the functionality is enough.

Using Pickaxe

Allow digging with pickaxe. This will require implementing a power level indicator.

For purposes of implementation, you can give the player free power levels on request. (Eventually will be provided by solving math problems.)

Gameplay:

  1. Player selects power level 1-7 (use constants to define bounds; we may change them later). Selected power level persists after selection. Eventually, player will have to solve math problems to recharge to the selected level; they should not have to select the same level multiple consecutive times.

  2. Each STONE or TREASURE block broken with pickaxe consumes one power level. DIRT is free to mine.

#6 will need to be figured out first.

Math Screen

This task is reasonably simple: building a basic navigable grid that can hold text. However, there are some important factors, so please read through the below notes.

We need a screen that appears over the gameplay map, much like the menu does, but which will show the math problem to be solved. In game, it will be automatically triggered when a math problem must be solved. For debug purposes, you can set it to toggle with the = key.

This screen must be set up in a sort of grid configuration:

  • Each cell in the grid must be able to contain either a character โ€” usually a digit or an operator โ€” or a blank.
  • Some cells must accept input from the user: these should be marked out in a different color.
  • Display text as large as is possible! We want this to be playable (in full screen) by players who may have low vision.
  • Arrow keys must be able to navigate through the cells, highlighting each. Skip moving into blank, non-input cells. Highlight the cell currently visible in a different color; use a different color still for selected input.

We'll handle automatic carry-over in a separate task.

On the note of colors, I propose a yellow background for highlight, cyan for input, and green for highlighted input. Be mindful of good contrast, but avoid white-on-black or black-on-white. (Make sure the color choices are RGB constants, so we can change them later if needed.)

Here's a good example math problem (particularly hard, yes) that you need to be able to display. ? represents input field. and # represents a place where you might have a carryover.

123+45.6-788+900-876+53.4+210=????

  #####
 123.0
+ 45.6
_____
 ????

P.S. The answer is -332

In this example, the user would be walked through the PEMDAS by the game.

The exact nature of the math content and problem generation might change later, but the above at least shows how much room we'd need. If we can accommodate the above or more, then the rest will be easy.

IMPORTANT: Make sure you define the number of cells that you're fitting on the screen horizontally and vertically with constants, and determine the width and height of each cell from those constants and the screen resolution. We may need to change the values later.

Switch Tools

Allow the player to select a tool:

  • P or A = Pickaxe
  • D = Drill
  • T = TNT
  • Space = No Tool

The sprite and the player state need to update accordingly.

Precedes #7, #8, and #9.

Gradual Motion

Walking and climbing should gradually move the character between the two points, rather than jerkily moving them forward an entire block at once.

The trick to this will be syncing the gradual motion to the speed of the walking/climbing animation for #2. It may be best to move forward in 25% block increments, rather than smoothly.

Additionally, the speed should such that it still feels responsive to a player tap-tap-tapping the arrow keys.

Using Drill

This works along the same lines as #7. The only difference is that the drill mines multiple blocks in a straight line (horizontal or vertical).

The drilling distance depends on the power level - one power level is consumed per STONE or TREASURE block mined (DIRT is free to mine).

There is a special set of sprites for using the tool, versus just holding it, such that it appears the character is being pulled along.

When the player reaches the end of the drilling distance, they should go back to holding the drill, unless the player is not standing on a solid block at that point. In that case, put the drill away and go to the climbing position.

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.