• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
chrisprij

Planned Terrain Generation

4 posts in this topic

Hello Everybody smile.png 
 

So currently I'm working on a project where I'm making a semi-clone of an already existing game so I can grasp the technical aspects of creating the 3D backbone from scratch in C++ (using SDL to create window and load images, but that's about it, I want to learn most of the game-coding stuff from scratch, which is fun for me), and already have a template to follow for how the game, map, events, etc. should be planned out. Right now, I'm pretty well into making the engine, but I am catching one snag -- I'm working on creating mesh-making tools, which isn't so bad right now because most things are squares/boxes and stuff, so I made tools to put in squares, select textures, etc. to make those run smoothly.

 

My current problem comes when trying to do terrain that deals with mountains, caves, and more complex terrain than just a straightforward flat town and box buildings. I sort-of understand how to make terrain based on noise or hight maps and such, but I was wondering what you all have in ideas for developing mostly pre-planned terrain?

 

I want to take the terrain from the first game that I'm semi-cloning and recreate it in 3D (the previous game is in 2D). So I have a bit of open room to maneuver with that change in display from 2D to 3D, but I still want the land to roughly follow the land in the 2D game. Any ideas?

 

Basically think of making a clone of zelda or harvest moon, from one of their old gameboy games (2D top-down game with an expansive world). It's that type of conversion.

--> instead of "ladders" and scene changes (screen goes black when you enter building, then reappear inside), I want everything to work as a 3D world; everything should not need those transitions.

 

NOTE: Sorry for being so secretive. ph34r.png I just want to keep my project a surprise for when I release it for people to test out and enjoy biggrin.png

1

Share this post


Link to post
Share on other sites

I was wondering what you all have in ideas for developing mostly pre-planned terrain?

As in, not procedurally generated, but hand-modeled?

 

Use a 3d editor and import the mesh.  Or if you're interested in the learning aspect, do what I did and write a custom level-building tool that lets you "paint" terrain geometry (things like raise/lower terrain).

 

Edit: for more detail, I wrote a tool that uses picking to figure out where I'm pointing at my terrain mesh in the viewport, selects all nearby vertices in the mesh data based on my current brush radius, and applies the current modifier to all those vertices.  So if I have "lower terrain" selected, just do a -= operation on their Y values to lower the terrain in that area.  Then you can get fancy and do things like tune-able brush falloff (to simulate a smooth brush border) where the vertices closer to the edge of the brush aren't affected as much as the ones in the middle, and so on.

Edited by BCullis
1

Share this post


Link to post
Share on other sites

As in, not procedurally generated, but hand-modeled?

 

Yes, exactly. I still have freedom to do what I want, but following roughly the layout of the caves and land from the 2D game. 

 

 

Edit: for more detail, I wrote a tool that uses picking to figure out where I'm pointing at my terrain mesh in the viewport, selects all nearby vertices in the mesh data based on my current brush radius, and applies the current modifier to all those vertices.  So if I have "lower terrain" selected, just do a -= operation on their Y values to lower the terrain in that area.  Then you can get fancy and do things like tune-able brush falloff (to simulate a smooth brush border) where the vertices closer to the edge of the brush aren't affected as much as the ones in the middle, and so on.

This is exactly something I wanted to get from this question biggrin.png  Thanks for the narrowed down answer, you hit it right on the head! I'm pretty sure you clarified the whole concept when it comes to a level editor for me tongue.png For clarification, is it easiest to start with a flat mesh or some easily computed mesh, and then apply these changes to it? Once I know where to start, I think creating these tools will be much easier to accomplish. 

 

And one last question, if I may: What if you want to add "vertices" or make the scene more complex? I know that should be just another tool, but are there any ideas or topics that can get me started there as well? 

0

Share this post


Link to post
Share on other sites

For clarification, is it easiest to start with a flat mesh or some easily computed mesh, and then apply these changes to it? Once I know where to start, I think creating these tools will be much easier to accomplish.


It's easier to start with a flat mesh.  I generate it in the tool (it's really easy to make a flat grid of vertices, I just establish an x-step value and a z-step value, and walk through the array of verts giving them appropriate x- and z-locations.  Y is 0.).  Though if you have a pipeline to bring in external meshes, it's just as easy to model something up outside the tool and then import it to do further tweaks (and in my case, all the game-contextual stuff like triggers and props).

And one last question, if I may: What if you want to add "vertices" or make the scene more complex? I know that should be just another tool, but are there any ideas or topics that can get me started there as well?

 

Now you're talking about procedural mesh generation and even topology algorithms.  This is a huge can of worms that I'm happy to call "my current brain candy".  I can't give you any really good advice yet as I'm still sifting through it all.  Keep in mind though, this is for things like "I want to grow the terrain here, but keep the vertex density the same" or "I want to cut a hole in the terrain to stick a cave mouth prefab into, and then retriangulate the edges to fix the seam".  If you just want to add separate objects to the scene, that'll depend on the definition of your "level".  My current solution is just to keep a list of all prop (what I call my static meshes) IDs and their world transform information (location, scale, rotation).  When the level loads in the game, it reads through that data and populates it accordingly with actual prop instances.

2

Share this post


Link to post
Share on other sites

BCullis: Thank you so much for your fast response! I'll have to get to making these tools as soon as my finals are over :)

 

 

 

And one last question, if I may: What if you want to add "vertices" or make the scene more complex? I know that should be just another tool, but are there any ideas or topics that can get me started there as well?

 

Now you're talking about procedural mesh generation and even topology algorithms.  This is a huge can of worms that I'm happy to call "my current brain candy".  I can't give you any really good advice yet as I'm still sifting through it all.  Keep in mind though, this is for things like "I want to grow the terrain here, but keep the vertex density the same" or "I want to cut a hole in the terrain to stick a cave mouth prefab into, and then retriangulate the edges to fix the seam".  If you just want to add separate objects to the scene, that'll depend on the definition of your "level".  My current solution is just to keep a list of all prop (what I call my static meshes) IDs and their world transform information (location, scale, rotation).  When the level loads in the game, it reads through that data and populates it accordingly with actual prop instances.

I totally have to agree with you there; Procedural Generation has been all over my mind as I have been toying around with the idea of voxels, but I wanted to root myself in 3D graphics, polygons, and procedural generation before I move on to that. I'm hoping to get into procedural generation after this first project of mine . . . Though I might want to start reading up on it if it can help me develop some parts of my terrain on my current project. One step at a time, though, I'll have to get on to creating some level editing tools first :D

Again, thanks for the sound advice, you really helped clarify things in my situation!!!!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0