Tuesday, 7 August 2018

Early Development Update: Fires.

Until Further Notice: The team's progress is suspended.

Unfortunately, due to unforeseen circumstances, the team will not be doing any development until further notice. 

Long story short, the person who's currently the backbone of the team, and the programmer, has a fire in his area, and evacuations has been started 10km down the road. 

We're sorry to inform you about this, and we will be coming back as soon as we can. There may not be any updates from the team until we start up again. 

Thursday, 2 August 2018

Dev Update 4: Rendering: Check. Minimizing: Check. Restoring: CRASH!

- Image views for each swapchain image.
- Selecting which memory heap to choose. Will need later.
- More Vulkan learning, Command buffers and pools.
- Actual Rendering!
- Code refactoring. Preparing for some actual rendering.

New Week. New Progress!

This week has been the first steps towards making Vulkan do some actual work! The code for this week added the following:
  • Image Views.
  • Detecting and Selecting "Memory heaps".
  • The start of Command Buffers and Command Pools.
  • Actual Rendering!
  • Finally, refactoring the code.

Image Views: What are they?

They are objects that allow the images to be used. Thing about it like this: Images are just the raw data. That's it. It could be in RGBA format, or BGRA, or any other. The computer doesn't care. Vulkan doesn't care. It's just data.
The Image View is a "view" into the image, it translates that data to useful data. Are we dealing with a 2D or 3D image? What format is it in? What are we using it for? Even how many layer's we're dealing with and the mipmap levels!
All that is contained in the Image View. Without it, the image is just raw data.
So yeah...Learned how to make them this week.

Memory Heaps. Heaps of Memory. 

As in, area of RAM (VRAM, SDRAM, basically all and any RAM that Vulkan has access to) Each different type of RAM has a different way to access it, and what part of the computer can see what. Some parts the CPU can read and write, while others the CPU can't, therefore it needs to ask the GPU to upload data into it, or download data into RAM the CPU can see. Of course, that goes the same for the GPU as well. Some VRAM the CPU can see though (not sure how true this is, but either way the CPU can freely use it), and the CPU uses that for things that change all the time that the GPU will need, things like (simplifying here) where the camera is and where it's pointing at, any change in colour for that 3D model that can change it's colour, and more. 
So I built something to easily give me the index of the memory heap which has the requested attributes.

I Command you to Pool and Buffer!

Command Pools. They're just this big pool of memory for commands to the GPU to go into. These commands are held in a buffer. In Vulkan, instead of saying, "Do this NOW!" You say, "Here's a list of things I want you to do. Do them."
So in this metaphor, a command pool is a pile of papers, maybe a notebook. A buffer is a page in the notebook. You then write commands to the page, then give the page to the GPU, and the GPU follows them. This way, you could have a book of commands you already want to do, and then tell the GPU to turn to page 20, and do your thing!
Of course, that metaphor is grossly lacking details, but if you want a real Vulkan tutorial, you're reading the wrong blog.

Screenshots!

Erm...Screenshot actually...Just one:
I know, it's not super impressive. But hey, that took about 600 lines of code to do!
Yes. 600 lines of code. To make an orange screen. Not to mention that at the time of that screenshot, if you minimized then restored, or resized, it would crash.
I fixed that shortly after. Can't have a game crash on you when you decide 800x600 is too small and you want 1080p.

Finally, some refactoring!

I decided to clean up my code as there was one part that kept on repeating over and over again. It was error handling for Vulkan, as most Vulkan functions up to this point would report VK_SUCCESS if it worked, or something else if it didn't. And if it didn't, we wanted to make sure to gracefully crash.

And the conclusion:

This week was busy with coding. It was a good week and now I'm learning more about Vulkan, and how to render! I'll be dealing with a lot more this coming week, both in learning Vulkan, and some personal stuff which may slow down development for a bit. Hopefully it won't be too bad though.
Anyhow, I gotta finish this and start working on some more game related stuff (Like playing No Man's Sky Next). So thanks for reading this far and don't work too hard!

Thursday, 26 July 2018

Dev Update 3 : One step closer!

- Notes:
Recoded Vulkan loader to dynamically load Vulkan and it's functions. Now it's possible to have an OpenGL or DirectX back-up if I'm so inclined.
This new loader can also discern if the user computer has an older version of Vulkan (which as far as I can see right now isn't going to effect things too bad. In the future this may be needed)
Learning colour spaces and colour models
Created a swapchain and now learning how to use them to render things on the images in the swapchain.


The Big Weekly Highlights:

This week has been interesting. I'm not sure if it felt busy or not, but it was sure gone fast! We're trying a new format for the weekly updates, hope ya guys like it. So without further delay, here's the big highlights of this week:
  • Coded the engine to load Vulkan dynamically.
  • Engine now works with both Vulkan 1.0.0 and 1.1.0!
  • Reading a lot. Learning a lot.
  • Swapchains!

Loading Vulkan Dynamically.

What does this mean and why is it important? Well at first I was linking Vulkan with the engine, which means that the engine required Vulkan to be installed. Now it doesn't have to require Vulkan and if I wanted to I could code an OpenGL renderer as well, for use as a back-up just in case Vulkan wasn't found. This also means that if I wanted to learn Direct3D, I could use it as well, and then have the engine pick out of the three based on availability and maybe even user choice. But this isn't the reason why I did that. (I would, later on release, accept a OpenGL or Direct3D renderer to hook into the engine)
So why did you make it load Dynamically? Mostly cause it's less code in the long run. Before this change certain functions weren't being loaded due to their nature, so I'd have to load them dynamically anyhow. So I decided that if I'm gonna load certain code dynamically, I might as well load all the code I need dynamically! Also, it allows for the next highlight:

Running on both Vulkan 1.0 and 1.1!

Before this you were only on 1.0? Nope! I was actually using 1.1, unfortunately my tester needed to buy a new laptop. Which prompted me to ask them if they could test the engine on it. We soon found out that the new laptop, which only had a intel iGPU, could only run 1.0. Therefore the engine was refusing to run. Now I'm only using one piece of code that requires 1.1, and it's actually meant to test what version we're running. Dynamically loading Vulkan meant that if I can't use Vulkan 1.1+ code to check the version, we're obviously running on 1.0, so that was a simple rewrite.
Now to bug Intel to keep their stuff updated!

Turning into a bookworm.

Well...eBookWorm? Either way I spend a lot of time reading and learning things about Vulkan and graphical know-how I know I should learn but was always putting it on the back burner. Not anymore! I took a look at colorspaces, what they are, what they can do for me, and which ones I should be concerned about. While I could write a blog post about colorspaces, do yourself a favour and look it up online. There's plenty of other posts which will help you learn what you need to know.

I'm also reading ahead in all the tutorials I've been... "following" (read as "Looking at, then frankensteining them together in my own way" )... and now I'm very close to actually get some pixels on the screen! That aren't black. That is. My weird way of learning Vulkan is actually working though, reading three different tutorials, and also the specs, when I see something in the tutorials I don't understand, I read the specs...and then get distracted with the specs and read the next 15 sections... It's all fine and dandy, I'm sure I'll need those other 15 sections somewhere!

But... Now to the actual code again: 

Swapchains! 

We've seen 'swapchains' twice now. What is it? Basically, it's a bunch of images which we're rendering to and presenting to the screen. And we've finally made some! If you know the term "double buffering" this is mostly what swapchains are used for. Swapchains have a handful of interesting modes, with a few which could be described as double or triple buffering. 

They're not as exciting as I made them out to be, but still, they're one of the steps to put a 3D image onto the screen, so it's exciting for everyone who wants a game from us!

Conclusion:

I hope this is a good format, and if you enjoy it, please share it with friends or people who you think will like this kind of stuff! If you don't enjoy, maybe leave a comment here or on our twitter @RestartLaterS suggesting improvements? Always willing to listen to feedback, good or bad!
Thanks and again, don't work too hard!

Thursday, 19 July 2018

Weekly Update #2

Another Week, Another Update.

I bet you're wondering what we've been up to this week. Unfortunately nothing to show. Vulkan is...tedious. I wouldn't say it's exactly hard, but learning all the steps to set up something simple is... well, almost overwhelming! Not to mention that, while learning Vulkan I've realized that my code could've been more cleaner so I cleaned it up and shrank one function by a third. Then more cleaning up and refactoring. I'm trying to keep the goal of adding new functional code each day. For the most part, I am. I am also learning Vulkan at the same time though, so I'm not going through it like a speed demon!

Some other important stuff.

Long story short, a friend has decided to help with the art work for a few games. This is good for the team as having 2 people working on a game means more time for each person. Unfortunately I'm unable to say if she's going to be working with us permanently, for only a few games, or what. But what I can say is that she'll make a lot of things easier for this small team! Yay!
Because of the artist, we have an idea of when the first project will be starting to get some concept art work. Also we're in the talks of what kind of game will be our first project. Nothing is official yet, but we are taking a page from Nintendo, specifically, the few really popular games in the NES era. And the artists wants to use the NES palette. I hope you guys are into retro looking games!
But that's all the secrets I can tell you right now, if ya want more ya gotta stay tuned 😝

You got an artist and a plan! Awesome! When should we expect some screens?

Expect concept art first, as I'll be encouraging the artist to tweet them out and I will definitely be retweeting them. As for some actual screen shots? If all goes well sometime next month.
I'm not making a promise here.
I'm not saying that will happen.
I'm just saying that the plan is to have something to show next month. 

Conclusion

Nothing too much happened this week, just a lot of planning, learning, watching youtube videos, and having fun!

See ya next week everyone! And don't work too hard ^-^

Thursday, 12 July 2018

Weekly Update #1

What is this? Weekly updates?!

Yes! I'm starting to write weekly updates! Every Thursday, give or take life being a jerk, will be an update! So I bet you're curious what's new right? (Cause that's why you clicked on the link?) 


The adventures into Vulkan still continues! This week was primary exploring around grabbing and rating the capabilities on different GPUs. Unfortunately I have an old laptop, and cause of that, that means I have one decent, but not awesome, Nvidia GPU. Thankfully a kind friend of mine, who just updated their computer to have some decent specs, ends up having multiple GPUs. So I basically had a field day programming and sending stuff to them for fun, and SCIENCE!
Maybe more fun than science though.

So, ya played around in Vulkan. Anything else?

Remember two weeks ago? Where I said I'll be mass producing prototypes using my new found Vulkan knowledge? Yeah, this week I also decided how I'll be doing that, and the best way for me to do that, while still learning Vulkan. Of course, this also lead to writing down some ideas to test out once I can spit out prototypes. 
I've also been assessing my skills in several game related skillsets, as currently this team is a team of one. Therefore I should plan out realistic goals for someone with my skillset, or else we'll be here for a very long time. Not saying that I won't accept any outside help later on, but as a solo dev, I can't exactly expect someone to drop in and be like, "Oh hey, want some art mixed in with an awesome deal with no catch?" And I won't expect that. 
Other than that though, progress has been very slow these last few weeks.

Plans for next week?

Of course! Next week will all be about maybe getting something onto the screen! So maybe some bad/lousy screenshots. Hurray!
Learning Vulkan is always a pleasure and it's pretty fun to explore and deal with. Honestly it's actually more enjoyable than learning OpenGL, despite the fact that I'd already have a rotating cube by now.


In Conclusion:

While this week hasn't been too exciting in the programming department, it's been active elsewhere. Plans are being made, things are being set up behind the scenes, stuff is happening. Just not stuff I can publicize quite yet.
So finally, have a nice week and weekend, don't work too hard, and have fun!

Thursday, 28 June 2018

So, What Happened?

So, you've kinda disappeared. What happened?

Long story short, life happened! Without going into too much detail, stuff happened, more stuff happened, and finally I'm back to programming on a daily basis.

Okay, so you're back from the dead, we get this. What ya doing now?

Well that’s a good question, what am I doing?

First off, I decided that I probably should learn something new to kick start myself and programming. So welcome Vulkan! And guess what? It’s actually not hard! For the last week I’ve been breezing through it like nothing! I would show, but it’s just a long wall of code. For those who don’t know what Vulkan is, it’s a 3D graphics API (something that talks to the graphics card in your computer, to make 3D images) and it’s also low level compared to older 3D graphics APIs like OpenGL or previous versions of Direct3D. And since it’s low level, it means it takes a lot more code to do the same thing. For instance, as of my code of writing this, for basic initialization and finding all the available GPU’s on a system, it takes a little over 300 line of code. This of course includes some debug code and informational code which is really just nice to have. Some of that code also rates the GPU’s, giving higher scores to a dedicated GPU over integrated.

So, 300 lines of code you say? What does that really mean? Well, in other API, 300 lines of code means a spinning cube on the screen, at least. A lot more if you're not writing your own code for math... which, if you are, have a cold shower, google math libraries for your programming language, and get one! Quaternions are not fun to code and can be easy to mess up! (If you don't know what quaternions are, that's even a better reason to get a math library!)

Oh wow, if that's true, why aren't you using other 3D graphic APIs?! As I said before, it's kind of a kick in the behind to get myself motivated to program, and nothing motivates me more than learning something deemed "difficult" and use it. This may sound that after I get a grip on Vulkan, I'm gonna drop it and be like, "NEXT!" But that won't be the case. Instead I'll be developing a game with this new knowledge, and working hard to make the best game I can! The original plan is to make a basic game framework with Vulkan, and after doing so, add assets and additional logic code to it to mass produce prototypes.

Ooh prototypes! That means you are working on a game right? What kind of game?
That. Is. My. Little. Secret 😉

Conclusion

Sorry for not saying anything for the longest time! I'll starting to get life back in order so the goal is that you guys will hear from me every week! I'm also planning on tweeting more often at @RestartLaterS Hopefully every day, but who knows!

P.S:

The old content has been taken down from view. I will review them at a later date and see if they're up to the quality I wish RestartLater Studios to have. They will, however, stay unedited. If, for some reason, people really want the 5 posts up, I will put them up again (rather back on here, or copy them to a new blog).