Ending and Beginning

Published September 28, 2014
Advertisement
Hey everyone. This is my first journal entry here on gamedev.net. I thought I would try to get in the habit of making a weekly entry here, if only to gather my thoughts and try to think critically about what I'm doing tongue.png I know this is the final day of the Week of Awesome (which I sadly didn't participate in), so it'll likely be drowned in a sea of entries, but, if I didn't do it today, it would be postponed another week, so. thanks to anyone who takes the time to read it smile.png

Since this is my first entry, a little background: I'm 36 years old, and just began programming earlier this year. I started with java, then moved into python, then finally into c++. I started work with SFML and c++ and was making 2D games. I recently started a new project with OpenGL. While I tend to learn quickly, there are certainly some giant gaps in my programming knowledge, as I'm using online resources primarily, and learning as I go. I would love any critical feedback on anything I post here, but please keep in mind I am not a seasoned developer and so much of the code may be less than ideal.

I'm currently abandoning my first project (perhaps only temporarily). It was a space survival/gathering simulator and my first 3D project.
I sadly don't have a github for this project, though could probably upload one if anyone wanted to take a peek.
My current thoughts and lessons learned:

Tools:
OpenGL, c++, SFML for audio.

Game:
3D survivalish space sim. You control a spaceship and can explore different star systems, suck out the atmosphere of the planets, or drill for minerals or beam up the lifeforms on the planet. The goal was supposed to be to create your own planet to live on and make it sustainable.

Approach:
As this was my first project, it truly began with just opening a window, and as I learned OpenGL and c++ I incorporated more and more into the program. While this was a fantastic way to learn, in hindsight, it is perhaps not the best way to develop a game tongue.png So much of the code had to be rewritten, parsed down, rearranged etc. Additionally, the lack of planning began to make adding new elements to the game difficult as they had to be shoehorned into the existing code. A little bit of planning beforehand would have saved me weeks of rewriting code in order to incorporate the new elements. As this was my first 3D game, and first foray into anything resembling a complex game, I don't think I could have done it any differently and I'm hoping that much of this just comes with experience. I'll address some of the specific lessons in the journal below. But, all in all, I learned the value of having a good deal of planning beforehand smile.png

Obstacles:
Movement: Quaternions! Initially the bane of my existence, now my dearest friend. As a full 3d space sim, I quickly learned the limitations of trigonometry and game development (and my understanding of matrix math). Ultimately, they turned out much easier to implement and use than I was making them out to be. I was a little thrown off by how difficult everyone on forums described them. I found tutorials overly complex and less than helpful in actually describing what I was doing. Ended up having a eureka moment when I realized they were just rotations along an axis tongue.png

Shaders:
I still don't have the greatest handle on shaders, but am finally able to implement at least basic lighting, a simple geometry shader, particle shader, etc.

Efficiency:

My lack of a computer science background is biting me here. I am generally able to limit unnecessary or needlessly repetitive code, and streamline OpenGL a little so as not to unnecessarily bind and rebind different shaders or VBO's etc. Perhaps it's not as bad as I imagine but it's "what I don't know that I don't know" that I worry about here. Ultimately I was able to generate about 900 solar systems with about 7 planets each having their own orbits, atmosphere, etc. and still get it to run at 60fps on my graphics card. It could certainly be more efficient and if I continue development, it certainly will need to be as I add elements into the game.



3D modeling and artwork:


Well, I'm not an artist. I have skills enough to be described as amateur at best when it comes to art. I was learning how to 3D model at this same time, but did not spend nearly as much time on it. Luckily, being a space game, it was mostly spheres tongue.png Either I need to make friends with a 3D artist or dedicate much more time learning the ins and outs.



Fun:
This ended up being the reason why I am abandoning development. I initially wanted the game to play a little like "Don't Starve" or really any other survival type game. But, as mentioned above, I didn't really plan things out. After the game systems were in place I was smacked in the face with the reality of making a game fun. The first problem was that there was really no sense of urgency or danger, or really a need to make a livable planet. So, I added a "family" to your character. I plopped them down on a barely habitable planet, and set the gravity so that the atmosphere would slowly leak away, and the animals were imbalanced and killing each other off. This helped a little, but I have to admit, it felt weird being a space traveling creature who had to survive off meat tongue.png Additionally, it made every creature in the game serve the same purpose, which wasn't terribly interesting, and the only game obstacle was making the creatures play along with each other(they all had randomly assigned "attributes" and when placed together on a planet, would either kill each other off or balance out).

I could go on about the "fun" factors or lack thereof, but honestly, when it came down to it, the game just wasn't all that fun. It was overwhelming because none of this had been planned out or implemented in the code and really it felt like starting from scratch, but worse, because any game implementations had to be roughly forced in to the existing code, making progress much slower and so much less enjoyable. Especially since I had already been working on the game for about 3 months. Since I had no goals when I started this game, I have to admit I didn't really feel a sense of obligation to continue. So, I've decided to cut my losses, learn some valuable lessons and start anew.

so, to the new game:


Sorry for the lack of originality tongue.png But, the new game is a hex based strategy game of fantasy good v evil biggrin.png I've been working on it for a few weeks.
Github is here: https://github.com/Hobogames/TestGames
I've decided (as of this morning tongue.png) to use github to handle different forks and backup my code. Up until now I've been using copy.com and local backups.

Tools:
OpenGL, c++ SFML for image loading, input, audio, UI, window-handling.
Things I've implemented that I wanted to but didn't implement in my first game
More SFML:
I've incorporated OpenGL into an SFML window. My first game I had to hand create a dds of any font that I wanted to use. With SFML, I can use system fonts, which is great, simple and easy. Additionally, the UI is far simpler to handle using the 2D elements of SFML. It was a little more complicated to set up than I had hoped, but now that it is, I'm rather pleased with things. In addition to input and audio, SFML is turning out extremely handy.

Texture Arrays:
I've successfully implemented a texture array to handle my images. Though, I've already screwed up (I think) and used 1000x1000 sized images, which is probably less than ideal both in terms of size (too large?), and (maybe) its inability to be divisible by 32. I'm uncertain about that last part, but my limited experience tells me I should probably worry about efficiency there tongue.png If anyone knows for certain whether that matters, I'm currently torn between resizing everything, or just leaving it be. I'm going to redo all of the artwork and modeling at some point before releasing this (certainly for free), so this isn't a pressing concern at the moment.

Planning!:
So, I've sat down and worked out my game mechanics on paper. It's a pretty standard hex based game, so I'm hoping to not run into the wall of the previous game. Additionally, I've decided to rely a little more heavily on class "managers." I'm uncertain if this is really ideal, but thus far it has been extremely helpful in adding new elements, as the framework is there to incorporate new things. Whether it is new spells, new minions, etc. So, even if things change pretty drastically, it should be rather trivial to implement those changes. Hopefully this new system will make things clearer and less of a jumbled mess of code.

What's implemented so far
Sort of random tile and object generation:
As for as terrain generation goes, this is extremely archaic, but it's generating various "biomes" with good/evil forests, water and mountains. I'm trying to decide whether to delve into the intricacies of random terrain generation, or just tweak the current set up. I don't require too much here, it's not a huge game board, and there aren't that many complicated elements, so I'm unsure if it's necessary to complicate things.

2 Player Turns, with Minions:
Overlay to show how far player is allowed to move, players have magic and health. Rudimentary particle engine is in place so players can cast spells, which drain magic/health. Players can summon minions (currently just one tongue.png), which also have their own turns. Can build home base, that will ultimately be upgradeable, and serve as the players central hub.

Dynamic Camera:
I'm rather proud of this. For each turn, the camera will search out and focus on the player whose turn it is. I'll alter it later to let you tab through the characters, ala the civilization games(or really any strategy game). There are a couple bugs in it currently. 90% of the time it works beautifully. But it changes the height, rotation, and x/z axis simultaneously but independently, so if you're too high, and it reaches the x/z location of the player before it's fully lowered itself it gets a little bumpy in its movements as it alters one, which changes the distance of the other so it moves again. I just need to have it calculate the angle and distance as one directional movement and change that, instead of each independently.
day/night cycle:
Since it's good v evil, the game will switch from day to night. Currently, I'm just dimming/brightening the skybox at the end of every turn, but whether it is day or night will have an effect on the players depending on their affinity.

2D billboarding and animation
I've spent a little more time on the art and 3D modeling out of necessity, though it's still extremely placeholder. I'm going to be honest and admit, I don't actually know how to bumpmap the textures, so everything looks a little cell-shaded. Additionally, I've billboarded the players to compensate for my lack of knowing how to animate 3D models (other than the archaic stop-motion method). It does add a bit of charm I think, and additionally, developing this alone, I'm unsure if i'll have time to really do a lot of skeleton rigging, etc for a whole slough of minions and everything. So, 2D billboarding for players, and simply animating those is far easier and far less time consuming.

To be Implemented:
Villages and NPC's. AI is going to take a lot of learning on my part and I've already started my reading on it. Being a 2 player game, I may scrap the AI as it's not intrinsically necessary.

More spells, characters, upgrades, etc:
The basics of movement and attacking are in place, but little else. So, the slow process of adding and balancing skills, minions, etc.

Options:
My first game didn't really have slidable options for volume, screen size, etc. I still need to implement all of this. I've at least taken the initial steps to set a variable to the screen size that is changeable, and with SFML handling the window, it scales things automatically. I've yet to add audio and am waiting until I've set up the options module.

Audio:
I've actually been a musician all of my life, playing piano, guitar and violin. Though, for my first game I used assets from freesound.org as music is time consuming, and I'm already stretched pretty thin. I'd like to rely less on open assets and create my own. But, this would be a pretty large undertaking in addition to programming and the artwork, so.....I don't know. Perhaps I'll do some light work and make the atmosphere rather minimalistic.

Thoughts:
I'm sitting down with a friend who is a DM and plays waaay too much D&D, to go over some of the intricacies of the game mechanics. Though the initial framework is laid out, the specifics are definitely not, and I don't want to implement too much if there's a danger of it changing too drastically.

I've already let the code become far more messy than I had originally planned. I had these great intentions of keeping everything neat and documented, but over time it's becoming less so. And, I'm only two weeks in. I try to periodically go through and clean/document things, but I'm already lapsing into bad habits with mixed cases and poor naming. If I ever do want to collaborate with anyone, I definitely need to rehabitualize myself. I'm working on it tongue.png

That's about it. Feel free to go through the code and let me know what you think. Just remember I'm still quite the beginner tongue.png and please let the criticism be constructive. I'll definitely appreciate the feedback though smile.png Additionally, I've only compiled this on linux, as I've wiped my Windows drive and haven't bothered to reinstall it (it tends to bork my boot loader, and is a pain to fix). If anyone tries to run it on windows, feel free to let me know what's missing to compile it on windows, I'll do my best to include it and get an .exe working for it.

Here are a couple screenshots from the abandoned game, and the new one. Bear in mind, especially in the shots of the "spells" that it's placeholder art tongue.png:
Credit:
All the artwork ought to be my own terrible art, other than the skyboxes and UI in both images.
skybox credit: here and here
UI credit : here and here
Next Entry Week 2
3 likes 1 comments

Comments

Stormynature

Welcome to the land of journals and don't deprecate your art too much - it looks good.

September 28, 2014 11:45 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Week 4

1812 views

Week 3:

1997 views

Week 2

2253 views
Advertisement