Wednesday, April 17, 2019

CPP Progress

I have made progress at last. My implementation of my note-taking app now parses input, doing wildcard matches on the users input, against pipe delimited possibilities. It now creates new Entries and has a method to show them. I need to create the view entry command and I need to format the output, but it's a solid start.

I'm slowly beginning to feel more comfortable with the language and how to accomplish what I need. Pointer types are still tough, but getting better. I finally resolved the re-declaration error from header files being included more than once.

I'll have to setup a Windows vbox so I can grab the SQLITE .dll and compile it for Windows.

More to come...

Monday, April 15, 2019

C++ No Class

I've always worked with OOP patterns, even when I didn't know what I was doing. Honestly it makes sense to me, naturally. It is easy for me to wrap my head around how large problems can be broken down into manageable objects. I feels organic and natural to me. As many OOP explanations point out, it mirrors reality. I have a much harder time understanding functional paradigms. it just feels like the dreaded 'spaghetti code' to me.

However, as a high level language developer digging into C++, my feelings are a bit reversed. When I attempt to define and consume classes etc, I keep running into all sorts of issues - redeclared variables due to includes. However if I remove the offending includes I get 'cannot find X'. I feel as though I'm in a catch 22.

So for my first C++ project I've decided to avoid the headache altogether and code everything within functions. Sort of a noobie functional paradigm. Instead of classes I'll have header files containing that element's functions which are called in main and in turn can call other functions if needed.

So far I have sqlite hooked up and some basic string parsing - which is frustratingly difficult so far. I'm amazed at how difficult simply doing a string split is in C++. More on that in future articles.

Wednesday, April 10, 2019

Im-ugh-ges

Progress on the arcade space mining game was going well. I have created a *workable* random terrain building class and got landing on (and leaving) planets coded. This includes storing the generated terrains in case the player leaves then returns. I updated the movement of the level when it's a planet type to keep the player boxed into the generated terrain (it's set really large so they'd have to go for a long time before hitting the edge).

Clearly something was about to go wrong.

It was time to swap out the colored squares of the terrains with terrain images (although it's arcade style, drawing in Java is just a pain - I've tried drawing everything in Java in the past, untenable). I created images for the handful of terrain types, and swapped the colors out for BufferedImages.

Kaboom!

Complete IO and processing meltdown. So I went in and made the terrain a collection of image names, and just had single images of each type and then just drew them in the proper places in the grid. This went much better. But it is still horribly tanked. I'm going to adjust the images sizes and lessen the amount of them. I'll also be making sure I'm not drawing tiles that aren't even on the screen.

Perhaps now is the time to bite the bullet and ditch Java for something more conducive - even though I love Java, and am very comfortable in it now.

Monday, April 8, 2019

Terraforming

The next step in the arcade-style space mining game I'm making is terraforming. I need to be able to build planets randomly. In previous attempts the planet surface was just tiled backgrounds but now I want to build actual world topography.
To do so I'm first building an elevation map then using that to build the terrain tiles. I have a sea level value to determine whether the tile is above or below sea level. And I also take into account the latitude, so I can generate the polar and equator regions. I will later expand this but so far the tiles somewhat resemble a planets topography. There is some other logic built in it to handle areas of water.
It works in the stand alone working project. I still need to update it to function within the game project itself.

5 VST Effects I Use in Every Song

VSTs are so great. I have a massive collection of free instruments and FX that I've tracked down. There are SOO many to choose from... B...