pieking1215 / fallingsandsurvival Goto Github PK
View Code? Open in Web Editor NEW2D survival game inspired by Noita and slightly Terraria
License: BSD 3-Clause "New" or "Revised" License
2D survival game inspired by Noita and slightly Terraria
License: BSD 3-Clause "New" or "Revised" License
This project hasn't been updated for a few months. Is it still active, or has it been discontinued?
Hello, I stumbled upon your repo here where I was surprised to find another David M attempting to accomplish something similar.
I do not have a background in GameDev and have been working on creating a falling sand simulation and integrating Box2D. (Inspired by Noita also). I am not attempting to create an entire engine as that is beyond my current abilities and so am using LIBGDX as a pretty bare bones engine to handle most of the update logic myself.
My Repo: https://github.com/DavidMcLaughlin208/FallingSandJava
DevLog Video around integrating Box2D: https://youtu.be/_xFluvZCSaM?t=74
I have a couple questions not covered by the Noita dev tech talk or your answer in another issue where you talk about Box2D.
Issue: #3
I am assuming you are using a 2D array at the core of your falling sand simulation. Lets say you have a box which is 3x3 and exists in the falling sand simulation. When the box rotates 45 degrees it will no longer easily fit into the 2D array. There will be 'holes' in the box where it does not easily fit into the 2D array. Here is an image of what I mean:
I can think of ways to be able to draw the object without the holes. But the falling sand simulation cannot account for these holes in the rectangle and you can see some sand has fallen into the box.
In my implementation I used a custom Moore Neighbor tracing algorithm for finding the perimeter of polygons (although this doesnt account for holes in polygons) and a custom Visvalingam line simplification algorithm but I am running into issues with it. Is there a library you are using or is there source material you referenced?
I see you are close to releasing your code on Github. I will be glad to read through it (although I don't know C++) and get some understanding from the code itself. But would be interested in hearing how you solved these problems yourself.
Hello, this project looks amazing! What kind of fps does this program get?
wonderful projects, thanks。
I have seen noita gdc talk and your answer for "rigidbody collision", and you said you have "pixel perfect player collision" . i wonder how you do that for realistic sand. for example:
the way i can think is: make a mask image for the player, and when the pixel is player mask, it will do the logic, but how to do the logic(for example, player move in sand)
Describe the problem
After changing conanfile.txt to fix a bzip2 dependency error and removing the v141, cmake succeeds, but make
fails with this message
-- Build files have been written to: /home/daniel/Software/Source/FallingSandSurvival/build
[ 1%]
[ 1%] Built target FallingSandSurvival_PRE_BUILD
[ 3%] Building CXX object FallingSandSurvival/CMakeFiles/FallingSandSurvival.dir/cmake_pch.hxx.gch
In file included from ~/FallingSandSurvival/build/FallingSandSurvival/CMakeFiles/FallingSandSurvival.dir/cmake_pch.hxx:5,
from <command-line>:
~/FallingSandSurvival/FallingSandSurvival/stdafx.h:42:10: fatal error: SDL_gpu.h: No such file or directory
42 | #include "SDL_gpu.h"
| ^~~~~~~~~~~
compilation terminated.
make[2]: *** [FallingSandSurvival/CMakeFiles/FallingSandSurvival.dir/build.make:64: FallingSandSurvival/CMakeFiles/FallingSandSurvival.dir/cmake_pch.hxx.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:122: FallingSandSurvival/CMakeFiles/FallingSandSurvival.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
GitHub workflows are very useful tools. I've used one to build and publish voxTalkz to pypi, so as to be to make it easily installable with pip. I believe that it would be beneficial to be able to build Falling Sand Survival after every commit to ensure that it successfully compiles without having to compile it yourself, and to publish it to GitHub after every release so that people can easily download the executable. (Perhaps to another repository, as an artifact, or to a GitHub pages website)
How is the collision between pixel particles and rigid bodies achieved?
I'll just post the error report for Conan here, x64 Windows, Visual Studio 2019:
-- Conan: Skipping compiler check: Declared 'compiler.toolset'
CMake Error at source_subfolder/CMakeLists.txt:12 (find_package):
By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SDL2", but
CMake did not find one.
Could not find a package configuration file provided by "SDL2" with any of
the following names:
SDL2Config.cmake
sdl2-config.cmake
Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
"SDL2_DIR" to a directory containing one of the above files. If "SDL2"
-- Configuring incomplete, errors occurred!
See also "C:/Users/BigD/.conan/data/sdl2_ttf/2.0.15/bincrafters/stable/build/71b33648681346c64a4d98d9026b76188c1b1378/build_subfolder/CMakeFiles/CMakeOutput.log".
provides a separate development package or SDK, be sure it has been
installed.
sdl2_ttf/2.0.15@bincrafters/stable:
WARN: sdl2_ttf/2.0.15@bincrafters/stable: requirement sdl2/2.0.9@bincrafters/stable overridden by your conanfile to sdl2/2.0.12@bincrafters/stable
WARN: freetype/2.9.1@bincrafters/stable: requirement libpng/1.6.37@bincrafters/stable overridden by sdl2_ttf/2.0.15@bincrafters/stable to libpng/1.6.37
WARN: freetype/2.9.1@bincrafters/stable: requirement zlib/1.2.11@conan/stable overridden by sdl2_ttf/2.0.15@bincrafters/stable to zlib/1.2.11
WARN: sdl2_image/2.0.5@bincrafters/stable: requirement sdl2/2.0.10@bincrafters/stable overridden by your conanfile to sdl2/2.0.12@bincrafters/stable
WARN: libtiff/4.0.9: requirement libjpeg/9d overridden by sdl2_image/2.0.5@bincrafters/stable to libjpeg/9c
sdl2/2.0.12@bincrafters/stable: WARN: Can't update, no package in remote
libtiff/4.0.9: WARN: Can't update, no package in remote
sdl2_image/2.0.5@bincrafters/stable: WARN: Can't update, no package in remote
sdl2_ttf/2.0.15@bincrafters/stable: WARN: Package binary is corrupted, removing: 71b33648681346c64a4d98d9026b76188c1b1378
sdl2_ttf/2.0.15@bincrafters/stable: WARN: Build folder is dirty, removing it: C:\Users\BigD.conan\data\sdl2_ttf\2.0.15\bincrafters\stable\build\71b33648681346c64a4d98d9026b76188c1b1378
sdl2_ttf/2.0.15@bincrafters/stable: ERROR: Package '71b33648681346c64a4d98d9026b76188c1b1378' build failed
sdl2_ttf/2.0.15@bincrafters/stable: WARN: Build folder C:\Users\BigD.conan\data\sdl2_ttf\2.0.15\bincrafters\stable\build\71b33648681346c64a4d98d9026b76188c1b1378
ERROR: sdl2_ttf/2.0.15@bincrafters/stable: Error in build() method, line 82
cmake = self._configure_cmake()
while calling '_configure_cmake', line 51
cmake.configure(build_folder=self._build_subfolder)
ConanException: Error 1 while executing cd C:\Users\BigD.conan\data\sdl2_ttf\2.0.15\bincrafters\stable\build\71b33648681346c64a4d98d9026b76188c1b1378\build_subfolder && cmake -G "Visual Studio 16 2019" -A "x64" -DCONAN_LINK_RUNTIME="/MDd" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="Visual Studio" -DCONAN_COMPILER_VERSION="16" -DCONAN_CXX_FLAGS="/MP16" -DCONAN_C_FLAGS="/MP16" -DCMAKE_INSTALL_PREFIX="C:\Users\BigD.conan\data\sdl2_ttf\2.0.15\bincrafters\stable\package\71b33648681346c64a4d98d9026b76188c1b1378" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev -T "v142" C:\Users\BigD.conan\data\sdl2_ttf\2.0.15\bincrafters\stable\build\71b33648681346c64a4d98d9026b76188c1b1378
Conan has returned exit code '1' while processing configuration 'Architecture: x86_64, build type: Debug, compiler toolset: v142, compiler version: 16;, runtime library: MDd'. Please check file 'C:\Users\BigD\Desktop\Folder\FallingSandSurvival\x64\Debug.conan\conan_03a70271-a71a-41a0-b540-8034d4181eb8.log' for details.
I followed all of the install instructions as written, but something is wrong with SDL2 it seems.
Describe the feature you'd like
I'd like this to be able to use Cmake for development on linux. It should be pretty straightforward to create one from what I can find. It requires is creating a CmakeList.txt make-file in a few directories, and as all of the libraries used seem to be platform independent, it should work well on linux.
Is your feature request related to a problem? Please describe.
Developing Software on Linux is typically easier then on Windows for many reasons, and I just can't get it to work on windows due to firewalls and the general slowness of Visual Studios. I'm able to get all the dependencies on linux, but not being familiar with the code I'm having trouble creating a cmake makefile for FSS. Also, running FSS (from github actions) on linux with WINE yields only white.
Describe the feature you'd like
A list of keyboard shortcuts
Is your feature request related to a problem? Please describe.
This is a great looking game, but I can't really figure out how to use it... by playing around, I figured out that P put the character into the game, E destroys everything in a circular area, and C turns a cube of terrain into a falling body, but I cannot figure out how to do anything else. I would apricate a list of keyboard shortcuts in order to use all the features.
i need some help downloading
Hello,
ENV
Windows 10
Microsoft Visual Studio Community 2019(Version 16.11.5)
I can see loading screen in windows command prompt.
but It stop at Game.cpp: 266 (Creating game window.. ).
Visual studio notices a error to me at Game.cpp -> WINAPI glSpeedUp -> ReleaseDC.
Unhandled exception at 0x00007FF9C3938628 (atiadlxx.dll) in FallingSandSurvival.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000002A50903000).
I have no idea.
Please advice to me.
How can I fix it? Please give me hints.
Thanks.
In the question #4 , it is mentioned that the rigid body shape is recalculated when the angle of the rigid body changes.
After the rigid body angle is changed, how is this shape transformation achieved?
I have not used those libraries and algorithms you mentioned.
Good day!
I am trying to runnning FallingSandSurvival with much trouble.
I have error in conan's processing.
"ERROR: Unable to find 'sdl_gpu/20201002@sdl_gpu/20201002' in remotes"
Please advice conan remote url for "sdl_gpu/20201002@sdl_gpu/20201002"
thanks.
This post will be updated every time there is a breaking change merged into the "dev" or "master" branch.
In the current version of your engine, it appears like sand doesn't get added to rigidbodies (it can only fall off, and never start to stick to, for instance, a convenient container), based on the gifs sent here. Since you have started working on a new version, do you plan to have sand stick to rigidbodies? If yes, how will / do you do it?
So some ambient music might come in handy to your game maybe chiptune.
This looks amazing! Are you planning on publishing the code?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.