|
Phil J Pearson wrote: there was such a time, long long ago When we had no choice but to study the documentation, or figure things out for ourselves.
|
|
|
|
|
Books, I used to shop at Barnes and Noble all the time.
Atari ST Books[^]
I had several of the books shown in the link.
|
|
|
|
|
Brian L Hughes wrote: Now today I still have fun coding but I have to admit that things are a bit daunting
That is what happens when you turn on the gore flag and the reflections in water flag.
You can of course go back to those good old days. Get the actual Atari ST and use it or use an emulator Hatari[^]
|
|
|
|
|
I feel your pain... using COM in languages like C for instance (my BFF language)... is um... well... interesting. C++ is at least a little friendlier in that regards at least, but sometimes that bare metal feeling in C is just what good times are made of.
Some folks prefer DX, but if you want that old skool feeling then IMO OpenGL (OGL) will give you that. It feels a lot like GDI programming. If you want to draw a line for instance..
glBegin(GL_LINES);
glVertex2f(x1, y1); glVertex2f(x2, y2); glEnd();
Boom. Done. Only thing that will make that line not look like a line is your transformation/projection matrix. But if you use straight up orthogonal projection, it's the same thing as the olden day concept as OGL isn't a full-blown engine at all. It's really just a graphics library to let you talk directly to your hardware so crap draws quicker. That's all. Nothing more. Nothing less.
Jeremy Falcon
modified 3-Feb-23 13:24pm.
|
|
|
|
|
I went through a OpenGL 3D tutorial start to finish. I haven't applied myself to try to adapt my current DX library to it. My library consists of handmade controls and dialog box panels to house them as well as the main surface to display a game. I was going to try make a 2D game out of it all, but it got stalled when I couldn't figure out why characters were glitching. I have text editor box, listview box, drop downs, RGB color picker, buttons, labels, BMP display, check and radio boxes. All of them rendered by hand. I tried my best to enable interface scaling on everything. Got it all working. Even made a match 3 game like Bejeweled where you slide blocks around and they disappear and the other blocks slide down to fill their place.
But the printed text sometimes appears garbled on the screen the edges look funny.
I could gut the DX, it's all in one c++ class and replace it with OpenGL, it'd take some time but it's doable.
|
|
|
|
|
Brian L Hughes wrote: But the printed text sometimes appears garbled on the screen the edges look funny. Just to make sure I follow, you mean the edges of the the text? What type of front are you loading (if any) or is this just bit-mapped? And does it it have anti-aliasing? These days anti-aliasing is all but required for text look like right on current gen LCD monitors. If you got a CRT laying around, could always view your game on that just to see if that's the issue. The less crisp nature of CRT display will do the aliasing for you.
Jeremy Falcon
|
|
|
|
|
I'm doing all that within the "confines" of .NET: reading and writing pixel buffers and writeable bitmaps at run time.
UWP has 2 UI related treads: "the" UI thread and a "composition" thread for rendering elements that don't require layout changes for better performance.
The things you want are there; it's just that the hard work's been done.
Your "moving line", today, would require a Canvas element, a Line element (just a length, stroke and color), and a Storyboard element to animate it: about 10 lines of XAML ... and you could rotate it while you were at it with an extra line or 2.
There is still joy to be found out there.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I use C# a lot, quite a few non-graphical utilities. I like how easy it is to code classes and methods for complicated stuff without the hassle of dealing with c++'s single pass compiler.
For the life me I can't understand why Microsoft won't wire in, expose direct X to C#. I actually started my DirectX experience with the defunct SharpDX and decided to move to c++ since it was no longer supported. It's kind of weird, you think they'd want to expose DX to help move along it's takeover of c++.
I like using c++ as well, but the single pass compiler restraint is a pain.
I was thinking of trying Unity but I think that would box me in even further.
|
|
|
|
|
C# isn't a good fit, that's all.
To work with hardware effectively, you need pointers and the ability to compile down to highly optimised byte code.
To work with apps effectively, you need a good IL, a garbage collector, and a strict ban on pointers.
Rust and DirectX would make more sense to me. (but I have to admit that I don't need hardware access very often, so what do I know?)
|
|
|
|
|
I'll stick with C++ MFC and GDI thank you. MS it's finally doing a great job on the docs. It only took them 40 years.
Churchill was right: you can always count on the Americans to do the right thing...after they have tried everything else.
|
|
|
|
|
I made my own MFC, without CView
|
|
|
|
|
Sounds like you and I are of the same vintage. My earliest graphics programming was in 1982 at college. Our machines were Z-80's with 64K of RAM. The graphics card displayed 256x256 in 8 colors on a $10,000 color monitor. Graphics memory was bank-switched in the lower 48K of the address range. You accessed it by calling a function in the upper 16K which switched out the main memory, switched in the graphics, did the drawing primitive (pixels, lines, and flood-fills), and then switched main memory back before returning. Occasionally the bank switching would not work, so you would get to watch your code executing on the screen instead of the image you were drawing.
I took both computer graphics classes and then did an independent study project. I implemented the Fuchs-etc. Binary Space Partitioning algorithm for 3D hidden-surface removal. This is the same algorithm used in DOOM. During this time I spent more than one 40-hour day debugging. Good times.
Software Zen: delete this;
|
|
|
|
|
this is EXACTLY why I still enjoy programming stuff using SDL.
Not only that, but since SDL can also compile to web targets using Emscripten, it means I can still write all these strange little 2D demos and stuff like I did back in my demo days, and it compiles for Windows/Web/Linux and Mac all from the same code base.
Add into that, that you can also access SDL from C# and .NET these days.
Makes for a very happy dev..... well when I get a break from boring as hell LOB apps (AKA massive databases with a new coat of paint on) projects anyway .
|
|
|
|
|
James Randall[^]
Blazor Wolfenstein3D.
We're on the same page with a bunch of what you had to say. I've been working with this as a codebase to do other things.
What you will find of interest is how it exposes a "screen buffer" where you are writing to an array of uints all the pixel color values.
This is done in C#'s unsafe context with a pinned bit of memory and I believe the typical frame flip technique.
This is inside of a Blazor app where the C# is getting turned into webassembly and running client side.
|
|
|
|
|
Wordle 594 3/6
🟨⬛🟨🟩⬛
⬛🟩🟩🟩⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 4/6
🟨⬜⬜⬜⬜
⬜🟩🟩⬜⬜
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 4/6
⬛⬛🟨⬛⬛
🟨⬛⬛🟨🟨
⬛🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 5/6
🟨⬜⬜⬜⬜
🟨🟩⬜⬜🟨
⬜🟩🟩🟩🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 594 3/6*
🟨⬜⬜🟨⬜
🟨🟩⬜⬜🟨
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
⬜⬜🟨⬜⬜
🟨⬜⬜⬜🟨
🟩🟩⬜⬜🟨
🟩🟩🟩🟩🟩
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 594 3/6
⬜⬜⬜⬜🟨
🟨⬜🟨⬜⬜
🟩🟩🟩🟩🟩
That was a very lucky third guess (I had two letters in the wrong order!)
|
|
|
|
|
Wordle 594 6/6*
⬜⬜🟨⬜🟨
🟨🟩⬜🟩🟩
⬜🟩🟩🟩🟩
⬜🟩🟩🟩🟩
⬜🟩🟩🟩🟩
🟩🟩🟩🟩🟩
Just made it. So many words with those 4 last letters!!
Happiness will never come to those who fail to appreciate what they already have. -Anon
|
|
|
|
|
Wordle 594 3/6
⬛⬛⬛⬛⬛
🟩⬛🟨⬛🟨
🟩🟩🟩🟩🟩
Jeremy Falcon
|
|
|
|
|
Wordle 594 5/6
⬛⬛🟨⬛🟩
🟨🟩⬛⬛🟩
⬛🟩🟩🟩🟩
⬛🟩🟩🟩🟩
🟩🟩🟩🟩🟩
Get me coffee and no one gets hurt!
|
|
|
|
|
Wordle 594 3/6*
🟨🟨⬜🟨⬜
🟩⬜🟨🟨🟨
🟩🟩🟩🟩🟩
|
|
|
|