DemoSystem - A simple demo framework
category: code [glöplog]
The only reason "demosystem" has a framerate limit is because it's rotating objects with "x++;" ;)
ah, the old good fixed-vsync rate platform approach :)
reminding me of DOS stuff solely using VGA vsync poll for frame synchronization, eventually slowing the pace down if retrace is missed :)
reminding me of DOS stuff solely using VGA vsync poll for frame synchronization, eventually slowing the pace down if retrace is missed :)
Adapt algorithms to be a function of time so you can play backwards etc and at different speed. Helps a lot debugging. Obvious problems effects with physics, but can precalculate positions etc, after all its a demo
Thanks anyone for the feedback, I really do appreciate it! Even though it looks like 'bashing', it does point me to the right direction of where this should be headed next update comes around! Thank you for the time you took to look at the code and how this is modeled, and outline improvements on how this should be structured! :)
Quote:
But I'm open to suggestions.
Surely you have considered TOML?
I'm quite happy with it lately for most application configs and even as a human-extensible serialization format in some cases.
will try :) thx!
Quote:
Quote:But I'm open to suggestions.
Surely you have considered TOML?
The 90s called and want their INI files back ;)
Bikeshedding in full force.
@Gargaj : I learn so many colorful "technical english" expressions from your posts, it's ridiculously fun ! Please write amusing, "coder-culture" stories. (actually not joking here)
We had a couple of "scene fiction" stories in Hugi:
- A Scenish Tale
- PsychoJournal
- The King of the Scene
- A Scenish Tale
- PsychoJournal
- The King of the Scene
YEAH ! Thanks a lot Adok ! I'm gonna read this and comment ! :D (also, I may have already read some of them (?) since I used to read diskmags A LOT back in the days, we'll see !)
"PsychoJournal" is the funniest of the three, though clearly on the unrealistic side... It made me laugh several times (the insane ambitions, the extent of the thing, etc). Also : you know that feeling that Internet has turned to shit these last ten years ? That because Filipe's software has been made available to corporations, and they're not even able to make it work properly ! That's why. :D "Luckily", chatGPT is coming...
The idea for "A scenish Tale" is a bit nostalgic, and seems like a classic "life experience" for many 90ies guys. The end twist was nice.
"The King Of the Scene" seems more like an inside joke. Funny, but not that much.
All in all : actually not bad ! Your style is a bit on the dry side, yes. But you always keep action going, which is a good thing for this kind of writing.
The idea for "A scenish Tale" is a bit nostalgic, and seems like a classic "life experience" for many 90ies guys. The end twist was nice.
"The King Of the Scene" seems more like an inside joke. Funny, but not that much.
All in all : actually not bad ! Your style is a bit on the dry side, yes. But you always keep action going, which is a good thing for this kind of writing.
The config implemented is, as mentioned, for dev purposes and mostly to try different settings on the fly without recompiling the exe all the time. That's why generating the config file is turned off by default. Now then, I tried implementing an .ini library but the size of the framework became significantly bigger for something as trivial as the configuration file. I wanted the framework to be as much simple and small as possible, hence a small config file with only the important values.
For actual demo development you will want a way to change a bunch of stuff without recompiling (think: shaders, camera positions, textures, effect parameter values etc). Even a minimum solution for that is a lot bigger than loading some config values.
Preacher, I agree. When all this comes to the table, I will have to look at solutions like TOML, etc. Another thing I'd like to mention is that the IDE that was used was Codeblocks and particularly this version which features the x64 compiler so that people can edit and/or compile it for themselves.
Any reason for not using, y'know, Visual Studio, being the most widely used and free IDE?
None, in particular. Maybe I prefer more indie developed tools, I guess.
Quote:
Any reason for not using, y'know, Visual Studio, being the most widely used and free IDE?
I prefer VSCode.
Visual Studio is loading forever, has shady menus for simple tasks like compiler options, its code completion sucks big time & also its installer / login required behavior is just awful. And is it really free? I remember it had a pretty decent price tag, but I could be wrong nowadays.
IDE is a matter of personal preference tho and frameworks should not require you to use a specific IDE imo. Some want the bloaty annoying-to-control "I only have to press F5 and the demo runs" experience, others like myself just want a smart text editor that's not in your way when you're controlling stuff manually / with CMake.
My preferred (and simple) solution for updating things on the fly without (mostly) recompiling:
+ "Reload" shaders every 1 sec while playback. Edit shaders through visual studio and save on the fly.
+ Have a multitude of input values from mouse/keyboard or midi (see Nanocontroller2 by Korg). Then in code you can say (for example):
glTranslatef (input->value[0], input->value[1],0.0);
value[xx] are mapped to your midi controller or mouse. Your display also shows the values of these things, so when you're happy you can hardcode them (* use no other external files for storing this info). You will then write:
glTranslatef (0.525,-6.51,0.0);
and move on to the next "problem". Obviously you want to solve one problem per run, such as (in this example) the placement of the object.
Then, have the following options, again mapped on midi:
A key to pause or unpause (DeltaT=0)
A key to move time forward and backward by half sec
A slider to move "cue time" (in seconds)
A key to run time from cue time.
A Slider to control speed (from 10% to 200%)
You mostly will be using pause / cue and run. IT becomes second nature.
--
I hardcode everything - there is no config or camera path files etc. - but then again the shaders are themselves some sort of "config" file if you think about it.
My "fade outs" would never be in C++ code, but in shader:
if (time>10.0)
gl_FragData[0].xyz*=clamp ((time-10),0.0,1.0);
+ "Reload" shaders every 1 sec while playback. Edit shaders through visual studio and save on the fly.
+ Have a multitude of input values from mouse/keyboard or midi (see Nanocontroller2 by Korg). Then in code you can say (for example):
glTranslatef (input->value[0], input->value[1],0.0);
value[xx] are mapped to your midi controller or mouse. Your display also shows the values of these things, so when you're happy you can hardcode them (* use no other external files for storing this info). You will then write:
glTranslatef (0.525,-6.51,0.0);
and move on to the next "problem". Obviously you want to solve one problem per run, such as (in this example) the placement of the object.
Then, have the following options, again mapped on midi:
A key to pause or unpause (DeltaT=0)
A key to move time forward and backward by half sec
A slider to move "cue time" (in seconds)
A key to run time from cue time.
A Slider to control speed (from 10% to 200%)
You mostly will be using pause / cue and run. IT becomes second nature.
--
I hardcode everything - there is no config or camera path files etc. - but then again the shaders are themselves some sort of "config" file if you think about it.
My "fade outs" would never be in C++ code, but in shader:
if (time>10.0)
gl_FragData[0].xyz*=clamp ((time-10),0.0,1.0);
Quote:
And is it really free? I remember it had a pretty decent price tag, but I could be wrong nowadays.
Has been since 2005.
Quote:
IDE is a matter of personal preference tho and frameworks should not require you to use a specific IDE imo.
If it's something intended for beginners, swim with the mainstream for the beginners' sake.
y no imgui? :)
imgui is fantastic. It really is. Add that into it as well..
But having a live gui with sliders is a pain in the ass because you have to move the mouse, click on things, move the mouse back to some other code, focus/refocus etc. Best to use left hand for twicking and right for coding. I'll send a photo...
But having a live gui with sliders is a pain in the ass because you have to move the mouse, click on things, move the mouse back to some other code, focus/refocus etc. Best to use left hand for twicking and right for coding. I'll send a photo...
nanokontrol2 <3 you can also doodle some nice acid with it while Defiance is working on version 1.01b of Simple Demo Framework(TM)
You need to be able to run both hands in parallel and independently. So better not skip your scales practicing on the piano.