Game Dev Engine #8. Font Kerning.
2:36
Game Dev Engine #6. Mouse Input.
4:06
Пікірлер
@delphicdescant
@delphicdescant 3 күн бұрын
Better keep a close eye on textbook publishers to make sure they don't steal your video to use as cover art.
@JDoucette
@JDoucette 3 күн бұрын
Ha ha, thank you my friend, I will keep an eye out!
@paraaki
@paraaki 8 күн бұрын
Nice work. ❤
@paraaki
@paraaki 8 күн бұрын
Nice work! ❤
@Xonatron
@Xonatron 9 күн бұрын
Wow, this is amazing. You can explore these "formulas" and I have not seen anything like this before.
@JDoucette
@JDoucette 8 күн бұрын
I know -- I randomly came across a Veritasium video on the butterfly effect, and it shows this strange attractor, and even explains it quite quickly (a 2D slice of fluid dynamics, where 3 variables are being tracked, which you can plot in 3D), and how it came about it (trying to replicate a simulation, which failed to replicate, so he thought the computer was broken, and then simplified the math up until this simple 2D slice while trying to find the "bug" -- having found chaos theory instead). Anyways, the video shows a few angles, and even explains a few variations well. But I've never seen anyone show the equations in detail, up close, like this before.
@MichaelPohoreski
@MichaelPohoreski 10 күн бұрын
LOVE the showing the 3 principal axes as a plane with dots! Q. Is there a reason one of the plane axes isn't fulling showing? i.e. Right side @2:55
@JDoucette
@JDoucette 9 күн бұрын
@MichaelPohoreski Thanks! It gives far more context, especially when spinning and zooming around an abstract (though based on physical) graph. A. Are you watching in low resolution? The planes are always visible for me. I only draw 3 of the 6 sided cube. I suppose I could draw all 6?
@JDoucette
@JDoucette 9 күн бұрын
@MichaelPohoreski Or I could draw the planes and axes where they actually exist... the ranges of X, Y, and Z are between -20..20, -30..30, and 0..50 respectively.
@MichaelPohoreski
@MichaelPohoreski 9 күн бұрын
@@JDoucette Nope 4K. Ah, it is just a bad perspective. I rewound a few seconds and counted the actual dots. They are are all there. False alarm of user error. =P
@MichaelPohoreski
@MichaelPohoreski 9 күн бұрын
@@JDoucette Not sure if drawing all 6 edges of the cube would help? I don't believe so. Worth a shot to test if it adds or subtracts from the main image.
@JDoucette
@JDoucette 9 күн бұрын
@@MichaelPohoreski I bet I know what happened re: bad perspective and dot counting. I have the FOV very wide. When you have even a large FOV like Doom 1993 at 90°, the dot pattern of squares will make an alignment at 45°, which is not normally seen, so you're not used to processing it. Go wider FOV, and more patterns arise. It's similar to the Golden Ratio being the most irrational number, and the "Tree Gaps and Orchard Problem" (search Numberphile for a great video). I think too many of these patterns at such a wide FOV is hard to process when you're not used to them, and also had no context that the FOV was wide to begin with, so you didn't expect to see them.
@MichaelPohoreski
@MichaelPohoreski 10 күн бұрын
This could be the next 3Blue1Brown ... just need to add some explanation in a follow up video ;-)
@JDoucette
@JDoucette 9 күн бұрын
Well now. That's quite the compliment!! Does this mean I have to actually go out and learn what this is actually doing? :P I have a detailed description heavily based on other sources, which I reworded to suit my own understanding, but found that I had to leave it largely as-is. I think I need to make a few more of these simulations, and read a bit more, to truly grok it.
@JDoucette
@JDoucette 9 күн бұрын
For this simulation -- just as 3B1B would likely dive into explanations -- I would love to show the limits and how this works. Starting from different parameters, and seeing which ones being chaotic, and which one settle down. I am not sure how to covey that much information -- but it could likely be done. Perhaps even showing only those that become chaotic.
@JDoucette
@JDoucette 9 күн бұрын
This demo shows 50,000,000 dots. If you pause at the right time, you can see how close they are. I'm not even drawing lines between the dots! This could be rendered as lines with 1/100th or 1/1,000th the amount of vertices and still have the same fidelity. So I could really draw a lot of content at the same time.
@MichaelPohoreski
@MichaelPohoreski 9 күн бұрын
@@JDoucette Yes. :-)
@yds6268
@yds6268 10 күн бұрын
Nice! I subscribed because of my brief interest in old racing games, and now here you are, sharing my long-time interest in math and physics.
@JDoucette
@JDoucette 10 күн бұрын
I will return to the retro pixel pseudo 3D racing game engine eventually! :) I am happy you are enjoying these videos as well!
@adrikriptok7225
@adrikriptok7225 10 күн бұрын
Beautiful!
@JDoucette
@JDoucette 10 күн бұрын
Thank you!
@Xonatron
@Xonatron 15 күн бұрын
This is awesome.
@JDoucette
@JDoucette 14 күн бұрын
I have a bunch of additional ideas for this same shape. Using a Sierpiński triangle between the 3 nodes for each plane. Or using the point cloud I have here, but biasing it towards the edges of the triangles in each plane. That could be done in 3D, not just planes, as well, with 4 points per sub-object.
@firstnamelastname-oy7es
@firstnamelastname-oy7es 16 күн бұрын
It's very pretty
@JDoucette
@JDoucette 16 күн бұрын
Why thank you! :)
@MichaelPohoreski
@MichaelPohoreski 17 күн бұрын
Absolutely beautiful! Ignoring the Z-buffer is a nice touch. Reminds me of Monte Carlo approximations.
@JDoucette
@JDoucette 16 күн бұрын
Thank you! I felt it is Monte Carlo to some degree, since the triangular slices through the solid are not rendered as planes, but as a point cloud of possibilities. Though there is no progression of each point to the next -- every point is independently generated -- so it may not fit the true definition.
@mcha226
@mcha226 21 күн бұрын
Make this a screensaver
@JDoucette
@JDoucette 20 күн бұрын
That, my friend, is a great idea. This kind of road scenery can be generated forever. The artwork, not so much, so that would repeat a lot. But the road twists and turns could last hours even manually created, not even procedurally.
@JDoucette
@JDoucette 21 күн бұрын
POINT DEPTH SORTING: I saw a comment (since deleted), so I am sure others had similar thoughts: "... there is a point depth sorting issue ... points that should be in front seem to be displayed in back ... could just be a KZbin video compression issue." Not KZbin's fault! I am rendering them this way, as single pixels, depth-sorted. Then a post-processor enlarges them into circle. So what happens to depth sorting? The depth data is not present in the rendered texture, so it just combines the colors. Points grouped together in the distance are more dense (on 2D display), thus consuming more of the color-combination -- thus points further away seem more "powerful" to visibility. The effect is kind of cool, so I wanted to capture it before I do away with it. I plan to add depth-buffer storage to use during post processing in my next video. :)
@RingoStarr-key
@RingoStarr-key 22 күн бұрын
where do I go to try it out?
@JDoucette
@JDoucette 21 күн бұрын
I don't have it available as a demo. I've considered releasing the source code, but it's not a user friendly app at this time, and it's still in development. I wonder if I could release it on the web. It would need some work to be usable.
@Imphenzia
@Imphenzia 25 күн бұрын
Cool! Thanks for the detailed description too, very interesting technically!
@JDoucette
@JDoucette 25 күн бұрын
Thanks! The classic chaos game example is the Sierpiński triangle, which is 2D, 3 control points, and you move halfway to the randomly chosen point each iteration. It's a surprise to get beautiful order from chaos. But once you think about it, it makes sense: If you can peer into the future, by starting with the entire answer/result (Sierpiński triangle), take all points, and then move them all halfway to any of the 3 source points, you can imagine that you'll end up with the 3 sections that build the whole. It's not so simple to imaging if you start messing with the parameters and adding restrictions. :)
@tnmrvc
@tnmrvc 29 күн бұрын
im no expert but dig the technique/look, i love the flower fields
@JDoucette
@JDoucette 29 күн бұрын
Thanks for the note. I appreciate that. And this is with my terrible pixel art drawings (first time drawing flowers!) and all of the flickering aliasing (I want to add mip-maps, and handle when they invoke, but the GPU seems to want to control that itself). So it can be much, much improved. In any case, I agree with the sentiment -- these infinite fields of flowers are amazing, and I've wanted to see it done ever since Out Run pulled it off back in 1986 in the arcades...
@tnmrvc
@tnmrvc 29 күн бұрын
@@JDoucette are you talking about the grainyness of the flowers in the background when they come/move forward with the image? I guess that could be nicer but it doesn't matter, the overal crispyness and smoothness/speed of the image coupled with the vast sea of flowers is what gives it charm
@JDoucette
@JDoucette 27 күн бұрын
@@tnmrvc Yes, that's exactly what I meant. I also think I could "fill" the voids more on very steep hills (where you can see gaps in the flower lines). But, agreed, this is nit-picking, and the general aesthetic is what I love as well. I really have got to make a game out of this... :)
@Ali1986Koksal
@Ali1986Koksal Ай бұрын
I still think the pseudo 3d effect looks DECENT even today personally.
@JDoucette
@JDoucette Ай бұрын
Yes, for sure. I think pixel density has to be respected to really pull it off, but sprites could look flat even in 320x200 resolution, so the way it's presented matters a lot.
@lufknuht5960
@lufknuht5960 Ай бұрын
Is there a top level? Does the game have an end?
@JDoucette
@JDoucette Ай бұрын
There is no top level. I played the game until the score wrapped, and noticed I was getting more 1UPs than I was losing, so I considered the game beat. If you search "Xona Parsec" you'll find a great page of amazing facts about this game. This caused fans from around the world to write in with details I didn't know. See the section at the bottom "Fan Feedback: Parsec Cannot Be Wrapped Indefinitely?" -- there appears to be two reasons for a Kill Screen: 1. sprite automotion using 1-byte -128..+127 causes the speed to wrap and enemies fly in the wrong direction, and 2. the larger enemies appear closer and close on each level, so perhaps eventually they are too close (though you can position your fighter to be in front of them before they appear, but that's unwieldy due to the slow acceleration of the starship).
@JDoucette
@JDoucette Ай бұрын
Someone should make a ROM hack that allows you to start on any level, and see what happens. I suspect all data is stored in bytes, except for the score (though the last two digits are always 0, so they are not stored). This would mean the levels will wrap after 0..255 or there would be some oddity if it were a signed byte, -128..+127. Either way, it should reach 0 then 1 again. Outside the unlikelihood of surviving enemies that fly across the screen too quickly, I wonder if there are any actual game crushing bugs for a true kill screen.
@KnakuanaRka
@KnakuanaRka 2 ай бұрын
One thing you could do with these is try weighting the different tiles; giving them similar frequencies to the rate they show up in the original might make the result look closer to the original, compared to how examples like at 7:27 and 9:12 tend to get dominated by the crisscrossing lines and have very little blank space.
@JDoucette
@JDoucette Ай бұрын
Thanks for the idea. I actually have this coded already, several months ago, but not showcased due to artifacts that are caused ... but I should showcase it anyway, just to show off what happens in a trivial attempt to maintain density. The attempt to reach the density desired causes the natural flow of art generation "spreading" to mix with anxiety (yes, I'm going full A.I. in my description) that it may miss the mark, so it immediately rectifies it. This is bad. It causes a lot of activity mapped to the dynamic growth of the art -- what does that mean? Imagine that the resultant image's density hasn't been decided yet (because it hasn't), and it only has the simple view of the next few pixels (because that's how it works), so it tries to solve any discrepancies with those pixels -- right then and there. This means as soon as you get too much white, the very next pixel has to be black -- it just has to be, (unless blocked by lack of a pattern, but that only stops it for a few pixels). Now finally we have enough black. Oops, too much black! Now the next pixel has to be white. It just has to be. Back and forth. If algorithms could feel, this one would be looking for a vacation.
@KnakuanaRka
@KnakuanaRka Ай бұрын
@@JDoucette That sounds like you’re weighting things in terms of the total number of them generated. You don’t need to do that; you can just have the chances of each one being picked during a collapse be weighted by its original frequency. For example, if there are twice as many blocks of feature A as feature B in the source, and a collapse can be either A or B, pick A 2/3 of the time and B 1/3 (like by putting two As and a B in a group and picking one at random). That should more or less get the distribution you need without falling afoul of the gambler’s fallacy. It may get a little messier with the various orientations a tile can be in (where different tiles can map to one feature), but it looks like you have that handled already.
@JDoucette
@JDoucette Ай бұрын
@@KnakuanaRka Yes, you are quite right -- me trying to meet the goal, but trying to meet it too quickly, is the problem with my algorithm. Your suggestion on the chances of being picked is nice, because it's more like true randomness, vs. even forced distribution -- which are surprisingly different. However, this also has issues -- since it's a dynamic system, it can get into modes where there are simply no other choices (or few choices) ... so you just never really get a chance to choose the colors you need. It's like a 6-sided dice, for the 6 colors you expect to see, each 1/6th of the time: suddenly a 3 is rolled, which only allows a 4 or 5 from there. Even if 4 and 5 both then allow all 6 colors, that 3 will cause you to get the 4 and 5 more often than the rest. Yet, I still think this may be better than my original algorithm. I will make a note of this to try.
@JDoucette
@JDoucette Ай бұрын
@@KnakuanaRka Following my thoughts above -- I think I can get out of this "oh no, I have to pick 4 or 5 AGAIN" mess by another means: The choice of the location of next pixels I should draw to. There are 2 steps: 1. pick the spot that has the least options (sort of like, "oh crap, choices are limited here, let's settle it before something else happens and reduces the choices to zero"), and 2. decide what pattern to collapse to in that spot. We were focused on step 2 in our discussion. How about focusing on step 1 as well: I don't HAVE to pick the worst case (least option location). I could pick from the bottom 10% of least option locations... then poke around at a few of them, which opens the options up, and then do your "pick A 2/3 of the time and B 1/3" with much more freedom.
@KnakuanaRka
@KnakuanaRka Ай бұрын
⁠​⁠@@JDoucetteYeah, sounds like that might help in terms of ensuring you can get closer to the wanted proportions. Or weight them depending on the amount generated like you said, but make it a smaller factor combined with the expected proportions I mentioned (to make it less sensitive), and see if you can find different ways to measure the proportions (like see what the difference in proportions would be compared to expected if all the remaining features were filled in proportionally to expected) so that it doesn’t veer hard to one side over a tiny difference.
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
This video really inspired me about a week ago right before i should've gone to bed, I'm glad i stayed up though as i drew some sprites, which eventually turned into a new breakout game on my website, with a level editor and a bunch of level packs! written in rust of course haha. thank you very much for the inspiration. i'm gonna record a quick little showcase video and put it on my channel now
@JDoucette
@JDoucette 2 ай бұрын
One of the coolest things about making games/demos and sharing is seeing the inspiration it creates for other people. Thanks for letting me know about it, since it really adds value to the work I do.
@JDoucette
@JDoucette 2 ай бұрын
I just checked out you video (I'll post a comment there shortly) and your game demo. That is so cool. So yeah, you made enough of a GUI to get things moving! :) -- very nice that you have an editor. Most indies, including myself, don't take this step first. The sprites and graphics are very reminiscent of my own minimalistic single-color pixel-art game. I'm glad that I am not alone in liking this very minimal art style -- as I've been wanting to make some more demos out of my Xona System 8 engine like this.
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
@@JDoucette I'm really glad you liked it! inspiration is a great thing and I'm very glad you could inspire me to make it. I was very inspired by many things from your game as they were just such good ideas, like the powerups and general overall aesthetic. im really excited to make more projects, maybe a nice gui system one day! haha
@JDoucette
@JDoucette Ай бұрын
@@jumbledfox2098 Apologies, have been busy. A few things stand out that make me happy about this. One is that this very simple art style actually has promise, which means I can throw together quick demos that focus on gameplay and see if they are fun, while literally making 1 color art. Second, is that the power up systems here are really just a focus on gameplay and cool-factor -- again possible since the game comes together quickly with a simple backend engine and no real art. Working from first principles, you can make even a pong / breakout / arkanoid clone into a fun game. You may not have noticed, but the ball speed always gradually increases, even if you get the slowdown. This may also be a fun 2-player game.
@JDoucette
@JDoucette Ай бұрын
@@jumbledfox2098 And yes, make that GUI !!
@Xonatron
@Xonatron 2 ай бұрын
We could make a demo out of this. I could do the music.
@Xonatron
@Xonatron 2 ай бұрын
A demo based on amazing transitions.
@JDoucette
@JDoucette 2 ай бұрын
I agree. Demos were always about interesting effects and the transitions between them. And obviously with the music.
@JDoucette
@JDoucette 2 ай бұрын
@@Xonatron It reminds me of the blog post "The importance of transitions" by Shawn Hargreaves --- where he quotes Johnny Christmas -- "the secret to making a game feel polished and professional lies in the transitions".
@Xonatron
@Xonatron 2 ай бұрын
@@JDoucette 100%.
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
out of curiosity, how do you transition between each graph? the effect is really neat
@JDoucette
@JDoucette 2 ай бұрын
Thank you. You may want to look at my other videos for similar examples. I morph using a smooth-step interpolation (similar to a sine wave) between the two graphs. Each graph is weighted based on the interpolation. If I clicked through more graphs before the morph is finished, it also morphs those graphs at the same time (I do this at the very end, where I run through 4 equations at once to return to the 3D graph before fade out -- which gives the very strange morph effect where you can still sense the y=x line from 3 or 4 equations back). The individual equations are multiplied by the percentage morph value (0..1) and added. I don't even ensure the sum of the weights is 1 (it always is between 2 graphs, but not if a 3rd or 4th is involved), since math is math, and it naturally has... solutions. :)
@unclvinny
@unclvinny 2 ай бұрын
Great stuff!
@JDoucette
@JDoucette 2 ай бұрын
Thanks Vinny! Just trying things out! :)
@dottedboxguy
@dottedboxguy 2 ай бұрын
it should be possible to port the renderer to the gpu, right ? that way you'll probably be able to crank up the resolution of these graphs to at least 1080p (even tho the pixelated look has a charm to it)
@JDoucette
@JDoucette 2 ай бұрын
Indeed, you are correct sir. I have been pondering that. This video is 1920 x 1080, where as my others are not (because I love the pixelated charm look, and also because it helps with video compression). Thus, this was a test. I upscale to 4K (pixel perfect) to help with compression artifacts.
@JDoucette
@JDoucette 2 ай бұрын
GPU would help in numerous ways: Even a 32 CPU core beast is no match for thousands of GPU cores. It could render higher resolutions, render the lines more accurately (more sample points to avoid missing a solution), render the line more aesthetically (more sample points to thicken the line, and to do so in all directions). It has one issue, that it's not as abstract as my CPU model which allows me to render/morph 2+ equations at once. There are workarounds for this obviously, but it sort of has to be hacked in.
@dottedboxguy
@dottedboxguy 2 ай бұрын
@@JDoucette it depends on how you're approaching the algorithm, but it does sound like something that'd be a perfect fit for a fragment shader, it sounds very doable (maybe even a shadertoy for that matter !)
@JDoucette
@JDoucette 2 ай бұрын
@@dottedboxguy Yes, absolutely! I already have a basic proof of concept running in ShaderToy I made a while back, for one of my older Graph-All videos ("#5 Multi-Core Complex Equation Real-Time Render"). Let's see if I can link to it here: shadertoy.com/view/cscXRr It is under my account, JasonD.
@Xonatron
@Xonatron 2 ай бұрын
It has the IDKFA soundtrack.
@JDoucette
@JDoucette 2 ай бұрын
@Xonatron You can choose between the original and this remix. It's pretty cool. Every song is remixed making it interesting to play through all of the levels again.
@JDoucette
@JDoucette 2 ай бұрын
So yeah. I found this and thought it was a bug in the new Doom I + II ReRelease -- but apparently "wall running" is a known thing from the original game, and it's called "wallrunning". Welcome to 1993. I guess there were so many motion-stopping wall glitches that I just never got near them when I played the crap out of this game back in the 90's, so I had no idea.
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
i've written a few comments on your videos now, i'm excited to see your responses to them haha, but GOD your work is just so inspiring!! the amazing aesthetic, the whole thing, it's just brilliant. it's really making me want to make something similar, so thank you <3 another point - how do you handle window creation and UI elements? i'm used to making immediate mode UIs as, well, they're just so simple, one function called button() or whatever in the main loop and it just works, however they're rather difficult for making nice layouts unless you get clever (which i certainly do not haha). I'm just wondering how each one stores its maze canvas and all that stuff. i'd love to hear more
@JDoucette
@JDoucette 2 ай бұрын
You probably noticed the aesthetic improving each video -- a simple backdrop to the text to make it stand out, and the shadows on the windows are oh so easy, and recommended by viewers, and it was on my list, but it's just a matter of getting to it. When I make an improvement, it stays for all time; so it's nice to always be improving a little thing here and there, as you get on with the main work.
@JDoucette
@JDoucette 2 ай бұрын
As mentioned in another video comment, I just wanted to align text and images for presentation, so I made some rectangle struct, and then spaced them out next to each other -- and I thought these should just be windows. Then the stuff inside the window can align itself to its window, and windows can align themselves. It's about ownership. But once you have a window and it can draw itself, then its X,Y coordinate can change. Each window has its own render target (texture) so even the components that draw to the window just believe it's the entire universe. The window manager will draw them, and ask them to update, but each window just does its own thing.
@JDoucette
@JDoucette 2 ай бұрын
So yeah -- no immediate mode UI. Just a list/array of Windows, and the manager is in the main update/draw loop in the game system. Each frame, components are asked to update, then draw. The window manager is the only thing the game system touches (in this context). It hands off calls for update/draw to each window that was created. Each window has its own render target, so when each window calls its own things (see the example games I've made) to update/draw, like simple Sprites, it does so to the render target already set by the window manager. Thus these little games just are basic sprite movement/draw code, and they have no idea they exist in a window (other than its size info is made visible).
@JDoucette
@JDoucette 2 ай бұрын
This is also why it was trivial to have windows own other windows. In my case, I did this just like Win32 did, to allow for status bars, title bars, etc. -- since I didn't want each window to have to maintain its own view style, and font. Therefore, you can generate a window that has 2 windows inside of it: the title and the canvas. The games live in the canvas window.
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
@@JDoucette aaah, that's very wise and nicely done! i'm excited to make another UI system now haha
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
i remember writing a minesweeper game, which was all well and good, but the hard part was making it look nice! i wrote a custom immediate mode UI system, which while intentionally limited (no windows within windows, a 'draw_text()' call has only one colour, etc etc, didn't want it to go out of scope) was a rather leviathan task haha. I rewrote it a good 3 or so times from the ground up. I started off with just a button, then made a menubar at the top of the screen out of these buttons, added dropdowns to it, and then eventually popup windows with their own buttons, text, and number fields. I certainly cut some corners though... the window type (the options window, the winning and losing popups, the one that asks if you "REALLY want to quit?" when you press x) is just an enum, and then i had a switch statement that ran for every windows update loop depending on it's type to draw the right elements... not proud of that one haha. My text renderer didn't have any nice kerning, all it had was a wide bitmap of each character, and a hashmap (that I manually wrote hahaha) with each character's width. Feel free to check it out (jumbledfox.github.io/minesweeper ) i've been skimming through your videos and they're really really inspiring me to make more projects. thank you!
@JDoucette
@JDoucette 2 ай бұрын
Nice, just played your MineSweeper game. It works well, and looks great. I'll always love the low resolution, pixel art, and pixel fonts. I hear you on the complexities of programming UI components. It can be done quickly, hacky, and good enough for a pet project, but not enough for broad consumption. Once you start to do it right, it becomes its own project. But then, if you need good UI components for multiple projects, doing it right is the only way to fly. The windows style programming you see in Xona System 8 is literally from me trying to do 2D layouts for presentations, and after fumbling with hacks and finally making ownerhship boxes -- I realized, "hey, wait, this is just Windows ... lemme just do that."
@JDoucette
@JDoucette 2 ай бұрын
This font kerning started with Step 1. generic fixed width font, and then Step 2. at least measure the widths and remove empty vertical lines (most indie games do this, and it's super easy to handle programmatically), and the biggie Step 3. proper kerning (with no regard for aesthetics -- just the assumption that unneeded space is bad, which suffices) -- this is very hard since you have to fit, but not touch, the characters, and even characters beyond them! My favourite example is probably in the following video Font Animations -- where you have lowercase "r", then period ".", then a quote character """: the period nestles into the r and the quote, and the r and the quote will now touch. You have to prevent that, along with nestling too far into a character.
@JDoucette
@JDoucette 2 ай бұрын
Love this --> "they're really really inspiring me to make more projects." Keep it up! :)
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
it looks so amazig! the breaking is so juicy haha i love it. i tried making a platformer but collisions and physics got way too hard for me to implement :c
@JDoucette
@JDoucette 2 ай бұрын
I just had a look at your platformer, I think it would be great. Physics is hard -- though I did this overnight in a game jam, and thought I rocked it, it has one of those Super Mario Bros. 1 jumping backward through a brick to get to the Minus World collision bugs, and it even has a movement bug where you can moonwalk. It's astonishing how difficult it is to get perfect working code for moving a rectangle in a world of tiles that are smaller than it.
@JDoucette
@JDoucette 2 ай бұрын
I spent so much time improving the art for this little demo, and yet uploaded almost all of my videos (except for the last 4 with "New Art") of this platformer with the old crappy art that was thrown together for a game jam -- it really upsets me. :P
@jumbledfox2098
@jumbledfox2098 2 ай бұрын
@@JDoucette it really is shocking how hard something that sounds so simple can be! i think you really knocked it out of the park as it looks very responsive and snappy. especially for overnight! plus, those bugs give it charm haha. perhaps you could hide a minus world easter egg
@JDoucette
@JDoucette 2 ай бұрын
@@jumbledfox2098 Ha ha, of all of the easter eggs I've thought about, making a Minus World was never one of them -- but that's an epic idea. For the responsiveness -- there is no acceleration other than gravity, so it's very much like Mega Man where you immediately change direction. I also did not implement variable jump heights, so in this sense, it's like Contra -- it would be harder to implement variable height, but not too hard. I appreciate the kind words though!
@SandmanDP
@SandmanDP 2 ай бұрын
Holy crap! Knew it was only a matter of time before Xona was running Doom!
@JDoucette
@JDoucette 2 ай бұрын
Xona has been running Doom since 1993! :) It was the most immersive game I had ever played. Full screen, no HUD, stereo headphones, all lights off, middle of the night, and face super close to a large (I believe 15" at the time) monitor. I was only getting 4 hours of sleep a night back then.
@JDoucette
@JDoucette 2 ай бұрын
I was going to delete this video, and upload another -- since the E1M2 outside showcases great for this wall running, both in Third Person view, and in the overhead map view. But not now that you left a comment. :)
@JDoucette
@JDoucette 3 ай бұрын
@Halleluyah83 -- regarding your comment "В какой программе всё это сделано?" -- it was made in C# using MonoGame platform, which is a cross platform version of Microsoft's XNA. The program and rendering is my own software.
@JDoucette
@JDoucette 3 ай бұрын
For some reason your comment was deleted -- it's hard to tell from what source.
@GR4MPI
@GR4MPI 3 ай бұрын
really good
@JDoucette
@JDoucette 3 ай бұрын
Thanks! Glad you enjoyed. I need to get the curves working, to really show this off, but it's not so trivial (as you can see!)
@JDoucette
@JDoucette 3 ай бұрын
If anyone has ideas for aesthetic color palettes, please let me know. I'll give them a shot!
@tay-tmw
@tay-tmw 3 ай бұрын
inspired by your work. i've been exposed to a new world! can't wait to try this out for myself.
@JDoucette
@JDoucette 3 ай бұрын
That's so nice to hear! If you have any neat equations you invent or discover, please let me know. I'll likely record more morphing videos, and try out variations that are interesting.
@HakoHak
@HakoHak 3 ай бұрын
Duuuuuuude.... We need to talk, I have crazy material for you....
@blakeweaver6099
@blakeweaver6099 3 ай бұрын
"Hey man I added your absolute value idea" "Okay, cool, I che-" "Oh yeah and I also redefined how pixels work on a meta level" I can't wait until LSD simulator hits Steam
@JDoucette
@JDoucette 3 ай бұрын
Now I have to add new color palettes. More funky equations. Slower transitions. Transitions between multiple equations at once. VR play. Multi user parties / dungeons. ... Oh wait... what was I doing again? ... something about graphs ...
@DeepestDungeon
@DeepestDungeon 3 ай бұрын
how is the skybox texture drawn here? Same algorithm as for terrain but with no heights?
@JDoucette
@JDoucette 3 ай бұрын
Great question. The skybox is drawn like Doom 1993 does it. It's a 2D texture. Each screen column represents an angle 0..360 degrees around the player, which maps on a column in the 2D texture. This slice is drawn to the screen for the skybox. This means the angle is correct, but its view distortion is not -- as you rotate around, things stretch and enlarge near the screen edge, and the skybox should do the same, but it does not, just like in Doom. Doom's distortion was more pronounced, even though both Doom and my voxel engine has 90 degrees horizontally, Doom being 4:3 aspect ratio is showing more FOV vertically, which you can see the lack of distortion of the skybox not matching the extreme distortion of the foreground.
@JDoucette
@JDoucette 3 ай бұрын
In terms of rendering without overdraw, it also holds correct. So, you're correct that the algorithm is the same in some sense, since once I get to the end of the terrain in the distance, all I have left is to fill the skybox pixels, and that's exactly what I do. Any pixels hidden by terrain are not processed. Only visible pixels are processed.
@Shuey187
@Shuey187 3 ай бұрын
So cool to see it with color now! It really scratches the itch in my brain that loves this stuff.
@JDoucette
@JDoucette 3 ай бұрын
The coloring adds another dimension, as the prior video was only showing the value of the solution, where it is zero, thus it was really just a slice of the full data. But strangely, while the coloring can be more beautiful in terms of vibrancy and perhaps more data and more motion, the original solution-only video seems more "pure". Ultimately, equations are usually for solving the solution. With this extra info, the coloring is basically an offset, so you could also render this as a height in a 3D terrain. Then the real solutions are the minima and maxima values in the equation, which is the derivative of what you see here -- like where a ball would fall and rest in the slopes of the terrain. These would just be points. I'll have to consider if I could use my voxel engine to showcase the terrain. In the meantime, I think this shows some nice colors. :)
@punpcklbw
@punpcklbw 3 ай бұрын
This certainly has an Evaldraw feel because of the color mapping and seamless transition from one formula to another. However, this leaves a question: are the equations displayed being compiled to machine code by the engine (like Evaldraw does), or were they pre-compiled in advance (together with the morphing animations)? I also wonder if the morphing process is automatized or designed by hand, as it doesn't look like simple interpolation.
@JDoucette
@JDoucette 3 ай бұрын
Great observations and great questions! I've always loved the EvalDraw color mapping, though I've arrived at my own versions, I tended to be awestruck at the vibrancy of the colors in EvalDraw. The transitions likely feel like EvalDraw since users of the tool are so used to immediate compilation and immediate full-window output that accepts animation. I had chatted with Ken Silverman back in the day about specific optimizations for such equations (since X and Y are often constant) to be optimized/compiled away, but he correctly didn't care since the tool doesn't need them -- it's better to be generic that optimized for specifics (and today, GPUs would eat this up!)
@JDoucette
@JDoucette 3 ай бұрын
The equations being displayed are compiled to machine code, and the equations displayed are being rendered as strings from the original codified equations -- which is why you see silly parenthesis placements, where humans would understand order of operations. The equations are pre-compiled at program start-up, for run-time speed.
@JDoucette
@JDoucette 3 ай бұрын
Morphing is automated (though even I was a bit awestruck at the results appearing contrived). It is abstraction; my application can run many equations simultaneously at once -- even more than 2 -- allowing the morphing process to take place on them all. Notice at the end, I "back up" 4 equations from the y=x to the 3D perspective rotation. All of these equations are being morphed at the same time, which is why the 3D perspective result looks a little strange (and very cool) before it settles -- something I wanted to show off more, but I have to skip through equations quickly (and never let them settle) to achieve.
@JDoucette
@JDoucette 3 ай бұрын
The morphing idea came to me in a flash -- "Hey, I am dealing with equations LEFT = RIGHT, and just as I can change this into LEFT - RIGHT = 0, I can do any equation manipulation that I want. Why not LERP two at the same time?" -- all I needed to program was the abstraction to allow a real-time function pointer call (run for each pixel) to allow an abstraction to a morphing function that calls 2 or more equations at once, each with its own "t" value = 0..1, modified for smooth-step (or sine wave, even), sum them up, and find the result. When doing more than 2 equations at once, I don't even need to worry that the total "t" of all equations is 1.0. Math is just math! Show the result! :)
@Shuey187
@Shuey187 3 ай бұрын
Jason, dude, this is freakin' nuts! Truly amazing demo!
@JDoucette
@JDoucette 3 ай бұрын
Thanks for the kind word, Shuey! I love how this one turned out. The morphing was so neat, that I had to spend time to find a series of equations that really showcase a sense of progression. I'll be making a few more of these! :)
@blakeweaver6099
@blakeweaver6099 3 ай бұрын
As a casual fan of hyper-dimensional geometry, I loved seeing the solutions shift as T changed. The finale is just *chef's kiss*. One question: I noticed that the 2 "planes" in the finale seemed to move in opposite directions. Is there anyway to adjust them for the 2001: A Space Odessy experience? My first thought is an absolute value thrown in somewhere, but then you started rotating the whole thing and I'm not sure how that would hold up. I hope my input pushes your content into the algorithm; you definitely deserve the recognition for your efforts. Very impressive!
@JDoucette
@JDoucette 3 ай бұрын
Very neat that you compared this to hyper-dimensional geometry since the equation really is 2D, yet shows as 3D, which is, of course, what all 3D graphics and artists and cameras must do to get that 3D reality onto a 2D image. I also love your comment on the finale! :) Made me smile a lot. I purposely designed it that way, so I'm glad it "popped".
@JDoucette
@JDoucette 3 ай бұрын
Yes, using absolute value would definitely work to make both the top & bottom of the 3D grid move in the same direction, which can also work for the rotation version -- you just have to throw in the abs() function in the correct spot. You want the rotation, based on the starting (x,y) to happen first, then use the abs(y) for the Y values, to flip the bottom to the top (the fact that it has already been rotated is fine; we're now in a new coordinate plane at this point). I'll showcase it in my next video! :)
@JDoucette
@JDoucette 3 ай бұрын
I implemented your absolute value idea in my latest video #7! It worked, even with rotation. The new equations: sin(x * 5.0 / abs(y)) * sin((5.0 / abs(y)) + t * 8.0) sin(xrot(x,y,t) * 5.0 / abs(yrot(x,y,t))) * sin((5.0 / abs(yrot(x,y,t))) + t * 8.0)
@stevenray8737
@stevenray8737 4 ай бұрын
Thats gorgeous graphics programming. Great job.
@JDoucette
@JDoucette 3 ай бұрын
Thanks so much Steven. I appreciate the comments. Scan-line 3D roads will never be boring for me! I kind of want to throw in some old-school voxel terrain on the sides... that's on my back burner.
@houssamassila6274
@houssamassila6274 4 ай бұрын
a little over the top
@JDoucette
@JDoucette 4 ай бұрын
I always get hyped over retro pseudo 3D "racers"... but this one felt like a tech demo, and not really a game.
@krakulandia
@krakulandia 4 ай бұрын
Old school voxel rendering with proper ray casting?
@JDoucette
@JDoucette 4 ай бұрын
Yes! I'm not sure if the term is "ray casting", but I am definitely shooting out a ray of some kind, grabbing the texture and height data, and creating voxels from them. So even the rendering is front to back, as the ray is cast. The only difference is that the "ray" is not really a straight line in height; it accounts for anything at that height. Currently, just a single height, but it is not limited to that. This is a remake of a 1995 engine I made back in the VGA days.
@krakulandia
@krakulandia 4 ай бұрын
@@JDoucette Looking good! I also made couple of voxel rendering algorithms back in about same year. I like old school voxel heightmap rendering :)
@JDoucette
@JDoucette 4 ай бұрын
@@krakulandia That's awesome. Dig them up, and put them on KZbin! :) I'd love to see. I checked out your channel to see if you had any retro stuff, and saw lots of music composition. My twin brother, Matt, does the same. He hasn't touched it in about a decade or more, but is getting back into it this year with FL Studio.
@krakulandia
@krakulandia 4 ай бұрын
@@JDoucette You can find couple of my voxel landscapes from the following demos which are available on KZbin. "Drill Me, Please Me by Byterapers (pc demo)" at 4:38 minute mark. "Tpolm - Empire (1996) [60fps]" at 1:16 minute mark. In the latter video someone changed the heightmap to too low version and turned the motion blur to max, which makes the landscape look less impressive.
@JDoucette
@JDoucette 4 ай бұрын
@@krakulandia Nice! I just watched both. The Empire demo definitely doesn't help showcase the engine; they could have used a simple flat texture mapper -- but I can sense the height map in it at times. The Please Me demo decently shows height map and dynamic coloring. Second Reality tried to show dynamic height, but it ended up being a poor showcase (the only poor component in that entire demo, in fact, and it could've been one of the best!) I find these old demos fascinating. First, I can see the reuse of the same code concepts all over in your two demos: the light source shading is reused in many sections, and the code to do dynamic color fade with 256-color quantization method is needed for that, and then reused in the voxel technique. It sounds like you leased out your code for multiple teams. :)
@Pedro-jj7gp
@Pedro-jj7gp 4 ай бұрын
Super nice! But why does the title say ray marching?
@JDoucette
@JDoucette 4 ай бұрын
Because it's actually ray marching! :) I am stepping through a ray, in equal steps, to check if I hit a wall. It's the easiest way to get this engine "working". Harder is to shoot a ray, and do the collision detection accurately at grid boundaries. If you pause the video at 0:09 and step through this second of video, and look at the line where the walls meet the ceiling, in close range, you can tell the line isn't so smooth -- that's from the quantized steps of the ray march. It's hard to see since I demoed this with the step size very small! I should've left it large to show the artifacts.
@JDoucette
@JDoucette 4 ай бұрын
And thank you! :)
@Pedro-jj7gp
@Pedro-jj7gp 4 ай бұрын
@@JDoucette Gotcha, yeah that makes sense. I just got confused because you put both ray-casting and ray-marching in the title. So I didn't know which of the two it was
@JDoucette
@JDoucette 3 ай бұрын
@@Pedro-jj7gp Yeah, ha ha, I can see how that would be confusing. It's a Ray Casting engine "in-progress" that is only using Ray-Marching at this point, and has not yet grown up to be fully Ray Cast yet. :P The title "Ray Cast Engine" is just the prefix for all of my videos on this engine, so I hadn't made the connection that it was claiming two things!
@houssamassila6274
@houssamassila6274 4 ай бұрын
so I guess you are done with this? never doing anything on it again?
@JDoucette
@JDoucette 4 ай бұрын
Actually -- not done at all. I was side-tracked by a few projects, but now that they are out of the way, I have a bit more focus on where I am going with my personal projects. Here's the plan -- I am going to finish some foundational engine work in Xona System 8 -- lower level things like a components system, objects system, things that apply to any rendering sub-system. Then, I'll move my Voxel engine into Xona System 8, as a "sub-engine", which will allow the construction of a game, on top of the Voxel rendering system. All of this plan is for the beginnings of the creation of a game centered on the voxels. (It'll be a while before I get to showing the voxel again -- unfortunately. Maybe I can upload some new terrains, but in general I want to show new code and ideas as well.) I feel this Voxel tech, and perhaps the Road tech, are my biggest advantages for doing something retro & unseen (which are usually oxymorons).
@houssamassila6274
@houssamassila6274 4 ай бұрын
@@JDoucette thank you so much for taking the time to respond. your work is impressive and inspiring (sometimes even discouraging). I wish you a good luck with it and I will be watching and following with great interest. these are not just words.
@JDoucette
@JDoucette 4 ай бұрын
@@houssamassila6274 You are too kind. Thanks for the words. Please don't be discouraged. None of this is that difficult, and most of my work arrived as an evolution of ideas and trials. For example, this voxel engine was the combination of two other engines: 1. F-Zero texture mapping engine, and 2. an isometric liquid motion engine that showcased heights from a dynamic height map. Both of these had several iterations, and then when I combined them, my voxel engine had 9 iterations before the final product (my 1995 VGA engine).
@paraaki
@paraaki 4 ай бұрын
@binkbonkbones3402
@binkbonkbones3402 4 ай бұрын
This is still so insanely inpressive to me, honestly right now i could really use a breakthrough with something, and I'm wondering if you have any tips and resources for making the height and color maps, and if you have any links to code i could translate into unity I just want to make a sandbox universe based on the constellations and solar system, and make a bunch of colorful worlds where you fight the bad guys I struggle with coding a lot, and any sort of links to asset packages would be really useful
@JDoucette
@JDoucette 4 ай бұрын
Hey again -- I see you left 3 comments on my videos, but I cannot find the first 2, though I see them in the notifications. Maybe YT is going nutty on catching spam or something, so I'll copy/paste & answer them here. :/
@JDoucette
@JDoucette 4 ай бұрын
Q. "Is there any reference for how to achieve that soft almost blurry or fuzzy look that seems to smooth the terrain out, or is that just a result of the color and resolution?" A. This was on the 486 recording -- so that was just from the fact that it was a 320x200 or 320x240 video resolution, and uploaded to YT way back when (16 or 17 years ago), in which it didn't do a great job of upscaling or preserving the details (it doesn't do much better today). So no algorithms at play here -- just data loss! I will have to re-record this someday, and upload. P.S. I wonder if the fuzzy look is desirable... since we could definitely make this happen on purpose. :)
@JDoucette
@JDoucette 4 ай бұрын
Q. "I dropped the dbz game stuff and translated all the world's mythology into a story about a space empire akin to rome, complete with space ceasar I've changed my ideas..." A. I think the notification cut this one off. :( And I'm sure we were having a discussion about your ideas and the storyline before... I recall this. Maybe it was in another video.
@JDoucette
@JDoucette 4 ай бұрын
Tips for making the color and height maps -- firstly, you can borrow them from other games, which I have. But you cannot release games like this. For generating them, there are some basic ways. Look into 2D and 3D gradient noise functions (one of my videos shows this). Produce a height map with a function f(x,y) that makes a height given any x,y point on the grid. Then you can run it through some erosion iterations. Or, for these plateau height maps, you could adjust the f(x,y) to be biased towards certain heights (see various LERP functions for ideas), or even the terrain itself at certain heights could be more resistant to erosion. Please consider that 1024x1024 is very low resolution, so you don't have to do much.
@JDoucette
@JDoucette 4 ай бұрын
Sadly -- I don't have any code, since I am still working on terrain generation myself. But please look up terrain generation on YT and look for things like erosion. The code doesn't have to be fast or GPU optimized -- 1024x1024 is small.
@regisegek4675
@regisegek4675 4 ай бұрын
Ok Intel Arc 790 exreeme and Ati xt 7900
@JDoucette
@JDoucette 4 ай бұрын
I wonder how many dots those suckers could draw? More seriously, each dot is a vertex that has to be calculated, so while we're not doing any pixel shaders for filling polys, it's still doing a ton of vertex work. Theoretically, each dot could be a new triangle, if in a triangle strip. It may be interesting to ask it to draw a 100 million poly object. Kind of crazy when there are only 2.1 million pixels on screen.
@MediateCheese
@MediateCheese 4 ай бұрын
Bro felt like using his pc to its maximum
@JDoucette
@JDoucette 4 ай бұрын
I am trying! Maximum power. I wonder why Nvidia doesn't advertise the dot-drawing power of their GPUs, and instead keep talking about this RTX thing. :P