#GrubStomper29's Project Thread
1 messages ยท Page 3 of 1
Cave story
True he does bring that one up every 5 seconds 
Cave Story
maybe i should have a playthru to refresh my mind
i never did complete the no health upgrade run
probably because the latter half of the game becomes a one-shot bullet hell without health upgrades
i got to the final phase of the final boss though
Cave Story clone then?
Obviously with your own story & style
Will you use OpenGL? The best API as always
with 2D it's hard to go wrong, just use what you like/what seems interesting to you
vblanco's been looking at writing some sdlgpu tutorials so you can probably snoop his thread on that https://discord.com/channels/318590007881236480/1448776770542375064
i thought sdl gpu was meant to be sort of like a simpler vulkan clone
idk if that'd necessarily be wrong
but probably wrong for my use case
I was more referring to the more basic sdl 2d functionality
oh, I don't know what they have
but since I'm most familiar with gl, i'll probably use that
do they have a library for GDI/canvas esque 2D painting
interesting
idk
actually i wouldnt mind trying out some digital painting program to see if i can make "hand painted" backgrounds
probably sidescrolling if thats what youre asking
so id likely be starting out with a tile engine
I mean like pixel art, live2D/spine, baked renders, some other thing
that would motivate your rendering stack more than anything
Is it all gonna be monochrome?
no idea
I mean thats probably something to think about before you start
since if you need to colour in these drawings its gonna change everything
greyscale can look really good
tho it seems you mainly draw with pencil so you're gonna have issues with contrast and touching up your scans
Pencil line drawing and then overpaint/watercolor in krita
pencil draw, light, capture with 12mm film
12mm film? do you mean 16mm?
12mm doesn't exist to my knowledge
the is 8mm, 16mm, 35mm or 70mm
It would have looked better if the lighting was more even
do you have a flatbed scanner?
was this some digital traceover?
yeah i think
Basically just adjusting contrast in gimp and cleaning up some lines
Also trying to compensate for the perspective
Ok so cave story clone with soundtrack by DMB
this could not be less true, nvm
actually I wanted to make you all aware of this project https://scratch.mit.edu/projects/1002151600/
just a meme but also I think its a pretty nicely designed boss fight
pretty fun when I made it 4 years ago
heres a comment someone left on the original
big things are brewing
does anyone have any experience with geany?
please dont
well
just use vscode or clion
vscode is a no
how is it a no?
its ms
vscodium then
i dont wanna download it bc i dont agree with the download page's privacy policy
you can use zed
geany or qt creator is brain damage. Its just bad
you dont have many options if you dont want vs, vscode. Only clion, vscodium, zed, neovim, emacs are left
alright
youd think out of all the foss out there, one of them would be a decent code editor
Kdevelop
brain damage
devcpp
isnt that also brain damage
kdevelop is not brain damage if you use c++ and cmake
-- SDL_OPENGL (Wanted: on): OFF
hmm
alright i deleted all the cmake stuff then restarted and that's fixed
Could not create GL context: GLXBadFBConfig
oh
only gl 4.5 on linux? what?
alright so i updated my graphics driver to the recommended and now my keyboard and wifi dont work
lsusb shows both keyboard and dongle, so what gives?
fortunately i had a system restore point
@prisma otter make sure you set these up to restore very often
yeah for some reason, installing the nvidia driver reliably breaks my keyboard and wifi
wack
maybe the dongle is showing up as a hub or something? idk
Shoulda used arch 
alright i got the driver updated successfully
but I still only have gl 4.5 compatibility
maybe that's why ASO wouldn't work? Do you require a core profile? @prisma otter
I think I figured it out?
Despite all my installs, the reported driver is some mesa device
so I used driver auto update via the terminal and now I have the proper nvidia driver with gl 4.6
ill check if aso works
time
looking at debug vs release builds with cmake and if I understand correctly, cmake handles that automatically right?
the end user will just specify debug or release when calling the cmake command
End user? I sure hope the end user never has to touch cmake
Yep, cmake will automatically switch preprocessor macros and compile flags for debug vs release
And the different types of builds it offers, ex. Optimizing code size (minsizerel)
Or release with debug info (relwithdebinfo)
You can define custom ones but those should cover most scenarios
ig since I'm using cmake's fetch content for the larger libraries i dont need to include their licenses since I'm not really distributing their code?
gpt says otherwise and brings up the fair point that the build process still requires downloading those libraries
wouldnt hurt to include the licenses then
If you distribute binaries and those libraries are under MIT or Apache, they usually require the license to be distributed along with the software
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
That's what MIT says
which means i should probably go and tweak Green Hour lol
If your pulling down mit libraries at compile time/you dont distribute them it's fine to leave it out
Like cmake fetchcontent will have the person who clones the repo get the code, you aren't distributing it
So if it's MIT licensed, you dont need to distribute the mit license
But if you distribute binaries, your distributing that code that was pulled from cmake fetch content now and you have the include the mit license
Idk what licenses your dependencies have, I typically stick to mit licensed stuff so thats just what I know
if/when you ever distribute something you can probably just write a little cmake routine to grab and concat all the license files and dump them in your binary
or alternatively just point to the license in the github repo in some links thing somewhere
the readme maybe?
yk i had a weird dream
4 "people" like 9 feet tall killed some people, took their guns, and occupied some warehouse esque building
and the local townspeople found out and tried killing them but couldnt win the ensuing battle
and more and more people joined the mob eventually comprising of 2.2 million armed citizens trying to kill the 4 hyperboreans or wtv they were
1.2 million of those were killed in the battle and 4 didnt lose a single one
Agartha: the last stand lmao
Nice kalimba
Nah lol my friend showed those to me though
Obviously I could use it to record or compose quick stuff but I wonder what the point of the instrument is besides novelty
imo it sounds the same as a xylophone but cant play sharps or flats without specific tuning
ig it is very portable
I'm sure there's some genre of music that it's made to play specifically
It probably has limited utility overall but it might be good for a little game soundtrack or something here or there
absolutely
I'm still a little peeved at that driver error
updating a graphics driver from the gui should not have different results from updating from terminal
wow make sure to enable LDAC if you can
well I just beat cave story with no health upgrades
that puts me in the top 1% of players
pretty cool
theres some extra really hard stuff I can do without the health upgrades that would put me in the top 0.02% that i might get started on shortly
hopefully i wont go insane trying to do it
Instead go insane trying to recreate cave story 
i gotta make a tile engine
ig I'm start with the easiest tileset texture: one tile
how about this lol
nah lets avoid copyright infringement
@prisma otter are you aware of flams
Like on a drum?
yeah
what about them
I forget what they even are lol, two nearly simultaneous hits?
I haven't done rudiments since I first started learning drums
yeah
thats like the first one lol surely you used it enough to remember the name
Not really the single paradiddle is like the quintessential warm up rudiment
Flams aren't all that frequently used ime
I guess maybe in concert band they were used a bit
Not in my set playing though
interesting
But I haven't really done that structured stuff in ages I just pick up the sticks and play
i hear it a lot in set playing
maybe in the kind of music you listen to more
perhaps
litterally the first thing you hear in the BTCS album is a snare rimshot lol
but Im certain i could find other tracks in other genres
there a bunch in aqualung
which is british prog rock lol
one in the first 30 sec of Any Colour You Like by Pink Floyd
There's one near 0:59 of Chop Suey by System Of A Down
(idk why they capitalize Of A)
OpenGL best API once again
dont fret
in 10 years all our gl code will probably have to run on a vulkan translation layer
alright the
[save all]
make
../2D_Game
is getting old
vscode really needs a save all button or shortcut
and maybe i can streamlike the build and run with an extension or script
You can script the make/run part
Idk about the saving
I use vim so I sort of always have files saved
can I offer you some clion?
enable auto save
it will make your life easier
dont wanna jinx it but this is the first in a long time where ive coded a lot today and still want to do more
What are you working on again
Cave story clone with soundtrack by a dmb cover band
Unironically can't tell if joking or not but cool if so lol
not a clone and idk how the music will be
but a 2d game
making a tile engine right now
Will it be a metroidvania though?
It basically means you have a game progression that consists of a process of exploration by which you unlock a sequence of tools or weapons that give you access to later parts of the game
Like in Metroid Prime you're running around and there might be some hole in the wall that you can't fit through, but eventually you find the morph ball upgrade and suddenly have the ability to bypass a barrier to the next area
In a basically open world
I would say interconnected rather than open but yeah
Open in the sense that you roam it freely not in being like a big open flat terrain
yeah that sounds vaguely along the lines of what im thinking
Well you need the upgrades to access large portions of the map so it's not really open is what I mean
Castlevania sotn my beloved is another great example
I'm thinking a bit far ahead, in terms of story maybe a city like Austin is completely quarantined due to a lethal airborne disease and you're sent in with some cbrn guys to investigate that
because otherwise the gov will napalm and raze the city
Tangential but every gamedev should play Metroid Prime at least once in their life
Masterpiece
You'd want to do it with a gc controller though
mentioned in White & Nerdy!?
Lmao
Maybe you noticed this since you're younger but I remember going back and watching that music video in like 2016 and being blown away to see that some of the gangsters are Key & Peele
I first saw the video in like 2008 or something before they were famous
Yeah LOL
i havent seen the video in a long long time and rewatched it today and thought "hey its that comedian"
And then another weird thing I didn't notice until years later was that one of the guys in the original riding dirty music video also plays the president in The Fifth Element
Happy new year guys
this is lovely, I have it set to autosave whenever I click the terminal
I wish there was a way to publish my stuff without AI training on it while still being FOSS for humans
maybe I can append something to MIT license or something
I guarantee you the AI scrapers will not listen to it
They blatantly violate copyright all over the place
yeah I'm cooked either way
the real solution is to not upload to github but im too lazy for that
to the public domain it is
If it's a private repo they claim to not train on it I think
Whether or not that's true is another matter
codeberg is also a thing https://codeberg.org/
It's only for open source though
otherwise I would be using it
ASO is hosted on sourcehut
which is not free, but extremely cheap
but then you can't see it
I'm thinking gnu gpl3 so that might work
dont I need a separate license for media/data files? gnu seems to only cover source code
GPL is a bit of a sticky licence I'm not sure I would use it
But it is your code its up to you
what about it?
forcing derivatives to also use gpl? I'm fine with that
Also things that link with it
but I suppose you aren't making a lib
so that part doesn't matter
You can tack stuff on to the MIT or BSD if you want
all of these licences are legally tenous anyways
yeah i think mit was what i mostly used previously
that still leaves the media question
i probably have to include a separate license file for that like cc
Creative commons is probably what you want yea
CC-BY-SA if you don't mind people using them
Creative Commons licenses give everyone from individual creators to large institutions a standardized way to grant the public permission to use their creative work under copyright law. From the reuserโs perspective, the presence of a Creative Commons license on a copyrighted work answers the question, What can I do with this work? The CC Licen...
Yeah they don't care if they break the law
It's the BY part specifically since the models are unable to perform attribution
So unless it were ruled that listing every single author whose work ended up in the corpus in one big blob of attribution were legal, it's probably not
But nothing will happen
Oh its definetly illegal
Lmao sorry
youre good lol
kinda weird that im bound by the licenses of my own work even though i own the ip
I'm not sure that you are
If you own the original copy in private on your computer, all rights are reserved
You can release a new version with whatever license you want since it's your own property
okay
It's only the end user whose rights are granted by the license who is subject to it afaik
But I'm not a lawyer
So idk what I'm talking about
cc by sa looks good
Are you going to try codeberg?
i think I'll look into it
non-sa might work too
btw @prisma otter ive been very happy with bluetooth audio over the LDAC codec
I'm using technics az80 and imo it sounds as good as or better than sennheiser hd 280 pros
oh the buds are twice the price that makes sense
still its a shame apple doesnt seem to support ldac. I'm very fortunate to have an android
I just don't listen to music in the gym personally
I leave my phone in a locker so I don't get distracted
doing that is awesome especially in a home gym
When I work out at home I get endlessly distracted by my phone lol
but i just ripped these CDs and got these earbuds so i gotta put em to work lol
I just tuck my wired earbuds into my shirt
not full headphones tho
Yeah I don't listen to music outside of my house most of the time
I prefer to be able to hear things when I'm outside
more and more these days I just wear earbuds while working out so people don't talk to me
not always in the mood for music
sometimes i do it because im doing some chore while my parents are watching tv
if I'm going to hear something distracting, id like it to be on my own terms
yeah vacuuming is also a great time to listen to music
having a loudness war with your vacuum is probably not great for your ears but whatever
noise canceling baby
I'll have to test these buds for lawnmowing and potentially buy foam tips for that
I'm having trouble with reading files in binary
the file is .bin and in hex reads 00 00 00 05
Are you explicitly opening them in binary mode
yes
Hm
i use fstream::read((char*)&uint32Var, 4);
and i get some nonsense like 50000
which i believe is a result of the data being read/interpeted with some offset i never asked for
Endianness issue mayhaps
so should i try 50 00 00 00
Yes that would be the number 0x50
now it reads 80
before, it read 83886080
when it's 00 00 00 00, it reads correctly as zero
when its FF FF FF FF it reads 4294967295
which seems correct
so I'm thinking the bytes are reversed but not the byte order
which is weird. how do i make it not do that
so 01 00 00 00 appears as 1
oh well I think I can work with it
alright guys here's what I have so far
I drew the tile in gimp. The tiles are rendered stupidly but it works for now. The level is stored in a .bin file and ghex is my level editor
now to add a guy who can move, then i think I'll work on engine structure
80 = 0x50 so that seems right to me
man i forgot about this track
Provided to YouTube by The Orchard Enterprises
Monad ยท Soil & โPimpโ Sessions
Man Steals the Stars
โ 2019 Victor Entertainment Group under exclusive license to Red River Entertainment
Released on: 2019-12-04
Auto-generated by YouTube.
this is the band that invented death jazz
I just realized my entire rendering code was inside the SDL_PollEvent() loop 
Just need some gravity now 
i wonder how tile positions should work
imo it makes the most sense for a tile's origin to be its center and not one of its corners
idk about the player though, I'm torn between his center or at his feet
I put character origins at the bottom center
I did this when I was doing 2D as well
so like between their feet
it is up to you however
Just try it one way and decide
Placing tile origins at the center is going to make for a lot of ยฑh/2 factors in your codebase
didnt we used to have a true emoji?
Either way will make some calculation simpler but others more complicated
So just do whatever seems most intuitive
anyways yeah, but for some reason if its a corner i always spend a while looking at a coordinate and wondering "is it this tile or that tile?"
so I'll go with center for now
and for entities, bottom center
also i love how ripped the guy looks ๐
Personally I would just standardize on the origins being the bottom left corner of the tile but up to you
Because then the fractional part of the position like 3.2 also tells you that you're 0.2 of the way across the tile which has useful implications
You can just fract/floor/ceil your way back and forth between coordinates and stuff
man this album was weird as flip but then theyll randomly drop some crazy solo like whatever this is https://youtu.be/iKLMgM5NWW4?t=2m40s
Provided to YouTube by The Orchard Enterprises
Galaxy Lady ยท Soil & โPimpโ Sessions
Man Steals the Stars
โ 2019 Victor Entertainment Group under exclusive license to Red River Entertainment
Released on: 2019-12-04
Auto-generated by YouTube.
i should probably implement a garbage collector or deletion queue a la vkguide
im too lazy for RAII and i always forget to manually delete gl objects
well, I probably wont need to manually keep track of that much stuff since most things should hopefully be an unordererd_map
RAII is quite easy lol
Its good for laziness
it cleans things up almost automagically
without the need of GC
I don't delete anything lol
I don't call delete either
, I use RAII instead
I just don't really consciously delete resources lol I do have some RAII for some things but I generally just load everything I need at startup and it stays loaded until the program dies
Yeah problem is when the program dies you have no idea what order things get cleaned up in which can be a problem
Also you may find that you need to load and unload things in the middle of the program, which is what I realized when I implemented save files
I have an explicit order for my systems I just don't really pay attention to the graphics resources much
Yeah for sure if I needed that I'd need to
No save files in SRS I take it?
No ofc not
lol
But even if I did I think the resources would be the same regardless
The save file would be scene content
I just load everything rn
It's all terrain which needs to be loaded regardless
My terrain and foliage data is multiple gigabytes when loaded so 100MB of textures is basically irrelevant
My cooked Jolt terrain collider cache is nearly a GB on its own
Why did you design this monstrosity 
Mental illness
the terrain data in ASO is < 100 MB
That can't be right, your foliage was not that far from programmer art irrc. What are you storing even?
The foliage data doesn't exist on disc but once the instances are placed it adds up in vram
Oh but much more was happening under the hood
Of course, but surely it's not couple gigs
No that's everything in total
Ah
Foliage data is probably a couple hundred MB but it all adds up
what
Why would I delete anything, I loaded it for a reason
do you leave it to the os garbage collector?
When the process dies the graphics context and all resources die with it
intresting
I have shutdown routines for most of my systems and some of them probably do clean up graphics resources explicitly or implicitly idk I just never really thought carefully about it
fair point lol
So to load another map you have to restart the program 
So far lol
I haven't had more than one map at a time since I switched to the new terrain system
Since making terrains is a bit laborious
But in principle it wouldn't be hard to do since all systems just start up and shut down with a function call so in principle I could destroy most of the game and rebuild it without restarting the program
I'm sure it wouldn't work out of the box but wouldn't take more than a few hours to get working I'm sure
There's always some gotchas in that stuff, like there's a big difference between making your system parameters work for everything you'd generally enter manually, vs be robust enough that you can plumb it into an imgui menu and arbitrarily twiddle the values and create/destroy stuff and have it work seamlessly
alright so this is what I have in my readme
License
This project's source code is distributed under the terms of the MIT license. The licenses for this project's various included libraries can be found in the third_party folder. This project's data and media files, which can be found in the assets folder, are distributed under the terms of the CC BY 4.0 license.
i chose a weird thing to bikeshed
alright so
i have a cpp file that corresponds to a .hpp file
and it sorta goes like
namespace Graphics
{
aBunchOfHelperFunctions();
//...
implementationsOfHeaderFunctions();
}
im not terribly thrilled with that, it's a little messy imo. I'm thinking of having a helper cpp and hpp file for all the helper functions. What do yall think?
Now is not the time to be concerned with such meaningless trifles
get your boi jumping
you can refactor it later
alright
something i dont like about linux is how involved it is to install an app
if sudo apt-get install doesnt work you gotta download it, stick everything in the right dir, setup a .desktop file, and in a lot of cases, extract the icon file
ig thats more the distro's fault
It's not really the fault of any one distro
Its the fact that on linux binaries are not neccesarily compatible across distros
so it makes it impossible to provide a package that works across distros
Well not impossible, since valve figured out a way to handle it
Also the situation on arch is a bit better since alot of things are available on AUR
I use arch btw
i still am not 100% sure of the correct place to put .appimages
i keep mine in ~/.local/bin
steam uses essentially a sandboxed distro https://github.com/ValveSoftware/steam-runtime
Yeah I'm aware
Are these like templates
Why do you need to define functions in the header
Oh this is the cpp
Nah just do it like that
I recommend changing your IDE formatting to not indent the content of namespaces
Most everything will be in a namespace which results in basically wasting the entire first indent worth of columns on the screen
oh heck no
(hue hue hue)
You always need imgui 
wordington
level saving works
though it feels like im doing some incredibly dangerous stuff here ```c++
std::ofstream oStream{ fileName, std::ios_base::binary };
oStream.seekp(0);
std::filesystem::resize_file(fileName, fileSize);
alright im switching to copy initialization for basic types
and should probably do the same for all types really
brace init is a pain to type and forces you to cast types if theyre slightly different
i am not casting from unsigned long to unsigned int bruh
boy do i hate cmake
"Let's make a build generator. Give it the worst syntax possible, make it useless, and ensure it has no mildly popular competitors."
beginning to write the level editor
anyways glad.c is so large that github thinks my project is primarily written in C
You will just have to write more code then 
If you become fetchcontent pilled you can remove it from your repo but yeah I usually just include it directly
There are also git submodules if you don't like fetchcontent
I think deccer has a sample on how to do it, I remember it being surprisingly annoying because only one branch of glad had convenient cmake integration
# GLAD Configuration
FetchContent_Declare(
glad
GIT_REPOSITORY https://github.com/Dav1dde/glad.git
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
MESSAGE(STATUS "Fetching glad...")
SET(GLAD_PROFILE "core" CACHE STRING "OpenGL Profile")
SET(GLAD_API "gl=4.6" CACHE STRING "API Version")
SET(GLAD_GENERATOR "c" CACHE STRING "API Binding Language")
FetchContent_MakeAvailable(glad)
and then just target_link_libraries(project PRIVATE glad)
Also CPM (cmake package manager) is worth looking into
I need to give it a quick look over but I'm pretty confident submodules and/or fetchcontent can give you everything you need
they've made good strides
CPMAddPackage(
NAME glad
GIT_REPOSITORY https://github.com/Dav1dde/glad
GIT_TAG v2.0.6
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
SYSTEM TRUE
)
if(glad_ADDED)
add_subdirectory("${glad_SOURCE_DIR}/cmake" glad_cmake SYSTEM)
glad_add_library(glad STATIC REPRODUCIBLE EXCLUDE_FROM_ALL LOADER API gl:core=4.6)
endif()
or
FetchContent_Declare(
glad
GIT_REPOSITORY https://github.com/Dav1dde/glad.git
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
MESSAGE(STATUS "Fetching glad...")
SET(GLAD_PROFILE "core" CACHE STRING "OpenGL Profile")
SET(GLAD_API "gl=4.6" CACHE STRING "API Version")
SET(GLAD_GENERATOR "c" CACHE STRING "API Binding Language")
FetchContent_MakeAvailable(glad)
add_subdirectory("${glad_SOURCE_DIR}/cmake" glad_cmake SYSTEM)
glad_add_library(glad STATIC REPRODUCIBLE EXCLUDE_FROM_ALL LOADER API gl:core=4.6)
i should probably test a windows build soon
i wish dear imgui had some better documentation
the _demo.cpp contains all the controls and how to use them | https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html
There are alternatives like nuklear and whatnot
I change my mind, im going with the tile's origin being its bottom left corner
here it is so far
noice
You are honestly mogging 90% of this server by having gameplay in any capacity
Honestly I can't wait to see some of your drawings in there now
splendid
patience, I'm probably going to work on more gameplay first
Also in commemoration of Green Hour, i wanna name this game's engine after it
Green Hour Engine/GHX
the game itself is still, naturally, untitled
what is green hour?
originally what this thread was for, a 3d game i lost interest in making because i dont like 3d modeling
how do yall separate your level editor from production builds?
do you just leave it in hidden?
I'm considering making mine debug only and gone from release builds
It's an option in the settings file
I figured I would leave it in release builds in case people wanted to mess with it
No reason to remove it
I don't have an editor
hope that helps
Also you may want to be using the editor in release mode, for performance reasons
Nothing more annoying than a slow editor
If you're a mad scientist you can probably set your build up to compile core engine systems in release mode while leaving gameplay code in debug mode for development
save a few kb of code and fonts
Up to you but that doesn't seem worth it to me
Just leave it in with a command line switch or something
sure
man I cannot get imgui menus to work
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu("File"))
{
if (ImGui::MenuItem("Open..."))
{
std::cout << "0";
}
ImGui::Separator();
ImGui::MenuItem("Save");
ImGui::MenuItem("Save as...");
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
afaik something should be happening when I press that menu item but nothing is
actually it seems to print all the 0s when the program closes ๐ค
do you need to flush
is that actually stdout
try a new line
are you using SDL?
it has SDL_Log
well ive also tried using imgui functonality in that if statement and nothing seems to happen
yeah it sounds like you need to flush
put a breakpoint in there and see if it gets hit
breakpoint? ha ha
how are you opening windows?
idk what you maen
I don't know how to say that any different :/
on win32 you can use WinMain, with SDLyou create a window, you know
I use ImGui::Begin()
ah yeah I use sdl
oh ok
so SDL_TriggerBreakPoint();
SDL_Log();
you get those
are you using SDL3?
yeah
well I said that because I dont have any debugging tools setup lol
you don't have gdb?
maybe lldb?
sudo apt-get build-essentials or whatever that is for your distro will get you all that stuff
oh ig i do
gotta figure out how to use it
all this so I can show an imgui menu
ah it appears the popup id is popped out of the stack along with the menu
I'll need an explicit id
I dunno how you are surviving without a debugger lmao
not having bugs
i should probably pimp my gui code out into functions before I spaghettiefy the editor
how cursed is using std::optional<std::filesystem::path> to represent the current file being edited
literally not cursed at all
you need a mainmenubar too, check imgui_demo.cpp
i think thats for the parent window
which i dont want
then you asked the wrong question again
but check demo.cpp anyway and be on the right branch docking
i believe multiwindow is merged into that one, if thats what you want to do?
I'm not using any docking or multiviewport features at the moment
i only have one window with no desire for it to have a main menu bar
then what are you actually trying to make
if you want a typical "File" "Edit" etc menu bar then you need that mainmenubar thing
like jake has in aso editor
right now the imgui editor is constrained to one imgui window, so the menu bar being in that window is fine
mainmanubar would put the menu bar on the sdl window
this crap is so precarious to word
I think the imgui part is working but grubbi doesn't have a debugger so is getting confused
Get your debugger working lmao
any recommendations?
What ide are you using? It should just work
Like I assume you have lldb or gdb installed
vsvodium
I assume you are using an extremely jank ide since that should work out of the box
Maybe you need some plugin?
Yeah it was good
One thing I miss that it had was natvis files
Made it much nicer to look at stdlib types
ah ๐ i see
yeah sorry for the miscommunication lol
this was the meme i saw several years ago that inspired me to create "Defend Your Home from the HOA" on roblox
and i think its a decent premise for this first game i make
remember your roots
anyways heres a demo of the level editor thus far
i wonder if I should come up with an extension for level files since I use my own format
im lazy
The beauty of editor tools is that, the more effort you put in now, the lazier you can be in the future 
i definitely need to work on safety features first
problems ive identified so far:
-user is not notified if opening a file fails
-user is not notified if creating a file fails (due to existing file with same name)
-user is not warned of unsaved changes if opening a new file
-user is not warned of unsaved changes if closing the program
the last two I'll probably tackle while I implement editing history, which will also give me undo/redo powers
first two are fixed
oh, and it probably shouldn't segfault if i open a file
that'd be cool
all fixed
next I wanna add undo/redo
automatic backup creations like blender does
why the reactions
Undo/redo is quite nontrivial
Undo and redo is a massive can of worms
i already have a vector of edit history that will probably get several gigs long
i should put it to good use
It seems simple now
but as your editor gets more complicated there will be...
edge cases
do you think undo only would be any simpler?
Undo is not easy
I'm just saying its something you could end up spending a long time on
interesting
maybe i wont then lol
im just trying to idiot proof this as much as possible
i think my level file format will be called ghxl
The sanest way I've heard to do undo/redo is to have every control/UI interaction be represented by a command struct that can be rolled forward or back to reconstruct the world state at every point
But even then that's not easy if you do something like delete an entity that has a bunch of sub components and need to be able to roll it back
lol
dont have super high expectations for this level editor btw
i just want something rudimentary
a step above level editing via a hex editor
I haven't implemented mine yet, but I decided to do it by just serializing the entire map after every operation 
its dumb, but it should be pretty reliable
you could also maybe not reimplement a level editor - create a importer for tiled or ldtk
Has anyone actually made a game that uses tiled? everyone keeps talking about it but nobody seriously seems to use it
theres less chest hair with that choice
I think a level editor is something you should really write yourself
Since you are writing the game you already have half of it already
yeah but "operation" implies you can at least do stuff like insert and move around assets, which by my defenition, is an editor
that sounds like pain
i have no idea what hell that man put himself through because he didnt write an editor
like was he writing it in a hex editor?
from what i can see, mostly small indie or game jam games
ldtk (from my experience at least) is very good tho, and comes from dead cells
without knowing music theory. We'll never be him
You could simply learn the theory
i already have
Ok so you will be him
perchance
also this gives VVVVVV vibes for some reason
never played
i wonder if i should add a basic compression algo or worry about it later
very interesting phrasing
yeah i have no clue what you mean lol
Lol sorry I'm listening to something at the same time as texting
I assume you mean you can always do it later
Always*
which is true
hopefully some vibraphone jazz
No Rupert Lowe interview
I can't type and listen to words at the same time
Autocorrect makes it worse
dw about it
I don't think compression would help that
I think that's fp error with the UVs, give a little padding in the texture
oh yeah absolutely
i was just about to say how I thought that was the case but setting clamp to edge didn't fix the issue
however, it doesn't look like I ever actually set clamp to edge?
oh I did but only in one function
i appear to have a createTexture() and loadTexture()
odd
fixed now
alright I want an automatic backup system
so I think ill have a ghxl1 (like blend1) that changes are automatically saved to every 10 or so edits
done
hmm
i cant imagine naming both a struct and the namespace its in a is good idea
namespace Level
{
struct Level
{
// ...
};
}
Maybe the namespace could be called LevelUtils? But imo that undersells its integrality and makes it sound optional
namespace YouNeedThisForLevels is a bit long
thoughts?
anyways i got bored and wanted to install arch on my pi zero 2 but accidentally did this
yikes
fortunately nothing important was on it
my pi 4 can do usb boot, could you do that with a zero 2?
i think thats a lot to ask for considering the only io is a single micro usb
I'm sure i could get something working but ill just buy another card
anyways funny story
i fell asleep listening to music last night and woke up at 5 or 6 am, and at that point autoplay had taken over
playing this absolute banger https://youtu.be/xz5sJbAhp0U
Reservoir Recordings is a label division under award-winning independent music company Reservoir. The division markets and distributes a variety of the Companyโs recorded assets, including labels such as Philly Groove Records, Amherst Records, AVCO Records, Jamdown Records, and Easy Street Records, as well as recorded music from artists includ...
this is one of the best sounding snare drums ive heard in my life
Neat album art
I woke up at 3am from a fever nightmare
I would have preferred to wake up to this
rip
fever dreams are awesome but I'm terrified to imagine what a fever nightmare is like
I dreamed that I had overheated and received brain damage from cooking my brain with the fever and was screaming for help but could barely hear myself or orient myself since my senses were all confused
must be bc of the spinal injury
I think it was because I fell asleep wearing the hood of my sweatshirt
ah yeah
The most exciting fever nightmares I've had preceded vomiting, when you're asleep and on the path towards vomiting your brain comes up with a post hoc explanation for the cause of your nausea
On 2 occasions I've dreamed of seeing eldritch horrors or looking into hell and the sight immediately causing me to wake up needing to vomit even though most likely I was going to be sick anyways and the dream was just back-explaining why
Lmao cruelty squad flavored fever dreams
theres another video i could send but it contains clips of that russian severed dog head experiment which might break the rules
I am proud to report that main.cpp has no raw gl calls
only raw vulkan init calls, right?
Time for 800 lines of render.cpp 
less than 300 actually
For now
this is an unoptimized tile renderer after all
the editor has all the features I want for now so I guess it's time to add another tile type
probably a sloped tile
this looks good https://www.danjb.com/game_dev/tilebased_platformer_slopes_2
some weirdness
std::find_if(result.begin(), result.end(),
[](std::vector<int>& v){ return true; } )```
this doesn't compile. result is an std::vector<std::vector<int>> and for some reason the error is that the iterator type can't be converted to bool
oh nvm its talking about the function return in my if statement ๐
Bruh, I went to check cause it seemed completely right to me
trying to find something in a 2d list kinda sucks
especially if you want indices over iterators
windows is hell
spending the last hour installing updates on my nvme?
Just a moment...
Just a moment...
install linux
already my main driver
i think i just accidentally bricked my windows install so I'm gonna delete the partition and install windows to my other tiny ssd
ill probably have to physically remove the main drive tho bc the windows installer cant seem to comprehend the existence of multiple drives
delete windows
doing all this wild stuff without making a single backup
oh its a glorious sight to see
kinda disturbing that grub still reports finding windows
Grub just has what's in its config
If you run something along the lines of "grub-mkconfig -o /boot/grub/grub.cfg" it should remove the windows entry as it rescans the operating systems
well, its finding the windows boot manager
You can probably just remove the /boot/efi/Microsoft folder?
And use efibootmgr to remove the entry from your bios
thats the thing, I did, and it keeps coming back 
this is the closest thing to a virus ive ever had
that always reminds me when i update uefi keys, because those involved strings always have "KEK" (key exchange key) in it
uefi people know their memes
pain programming slopes
i think the problem is with the collision detection
yup\
for some reason my algo isn't detecting a tile unless the player's top is under the tile's bottom
and its somehow not an issue with the aabb vs aabb algo
well whenever im no longer too tired too look at code ill finally setup a debugger and figure out why
i wonder if you could use box2d
I'm terribly uninterested in using third party physics
probably not necessary unless you need full rigidbody physics
yeah I was about to say for this kind of game you probably don't need full blown physics
yes, yes
welp i went thru the painful process of installing windows again
its now on my extra sata drive
to be able to implement slopes? ๐
no
man gdb really giving it to me straight
It's OK it can't be that bad. Get it done then come back later once you understand it better and refactor it
deccer skincolor dox
Some people find it boring but I think it's great
Like yeah it's slow, but that's part of why it's cool
You don't need to be some 400IQ philosopher film critic to appreciate it, if anything it's tapping into very basic emotions
It just requires patience to pay attention to, it's not something you throw on for a quick movie night
The ending is weird I have zero idea what it means and I don't really care
When I watched it with my friend it didn't bother me that I didn't understand the ending, whereas it made him furious lmao
evangelion for star wars fans
i really love media with endings that are impossible to understand
like a plot twist but the twist is that you're stupid
How would you end a movie like that anyways
I'm sure there are a variety of ways but endings are overrated
Requiring every story to have a concrete Hollywood ending is an unnecessary limitation
yeah
i loved how the movie started with 2 minutes of a black screen too
apparently they predicted the neccesity of dopamine detoxes
and yeah i wholeheartedly agree that too many movies have far too much diologue, especially unnaturally sounding millenial slop diologue
games too by extension
I guess that's postmodern art? idk too much about art
Having no dialogue for the first 30 min is neat too
Like I wouldn't want every movie to be like this but as a novel experience it's excellent
One of my favourite films, I have it on laserdisc
The effects are so good
Peak kino mentioned
i do not understand
kino is a cool russian band
i know that, but when was it referenced lol
it just means a really good/cinematic movie
oh sick
"Kino" is "cinema" in a some post soviet countries
that was given, didnt know grubbi lacked that much of information hehe
Isn't Kino also Cinema in german?
@raven halo Have you seen Lawrence of Arabia?
Since you managed to sit through 2001, I think you can handle it now
Also Ben Hur, must-see
both added to the list
yeah I know zero things about other languages
except spanish unfortunately
i think ive said it before but Heat is a favorite of mine @worldly acorn @prisma otter
I've only seen the bank scene I should watch the whole thing
You will like Ben-Hur a lot I suspect
its the only movie ive seen people praise for world building lol
1959 or 2016?
59
Doctor Zhivago
since we're talking about classic cinema
that's one of my favorites
it's great if you've read tolstoy books like war & peace and anna karenina
nah
the only books Im planning to read in the next half year are Three Felonies A Day and A Short Stay in Hell
well the movie is still very good in any case
it is very epic
just kind of movie you don't forget
yeah its on the list now too
the books I mentioned are not necessary, they just add a ton of context to the history
they are also like 1K pages each
idk if I said but I thought blade runner was very boring
I have never liked the original blade runner, besides the aesthetic
I love the aesthetic
Going through Witcher rn. Pretty light books(300~ pages each) which was quite surprising for me. So far can recommend, ate through 3 of those in a couple of weeks
I cannot take the postmodernist film wiki article serious when it calls star wars postmodern
anyways, I think for now I should make the player controller real good
since that's strongly linked to the player character animation, I should probably start drawing the dude
Same director as Lawrence of Arabia, David Lean was the goat
Bridge on the River Kwai was also him
the real masterpiece:
To translate for the people in Europe. A blitz is a play in american football
welp college begins again tmrw
hmm I think it would make more sense for shaders to be confined within the renderer
I don't see much use in exposing that to other systems for now
That's how mine works
On the game side the entity basically just is given a string shader name that is used to bin it into the right stage in the renderer
Mine uses shader explicitly although you could also have a more abstract concept of a "material" too
Personally I do it explicitly with shaders because it makes it usable for arbitrary effects like fullscreen quads etc that aren't really a physical material per se
But the game doesn't need to know anything about the shader other than to have some way to identify it
For me the the shader selection is just exposed as a set of flags
the object specifies which features it wants and the renderer selects the shader
Uniforms are consumed passively for me
That's more of the ECS way anyways
The entity just has whatever properties and the renderer knows which ones to harvest to fill the uniforms
If the entity doesn't have the right property the game crashes ๐
I suppose you don't have different materials that could potentially use different shaders?
You can put any shader on any entity as long as it has the right components
Ah I see
for me, you put a "mesh" component on the entity and that can reference a material
the material has a some flags
It's just not going to work if you have e.g. a textured mesh and try to apply some monochromatic shader that's expecting a Color component that describes what color the monochrome shade should be
You'd have to add the extra component
I see
enum flags {
DOUBLE_SIDED = 1,
ALPHA_TEST = 2,
PARALLAX_MAPPED = 4,
SHADOW_ALPHA_TEST = 8,
NORMAL_MAP = 16,
COLOR_FLAGS = DOUBLE_SIDED | PARALLAX_MAPPED | NORMAL_MAP,
DEPTH_FLAGS = DOUBLE_SIDED | ALPHA_TEST,
SHADOW_FLAGS = DOUBLE_SIDED | SHADOW_ALPHA_TEST,
ALPHA_FLAGS = ALPHA_TEST | SHADOW_ALPHA_TEST
};```
Its all in the mask for me
That's all stuff I hide inside the renderer
But that's because my whole renderer is basically hard coded
There isn't really any user configurability
It's modular but to add a new rendering technique you need to modify the code it's not something you can set up through configuration alone
Well yeah you can't add a new technique without modifying my code either
you just get a couple options you can combine
almost certainly fine for my use case
yk a few days ago I wrote an aabb vs level function that im now realizing is kinda useless
i spent an embarrassing amount of time on what amounts to a 2d array extractor
it's always nice to delete half of main.cpp each time I add another file to my codebase though
That sounds about right
I like starting with a big main.cpp and then breaking it up as I go yeah, eventually it just becomes a tiny function
it sometimes feels like my progress grinds to a halt as main shrinks
How can you say you've progressed if you don't measure your main.cpp in mouse scrolls per hour
main was over a thousand lines in my gl sandbox lol
if you unity build it still is a single main.cpp 
you gotta be kidding me
i was trying to figure out what gravity I would need to halve a jump height and ended up integrating the velocity equation in desmos just to find out all I need to do is double gravity
well to be fair the relationship isn't linear
it's 1/x
that was sad
i really gotta do my own math more
i guess it's not visible in the video but for some reason if I press up against a tile to the right ill get stuck on it and have to hold the left key for a while to get unstuck
and this doesn't happen on tiles to the left
have you looked at box2d
nope
im good off that
my collision resolution is kinda stupid because I just move the player the opposite of that frame's displacement
fixing that would probably resolve this
took a few iterations
but it's beautiful
// Will return true if policy() ever returns true
bool aabbVsLevel3(const Aabb& aabb, const Level& level,
std::function<bool(const glm::ivec2&, int)> policy)
{
glm::ivec2 lMin = glm::floor(aabb.min);
glm::ivec2 lMax = glm::floor(aabb.max);
int width = lMax.x - lMin.x;
int height = lMax.y - lMin.y;
for (int x = lMin.x; x <= lMax.x; ++x)
{
for (int y = lMin.y; y <= lMax.y; ++y)
{
if (!(x < 0 || x > level.tiles[0].size() - 1 || y < 0 || y > level.tiles.size() - 1))
{
if (policy({x, y}, level.tiles[y][x]))
{
return true;
}
}
}
}
return false;
}
player controller's starting to look real pretty
are you gonna have fancy stuff like wall jumps?
or maybe thats an ability you acquire later in the game
i can see the little player throwing its arms around like a ragdoll when jumping and hopping and gliding around
without too much spoiler i believe the game will have a more horizontal emphasis so more like ducking/sliding and vaulting
anyways existing bugs:
- slope doesnt carry the player high enough to clear adjescent full blocks
- a slope can push the player into blocks above it
- vertical collision uses legacy code and has no resolution for hitting the bottom of a slope block while going up
all very solvable, #2 might use recursion or not, who cares
afterwards i gotta animate the dude
im having a few weird glitches when the player touches a tile to his right
i wonder if this could be due to floating point precision issues
I understand now
if the right side of a hitbox is at x=16 and the left side of a tile is at x=16, the collision detection function assumes theyre touching
which is not consistent with the rest of the engine
well that's not necessarily true
its just that the left side correction seems to push the player out a tiny bit beyond flush with the tile
I'm struggling to understand why though
well i suppose it probably could be precision errors so i think what ill do is
- count AABBs as intersecting if the edges touch and
- add an epsilon to the collision resolution
so to achieve 1 I need to subtract epsilon from min before flooring methinks
bruh
im looking for std::nextafter, not epsilon
this is getting ridiculous
this code is munted
I LOVE FLOATING POINT I LOVE FLOATING POINT I LOVE FLOATING POINT I LOVE FLOATING POINT
That seems like some other issue unless you're testing at enormous distances from the origin here
well it is contact resolution
problem is the resolution values are so small its not actually moving the player position
so he stays inside the block
what does the code look like?
maybe I should just std::max(resolveX, 0.0001f) or something like that rather than messing with epsilonisms
it looks like you are snapping in the wrong direction in the video
yeah it seems like the logic isn't stable when they're intersecting
are you sure its not some sign somewhere?
it looks to me like generally it's not consistently finding the shortest path out of the block as the resolution vector
particularly when there's already some overlap involved
well shouldn't it come out the same direction that it came in?
like you could just back out in the reverse direction of the velocity vector
vertical and horizontal collision are separated
but why?
it made sense to write it that way
like so
pos.x += displacement.x;
doHorizCollisionRes();
pos.y += displacement.y;
doVertCollisionRes();
so by the looks of my gameplay (pre-video) and the values im reading off the debugger, vertical collision resolution is failing to push the player out of a block
so when it goes to horizontal collision in the next frame, the player is still inside the block below it causing any horizontal movement to push him out the opposite direction
the video was after I wrote in some epsilonisms, and that's the botched result
im gonna instead try this now
you should resolve it as a vector
other games push out to a cardinal direction because usually they properly calculate the shortest distance out
which is off to one side
you can find it formally via SAT, but you can probably just find min(move out x, move out y, move out by the delta position vector) and get good enough results
though I'd recommend using SAT, read the slides erin catto hosts on box2d.org