Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1341050 Posts in 61274 Topics- by 52797 Members - Latest Member: cattt

June 23, 2018, 01:21:08 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsThe Ascender - 3D Survival Sandbox / Tower Defense hybrid
Pages: [1] 2
Print
Author Topic: The Ascender - 3D Survival Sandbox / Tower Defense hybrid  (Read 1007 times)
Permafrost11
Level 0
**


[Sample Text]


View Profile
« on: June 07, 2018, 12:04:38 PM »

Hello! At the moment (Jun 7 2018), The Ascender is more of a concept than a game, but I plan to change that!

I'm making this devlog to showcase my game as it progresses and to keep track of it myself. But let me tell you about what it is, or rather, what it's going to be.

The Ascender is going to be a Survival Sandbox game focused on defending a (or multiple) specific point(s) from hordes of enemies that spawn periodically. This game will draw heavy inspiration from mid-late '90s FPS games, and I'm thinking of incorperating some rougelike elements into certain other aspects of the game as well.

I'm not going to say too much on what the game is trying to be, (I wouldn't want to spoil it now, would i?  Well, hello there! ) but as progress continues, more and more about the game will be revealed (obviously).

Until then, I'll leave you with the basic development information and some screenshots of the engine so far:

Language/Engine: C++
Graphics: OpenGL 3.3+
Libraries:
    - GLEW (provides modern OpenGL declarations)
    - GLFW (used for easy window creation and mouse/keyboard input)
    - GLM (provides math classes and utilities (vectors, matrices, etc.) [This would take forever to implement on it's own])
    - stb_image.h (texture decoder)


5x5x5 grid of chunks (game doesn't run this slow, I swear):


Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #1 on: June 07, 2018, 02:48:44 PM »

Currently working on a terrain generator based on a simplex noise implementation using some great public domain source code which you can download yourself here: www.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java

In a prototype I've made for this game, I've already ported this code over to C++ and implemented it, so implementing it here should be a piece of cake Wink. Expect another update in a few minutes.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #2 on: June 07, 2018, 03:31:15 PM »

Got a basic terrain generator! Pretty hard to make out with this screenshot, though.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #3 on: June 08, 2018, 05:32:38 PM »

Got two considerable things done today.

The first thing is fixing up and finalizing the chunk mesh building system. I created a diagram to help explain this:


NOTE: "tiles" are actually cubes/voxels, probably should have referred to them as such Shrug.

EDIT: Each dotted face represents a visible tile/voxel face.

This process essentially results in the mesh becoming the shell of the chunk. In the prototype I made for The Ascender, chunk building was done within each chunk, whereas in this version it's being handled in the world class. The reason for the switch is because beforehand invisible chunks and chunk borders were still being drawn because the system was not aware of adjacent chunks obsuring them. Now, only the visible tile/voxel faces of the visible chunks are being drawn.

I've heard of people using subdivision methods when constructing chunk meshes to cut down the amount of vertices, which is something I may consider doing later on, but for now, this works, so I'm not going to break it.

I'm much prouder of the second thing I accomplished today:


Basic directional lighting!

I know for you experienced OpenGL/GLSL programmers, this isn't much. But that's not what matters to me. What matters is the extremely annoying bug I ran into that took me hours to fix.

When building meshes, I store each piece of data into a std::vector, which is basically a dynamic array which you can add/remove data to. Right now I have three vectors for each VBO (which is like an attribute applied to each vertex of a mesh (ex. position of each vertex, color of each vertex, texture coordinates)), one for positions, one for texture coordinates, and one for normals. Case and point: I was storing the data for the normals into the position vector Facepalm. That took me 2.5 hours to figure out. Oh well.

Up next: Texture altasing (different textures for different block types).
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #4 on: June 09, 2018, 03:59:26 PM »

After two hours of struggling with OpenGL texture coordinates, I now have a working texture atlas!
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #5 on: June 10, 2018, 06:56:37 AM »

Fun times in world generation land!
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #6 on: June 10, 2018, 04:34:28 PM »

Didn't get too much done today, unfortunately  Lips Sealed.

Currently debating whether to fully implement slopes now or wait until I finish collision detection (both of which are going to be nightmare to program). Not sure there's much else to say though, but hopefully I'll make more progress as the week progresses.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #7 on: June 11, 2018, 12:46:17 PM »

So, while I work to get slopes implemented, I've been pondering how I'm going to implement the world generator, and several world mechanics (structures, biomes, landscapes, etc). This will be the first post actually discussing gameplay mechanics like this, so if anyone happens to be reading this, please leave some feedback.

Here's the diagram I have so far:



First of all, I should probably explain the unlocks.
I said in the title of this devlog that The Ascender was a 3D Survival Sandbox + Tower Defense combination, and those unlocks specifically have to do with the TD side of things. Waves in The Ascender work exactly as they do in other TD games: defend yourself and the "beacon" from hordes of enemies (I'll explain what the "beacon" is later on).

That being said, the types specifically have to do with the geometry of the world:

- Normal: one continent surrounded by ocean and maybe a few islands
- Archipelago: several islands within a vast ocean
- Sky: floating islands, I have some amazing ideas for this one
- Underground: vast underground caves under an ocean, with maybe a few islands

The themes have to do with the climate/set-pieces (or structures) of each world:

- Normal: a diverse amount of biomes and structures
- Frozen: a wintery landscape and nordic-themed structures
- Inferno: a dry, fiery and fierce landscape filled with explosive architecture
- Dark: an eternally dark world lit only by bioluminessent creatures

Sizes are self-explanatory.
This leaves you with a total of 16 choices for the world generation (not counting sizes/seed).

I hope to get all of these implemented, and I already have extensive plands for some of these world types.
Regardless, I hope you found this post interesting. I should get back to work now.

Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Daywalker
Level 0
***


Honour and Glory


View Profile WWW
« Reply #8 on: June 11, 2018, 05:29:53 PM »

This will be the first post actually discussing gameplay mechanics like this, so if anyone happens to be reading this, please leave some feedback.

Well you have the ideas down, I'd just like to see a few of these themes and biomes implemented to actually discuss them =P
Logged

Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #9 on: June 12, 2018, 04:54:31 AM »

Quote
Well you have the ideas down, I'd just like to see a few of these themes and biomes implemented to actually discuss them =P

Thanks for the feedback Tongue. Anyway, it will likely be a little while I'm even going to focus on any of these ideas, but they were mainly just plans for the future. Hopefully I'll be able to finish slopes today (assuming I don't run into any stupid bugs), and maybe get started on collision detection.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #10 on: June 12, 2018, 07:46:48 AM »

Here's a screenshot of slopes so far (front and back slopes only):


I, once again, ran into some weird and unusual bugs while creating these slopes:

- Chunk Y-borders were not getting any slopes, this was an easy fix.
- For some reason, back-facing slopes were spawning in mid-air and at random places in the world. I "fixed" this by checking whether or not a slope had ground underneath or above it (as slopes were spawning underground as well). This is likely temporary.
- "Mystery holes":


Not entirely sure what is causing them, though I don't think I've seen them spawn anywhere other than voxels next to adjacent slopes, so that's a start.

Anyway, hopefully I'll get around to implementing left and right facing slopes as well today.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #11 on: June 12, 2018, 10:49:26 AM »

The "mystery holes" and the random floating slopes turned out to be linked all to one thing.

Each voxel has 3 values: a 3D vector for it's position, an integer for it's ID (block type), and another integer for it's model type (cube, slope, etc.)

I never bothered initalizing the model value, as I thought it would defualt to 0 (which is the value I use for CUBE models),
and I would just set the model value to whatever it needed to be.

So, apparently all I needed to do to fix the error was initialize the model value to the CUBE value (which is 0) Huh?.
I figure that problem wasn't about how the game logic handled this, but rather how it was handled in memory.

Regardless, it means I can finally move on to new slopes!
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #12 on: June 12, 2018, 01:36:57 PM »

Ladies and gentlemen, it is done!



Not only did I finish slopes, but I added another octave to the 2D simplex noise plane that generates the world, giving the landscape a bit more detail.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Daywalker
Level 0
***


Honour and Glory


View Profile WWW
« Reply #13 on: June 12, 2018, 04:01:20 PM »

Ladies and gentlemen, it is done!

Not only did I finish slopes, but I added another octave to the 2D simplex noise plane that generates the world, giving the landscape a bit more detail.

Great to hear ! Coffee

So what's next, programming the collision system?
Logged

Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #14 on: June 12, 2018, 04:49:25 PM »

Quote
So what's next, programming the collision system?

Yup.

Me and collision detection have had a long and complicated relationship, so here's hoping everything goes well.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Daywalker
Level 0
***


Honour and Glory


View Profile WWW
« Reply #15 on: June 12, 2018, 05:10:21 PM »

so here's hoping everything goes well.

Gotta have faith ! Hand Thumbs Up LeftSmiley
Logged

Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #16 on: June 13, 2018, 10:00:51 AM »

Well, I'm stumped  Sad.

While writing the collision code, I was originally checking every voxel of every chunk to see if the player was intersecting
with it. This had an obvious disadvantage: the game's FPS was decreased from about 1500 f/s to 30 f/s. So that method was out of the question.

Now I have a better solution: only check the voxels that lie within the chunk that the player is currently within. So I start out by looping through the chunks to see which one the player is in. Once that's done, I loop though all of the voxels within the chunk the the player is in, to see which one the player is colliding with. But that's where the problem lies: It has no problem detecting the chunk that the player is within, but when comes to the voxels themselves...well...nothing's really being picked up  Undecided.

Hopefully I'll have this one figured out before the day ends.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #17 on: June 13, 2018, 11:41:51 AM »

Sometimes, you run into some pretty tough bugs.

There are two types of these bugs.

The first type is exactly as you'd expect. Tough and in your face. Sometimes they require small rewrites. Sometimes they require entire classes to be remade. Sometimes they even require reevaluations of the entire project.

The second type is the one that isn't in your face, the one you can't see the source of. The one that leaves your head scratching for hours only to find out that was something as simple and stupid as the freaking SPAWN POSITION OF THE PLAYER BEING A PERFECT INTEGER  No No NO Outraged.

Anyways, coding is fun.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
PetSkull
Level 1
*


View Profile
« Reply #18 on: June 14, 2018, 01:49:43 AM »

It's the bugs that helps you improve your skills Wink - Well, as long as you remember how you fix'em  Well, hello there!
Logged

Permafrost11
Level 0
**


[Sample Text]


View Profile
« Reply #19 on: June 14, 2018, 07:50:09 AM »

Hello again.

Sorry I haven't posted in a little while, I have finals.
At any rate, this is more of a check-in post just to let you know that I'm still working on the collision detection code, and I have no idea how long it's going to be before it gets finished  Shrug.

Actually, I probably should say that I'm currently working on slope collision, and it's trying it's absolute hardest to not cooperate with me.
Logged

You should totally check out my game:
https://forums.tigsource.com/index.php?topic=65065.0
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic