All of the common lisp code was translated into Chez Scheme. A grid coordinate system was added; with the 'v' key one can toggle a grid selector which may be manipulated with vi keys or the numpad. Currently, when moving the selector there is an issue. The selector is moved by updating one of two vertex buffers (one is for geometry, one is for mesh instances). I plan on the second one to be static in the long run, this is a 'quick and dirty solution'. Uniform buffers will eventually be implemented. Right now, everything works with a bit of error message spam.
3.2 KiB
License
Copyright (C) 2024 Frosch
This file is part of Shape of Fantasy.
Shape of Fantasy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Shape of Fantasy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Shape of Fantasy. If not, see <https://www.gnu.org/licenses/>.
Goals
TODO [A] [2024-05-22 Wed]
TODO [B] Camera Controller
The game already has a camera, but there isn't a nice way to move it dynamically with the keyboard.
TODO [B] Font Rendering
Rendering a scrollable text log and a text field that can be edited.
DONE [A] World Grid
Since the game is a 3d game inspired by Rogue, there should be a grid coordinate system with z-levels and a view mode with a selection box that you can move on the grid.
Ideas
PLANNED [2024-05-22 Wed]
PLANNED Magic System
I'd like to make a game where the magic system is based on image data. This can be an external file or something made in-game. Formulas are strings of runes that create specific spells. The image is created as some sort of function of this formula.
The idea is to hardcode the effects of each rune to do one specific thing. The image data of the rune is hardcoded, then image anaylsis is done to determine the weight of each rune. For example, if I have runes A, B, and C the weights might be A = 0.5, B = 0.2, and C = 0.3 for some random image.
The first thing that comes to mind is a very basic feedforward neural network classification, but I have a problem with that. To use a neural network I need to produce decent training data. What if I want to make changes to how the runes look, and I want to do it frequently? In that case, this doesn't seem like the right way to go. I've used tesseract coupled with online translation to play Japanese games, so I know that kind of OCR is super powerful. But I don't think I need that much power at all. I don't know much about OCR, but I do know that it has existed before adopting these more modern techniques. I think I just need a basic system here that can somewhat accurately match a relatively short list of characters (I don't think I'd go over 100, but who knows).
So now I am reading the wikipedia page for OCR. I ended up on a page about digital image correlation (DIC). Cross-correlation functions are already something I know about, which bodes well. I'm not sure why I didn't think of doing that myself. So if I have two images of equal dimension, the (normalized) cross-correlation will produce a third image. Take the maxvalue to get point of best match.
But this would only match to one rune. I'd need to create a probability distribution out of this vector of values. Maybe softmax would be best over the naive "value divided by total".