Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411736 Posts in 69681 Topics- by 58649 Members - Latest Member: PikTheArchon

December 08, 2024, 03:51:47 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsBlack Lotus - Old School Arena Shooter
Pages: [1]
Print
Author Topic: Black Lotus - Old School Arena Shooter  (Read 6880 times)
Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« on: September 24, 2020, 03:05:21 PM »

Black Lotus is an upcoming old school arena shooter written in homegrown technology using C++. This is a thread to chronicle the development of it, and get feedback from this wonderful community!
« Last Edit: September 24, 2020, 05:00:40 PM by Ky. » Logged

Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« Reply #1 on: September 24, 2020, 03:21:46 PM »

Humble Beginnings:

Alpha 1.

No Images exist of "Alpha 1" because techically there was no "Alpha 1". I found a resource online that showed me how to construct a raycaster engine in C++ and OpenGL, and Alpha 1 is technically just the result of following that tutorial.

It got me to use FreeGLUT and GLEW, and used Immediate Mode rendering to display a strip of every changing sized sticks across the widthof the screen based on a simple distance calculation. It was REALLY cool to see it run. And that's what inspired me to take this and run with it.

Alpha 2: "The Smooth Moves Update"

This is the version where I took the product of the tutorial and started creating something that resembled a game engine out of it in my own mind.  This alpha was me getting used to using C++ and indeed OpenGL in a real time game concept from scratch. I implemented my own file reading routine to parse my own map format, and overhauled the movement code to be less rigid and introduce smooth rotation.

I also introduced a toggle key "R" to flick on the ray displays in the map, and we got some distance based shading going on too.




Alpha 3: The "I Have No Legs and Must Move Freely" Update

This alpha saw me overhaul the input processing yet again. This time, we got horizontally locked mouse look in too (on purpose, locked that way) and most importantly: strafing.  Now you would control the game like a standard modern FPS.

I also locked the framerate down to 60, and made the map and fps view full screen, toggleable with 'M'



Alpha 4: The "Lock Me Up Before You Go Go" Update


It needed to happen. There were all kinds of input bugs, lots of weird little graphical hitches, and just in general something wasn't sittingright with me regarding the glut library I was using. Truthfully at this time I don't even fully remember what bugged me so much about it.  But either way I gutted it out and replaced the foundational framework from GLUT and GLEW, to SFML.  Immediately noticed HUGE improvements in subsystems like Input, Image loading, and even TTF support, which made me super happy.

So we got
  • Font Rendering
  • Texture Rendering (though only the one)
  • An update in map size from 8x8 to 64x64
  • A collision map to stop you from running through walls
  • Created a "Scene" subsystem to handle map changes
  • Expanded the map format
  • This is the first build to include an early version of "BLEdit", a simple map editor

Oh ya and we increased the raycast fidelity to the full 1024 width, creating a much sharper looking render

Logged

Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« Reply #2 on: September 24, 2020, 03:29:33 PM »

Black Lotus Alpha 5: The "Artist Unleashed" Update




Alpha 5 was all about establishing the art pipeline, laying the foundational framework around creation, and of course creating tools and systems that the artist(s) would use to create maps and worlds for the player to explore in. 

This release marks a major milestone. With the core rendering engine done, and now the art pipeline unblocked, work starts at this moment into transforming Black Lotus from a glorified walking simulator, into a first person shooter with core gameplay fundamentals.

With each milestone that's come about since Alpha 2's release, I find that I can hardly recognize them.  Each milestone represents many late nights and hours of research, decision making,, implementation, compromise, and refactoring, and it shows.  Alpha 5 is the first release to still somewhat share visually similar elements, with a few very obvious changes (detailed below), but under the hood? The codebase probably couldn't be any different if it tried.  So much has changed, been shifted around, reorganized, optimized, it's barely the same code base as Alpha 4.   All of this is good thingsā„¢, and represents a lot of progress after a lot of learning.



Big Features

  • Multiple Wall Textures per map, as dictated by the .map file format

  • Static Entities
  • Wall Texture Live Editing
  • Entity Live Editing
  • Map Scene Live Editing & Hot-Reloading
  • BLEdit has been updated with Texture support

Small but Just as Important Changes
  • New custom math library being used (should help with the wall collision bug for Alpha 6)
  • Can "pause" the game now and release your mouse
  • BLEdit has been updated to be used alongside the BlackLotus binary and will be made available for custom maps
Logged

Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« Reply #3 on: September 24, 2020, 04:47:18 PM »

Hi everyone,

During the development of Alpha 6, I've faced just an enormous amount of road blocks, and the issues come down to one or both of two things


Thing 1: OpenGL.

Now, OpenGL by itself isn't a problem, and it's 100% how I've used it.  OpenGL is not at fault for anything. I am in this case.
Immediate Mode Fixed Functiuon Pipeline is all I've ever known for OpenGL rendering. It's how I started looking at it many may years ago, and as far as I was concerned with the tutorials I was ingesting over the past several months, this was still the accepted practice. I didn't need any of that fancy shader business for my flat shaded full-bright raycasting renderer (and blah blah blah excuses excuses).

But the reason OpenGL is part of my list of "things" nagging me is because of Thing 2:

Thing 2: SFML.

SFML by itself is a fine framework that does a *lot* of things right. But it does a sneaky thing I wasn't expecting. See, when I installed it, and started using it, most of my existing code could be ported pretty easily from FreeGLUT.  Everything just worked, although a little wonky at first.

Then I started my task of implementing floors and ceilings. Without getting too much into it, the big prospect here was that in order to do floors and ceilings at the resoluton I was aiming for, I had to loop through every pixel of the screen space (the full screen) and apply a color value to an opengl primitive.   When I wrote this for immediate mode, my framerate cranked down to 8fps, as expected, I knew the approach was lame but I needed to simply see some results.

This is when I learned about VBO's. And guys, I tried for days to get VBO's to work at ALL, but the exceptions just wouldn't let me have it. I set SFML to use OpenGL 4.6 (this is important), I reimplemented GLEW, I introduced additional real time output displays to monitor whats going on and what extensions were available, etc etc. But the end result was always the same.

That's when I learned that out of the box, it doesn't really matter WHAT you tell SFML as a version of OpenGL you want to work with: it'll basically cap itself off at 3.4 or something, imposing what SFML calls a "Compatibilty Profile".  
See, SFML comes with it's own primitive drawing abstraction, and I suppose that itself uses the old Fixed Function Pipeline because it tells you, if you dare load the Core OpenGL profile, expect SFML's drawing tools to break.  While I had made it a point to not use SFML's drawing tools, this also included it's font renderer too, which I used quite a bit of.

Indeed, loading the core profile not only broke everything, most of my code would have to be replaced anyways because "modern" opengls traight up ditched the fixed function pipeline in favour of it's programmable pipeline, and I simply couldn't use VBO's.

I reluctantly gave up on my flors and ceilings, opting into more of a Wolf3D look instead of something like Blake Stone.

And then I tried implementing a basic UI system.  Working around SFML's font renderer and my own opengl calls to build a functioning menu has been such a trying and annoying experience that I started losing faith in myself.  Grass started looking greener elsewhere.

That's when I thought, oh hey, I don't need to write my own, I can use NoesisGUI or even better Nuklear!

What followed was two weeks of me trying to cram in an existing GUI framework, any at all, to no avail.  Each one wanted something different, but it all boiled down to one thing: they wanted an opengl "device". And a "device" is something I lacked because SFML's "RenderWindow" simply doesn't do things that way, at least in this compatibility mode anyways.

So what's the takeaway here?

What followed was burnout and a hardcore case of imposter syndrome.  I simply was making no progress, and every wall in my face was due to the technology choices I opted into.

So I contemplated creating a task to rip out the whole renderer, and replacing it with a modern OpenGL implementation, usng the Core profile from the get go.  That would solve my issue, I could get a gui framework like Noesis in there, and VBO's and shaders would dramatically improve performance and give me the features I wanted.

But that's where I got to thinking: OpenGL 4.6 was released 3 years ago, and there's been pretty much zero activity ever since by Khronos themselves.  They're really invested in Vulkan now, and it's hard to blame them.  Doom Eternal is an excellent real world technical showcase of Vulkan's power now and in the future, granting an opportunity to kind of leave OpenGL the champion it once was, and simply exist to slowly rot away. (Or at least it seems)

I thought about hunkering down instead with Vulkan. But it seemed like such a dramatic overkill for what I needed, I figured a OpenGL 4.6 implementation would be plenty fine.  

And that's when it hit me.

I had already been planning pretty much this entire time i've been working on Black Lotus, that my follow-up project was going to lean in on DirectX 11, for I wanted to exclusively target Win10 and Xbox with that one.  But here I was stuck in the past with OpenGL <= 3.4 or whatever it was that SFML was granting me.

I was already going to rip out the rendering code and replace it with *something*

Sooooooooooooooooooooooooooooo.. yeah.  Why not just take the plunge and do it in D3D11. It does all the things I wanted to take advantage of in OpenGL anyways, and I get familiar with the API I really wanted to get involved in with anyways.

So that's where I am at now.

Alpha 6 is going to look... pretty freakin' different, I'm not even going to lie to you on that.  I've really not enjoyed working with a raycaster. It was fun working within the rendering limitations, but at the end of the day I just really wasn't a fan of dealing with raycaster specific problems.  

So in this next iteration, we're aiming for less of a Wolf3d-esque, and more of a Doom1-esque look.

I've got my development environments already set up, my code base comitted, and doing a bunch of reading a research on how to interface with DX's API. Very very different to what I'm used too, but I'm excited to show some progress shots once I get things painted to screen again.


But regarding my problems above, simply put: I just didn't know any better, and nothing I was using was demonstrating to me that I shouldn't be using such an old school mode of thought. I genuinely had no idea.  But I do now.  And I can only grow as a graphics programmer from these experiences.
Logged

Schrompf
Level 10
*****

C++ professional, game dev sparetime


View Profile WWW
« Reply #4 on: September 24, 2020, 10:43:08 PM »

Wow, that's quite a journey you made there. You're probably settled right now, but in case you aren't: You can use modern OpenGL just fine, gpu-side it's basically the same as D3D11. The APIs are both horrible in their own way, though: OpenGL is a state-ridden mess with invisible cross effects, while D3D11 is a COM massacre where refcounting regularily gets in your way.

I followed a Vulkan tutorial recently, though, and let me tell you that: it's HUGE. The API is clear and nice, very explicit and direct, but the amount of stuff you have to get right in order to see anything on screen dwarfs everything I ever saw before. Do not go for Vulkan if you're not planning to spend weeks on basics. D3D12 is even worse, as far as I know, because it combines the complexity with the COM mess some parts of Microsoft still seem to favor.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« Reply #5 on: September 25, 2020, 08:24:48 AM »

Wow, that's quite a journey you made there. You're probably settled right now, but in case you aren't: You can use modern OpenGL just fine, gpu-side it's basically the same as D3D11. The APIs are both horrible in their own way, though: OpenGL is a state-ridden mess with invisible cross effects, while D3D11 is a COM massacre where refcounting regularily gets in your way.

I followed a Vulkan tutorial recently, though, and let me tell you that: it's HUGE. The API is clear and nice, very explicit and direct, but the amount of stuff you have to get right in order to see anything on screen dwarfs everything I ever saw before. Do not go for Vulkan if you're not planning to spend weeks on basics. D3D12 is even worse, as far as I know, because it combines the complexity with the COM mess some parts of Microsoft still seem to favor.

Hey Schrompf! Thank's for stopping by :D

There's nothing in your reply I can refute, this is all completely accurate.  However the reason I've settled on DX is two reasons, one is personal, one is a bit more practical

The practical reason is two fold: 1. that simply I'm uninterested in targeting non-microsoft platforms at this time. I've used engines that let me easily target different platforms and each time it's the same story: 0 - 1 downloads on mac, 0 downloads on linux, 99-100% downloads on windows. The portability effort just hasn't been worth it. and 2: I aim for Win10 and Xbox which both make use of the DX Api natively.  If I wanted to target Nintendo or Playstation they both use their own graphics API (Gnm/GnmM for PS, and NVN for Switch) that would need to be specially targeted for. So it makes sense to hunker down with D3D for the time being considering my targets

The personal reason is simply, well, a really personal one. When I was about half way done high school, I came across a full spread ad in my edition of Game Developer Magazine that was about DirectX 8.0, and featured this artwork


Let me tell you, my imagination went wild as it was the first time I had ever considered rolling custom tech, instead of modding existing engines. It was also the first time I had even considered learning C++ proper (instead of tweaking values).

Life took me in a very different path though. I went to college for animation, and wound up in a career in web development, and these past couple years has seen me re-explore my inner game developer. Started with the Unity, went to Unreal, and now im rolling my own. Every step along the way, I would occassionally google search "directx tutorial" in google, see the daunting amount of work needed to get anything on screen, and would walk away simply because I wasn't really in the right mindset.

Now here I am. I am very established in my career in web, very confident in my skills as a web engineer, but now with my laptop in hand with a 1050Ti built in, and a car power adapter to power it, and an unlimited data plan for my mobile hotspot.. I've been using the hours my wife and kids go shopping at a time and running around outside of the house (as the driver) to hunker down in my van and get to work. The majority of Black Lotus has been built in that environment, and it's been a wonderful learning experience.  But this is where I've discovered I finally have some time to be productive and really learn this stuff I've always fantasized about. Getting familiar with DirectX will literally be a bucket list item checked off  Cheesy

And yeah I'm both aware and incredibly intimidated by what D3D12 has in store for me  Cheesy which is why im starting with 11 for this little game, hoping it'll get me used to the DX way of making games enough to where experimenting with D3D12 concept in the later stages of development wont be *quite* as daunting (Though I fully expect to be questioning life choices in the middle of my research phase LOL)
Logged

Schrompf
Level 10
*****

C++ professional, game dev sparetime


View Profile WWW
« Reply #6 on: September 25, 2020, 01:07:20 PM »

That all sounds very reasonable. Good luck and godspeed! And please - keep posting pictures and anecdotes - I really enjoyed reading those.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« Reply #7 on: September 29, 2020, 10:38:30 AM »

I was very excited last night to make some progress and get a glTF2.0 reader into the code!


Now to do something with it  Cheesy

Meanwhile I think I've found my audio solution too. i was about to settle on FMOD, but, honestly? This will do.
https://miniaud.io/
Logged

Schrompf
Level 10
*****

C++ professional, game dev sparetime


View Profile WWW
« Reply #8 on: September 30, 2020, 02:35:58 AM »

Nice find! Have been using FMod for ages, but I want to get away from it for licensing reasons. And this one looks really good.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Ky.
Level 0
***


Programmer & Web Slinger


View Profile WWW
« Reply #9 on: October 05, 2020, 09:55:27 PM »

I put it off long enough,

Ladies and Gentlemen.. we have a pretty triangle.


Weeks of work has gone into this while I independently research DirectX 11, the D3D11 api, and all it's wacky goodness.

That triangle is in it's own Vertex Buffer, it's optimized with a proper Index buffer, it's got a proper vertex and pixel shader compiled and being used (it's why the colors work), and just in general I can't begin to describe to you how **FRIKKIN** excited I was to see the colors work... after a week of bashing my face against the walls.. floors.. desks... anything with a surface really, it finally happened, and I can finally get some sleep.

No one said this would be easy, in fact many people have tried to discourage me from D3D and instead come abck to OpenGL or look into Vulkan.

And them I say: fair play, but, I'm good.  I'm a sucker for punishment, and I feel all that much better about it once I've navigated the hill with a result.
Logged

Schrompf
Level 10
*****

C++ professional, game dev sparetime


View Profile WWW
« Reply #10 on: October 05, 2020, 10:12:27 PM »

Great work! You are now allowed to force one (1) person nearby into padding your back.

No one said this would be easy, in fact many people have tried to discourage me from D3D and instead come abck to OpenGL or look into Vulkan.
Those people are wrong IMO. Vulkan is an even harsher mistress. OpenGL might be easier, I don't know. From my limited experience it's one level with D3D11.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic