Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / FPS Help. Setting up terrain. (Section 1)

Author
Message
Somarl
8
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 4th Jan 2014 15:32 Edited at: 4th Jan 2014 15:32
Following on from this thread I have decided to see how far I can get with this in the hope I can learn enough to go further than I could before.
http://forum.thegamecreators.com/?m=forum_view&t=209140&b=1

First things first I want to establish that this is not a tutorial in itself. Just a series of questions I will be asking (split over different forum posts) in order to understand how things are put together. So I am not asking for someone to actually do this for me, what I am asking for is code and discussions on methods. A ‘how to’ from a-z in order to learn enough to be self-sufficient.
I have gotten through the basics as far as any tutorials on here are concerned (so I don’t need links to beginner stuff on the forums) and even have the 2 hands on books which were most helpful in establishing basics but not in helping me venture out solo. I need a beginner to intermediate advancement and this is the way I am doing it. To learn how to build an fps from the ground up, piece by piece which hopefully as much help from the community as I can get and hopefully other newcomers in the same situation can also follow.

Any questions I ask I may already have an idea on how to do them (such as setting up a camera and wsad movement) but I will still ask as I want to know other ways or ways that are conducive with the path I am taking. Its no good helping me set up something that I will not be able to use later for example this one will be about terrain; I know a few ways it can be done but are any of them going to be transferrable to the later question on things like AI pathfinding or will I be bottlenecking myself in and needing to restart all over again. Please bare this “plan” in mind if you would like to help out.

Here is the plan I will be following (I tried to get feedback on if things are in the wrong order or need splitting up more from the above forum post but did not get all that much info hence why I am pressing ahead either to succeed or doomed to fail, any suggestions would still be appreciated. )



All help is greatly appreciated in a way you wont believe because I feel I’ve reached a solo threshold now for a long time where I just cant put the pieces together enough to create something fun so to get past this would greatly please me.

Lets get started with the first question. Which from the above plan goes like this
1) A world to move in.
Setting up the very basics.
a) Simple terrain.
First we set up the screen and create a small textured random terrain.
b) A way to move.
Simple unrestricted camera movement to move round that terrain.
There are a lot of ways to make terrain and buildings and so on but I do not know where to start that will allow me to progress through to the next stage. If its possible can we discuss some of the ways we may set up a terrain that we can make our own at a later date? Any building assets I was thinking of creating very simple buildings out of blender (something that anyone can learn and is free). So where can we start? I just want one reasonable versatile method for setting up terrain that will not impede the future plan.

Thanks in advance.
Derek Darkly
7
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 5th Jan 2014 19:36 Edited at: 5th Jan 2014 19:38
Quote: "There are a lot of ways to make terrain and buildings and so on but I do not know where to start that will allow me to progress through to the next stage."


I understand where you're coming from. Sometimes there are so many choices one doesn't know which route to take.

In my personal opinion, the most important part of game creation is first envisioning what you would like to see on the screen, then tailoring the game around that vision.

For example, will your terrains be so massive that they need to be split into LOD sections, or will a single terrain per level suffice?

Will your game take place both indoors and out? You could design/load your building levels separately from the outside world, or you could make them part of the overall universe. A combination of both works too, like they do in Skyrim, for example.

A lot of people use Blitz Terrain, some are happy with Advanced Terrain, others like their land meshes to be objects, using Sparky's for the collision.

Personally I'm planning on making a 3-stage, tiling LOD engine using Matrixes for the distant landforms and Advanced Terrain for the immediate surroundings. It should look pretty sweet if I can pull it off.

D.D.
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Jan 2014 04:11
Hi Somarl,

Quote: "1) A world to move in.
Setting up the very basics.
a) Simple terrain.
First we set up the screen and create a small textured random terrain.
b) A way to move.
Simple unrestricted camera movement to move round that terrain."


Here is some code that I think will pretty much cover #1. It sets up a basic terrain with camera movement. The necessary media and the source/project code are included in the download.



The WASD keys and mouse are used for movement. Note that the code does not check the borders, so you can easily move right off the edge of the terrain. Also, while this same terrain will appear every time, it is random in how it looks. If you wanted to make additional terrains, or replace it, you could easily change the heightmap. The more white a color is on the heightmap, the higher it will be on the terrain.

I don't understand why you would make a world and then make a more complicated one in the following step. If it were me, once I had a basic world, I would add the other game components (gun, shooting, buildings, NPCs, AI, etc) before I concerned myself with a more complicated world.

Anyway, this is one way you could get started in the process.

So many games to code.....so little time.

Attachments

Login to view attachments
Somarl
8
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 9th Jan 2014 10:57
Thanks for the advice. I was wondering about using blender(particularly the sculpt part of blender) for making terrain somehow but that code is great. Lots of potential AND a great way to get something up and running quickly. Thank you for that.

There was another post in regards to the order that i wanted to do things (or thought things should go) where i laid out the original plan and asked for criticism in regards to whether any elements were missing or in the wrong order but i got very few replies so hence why i went ahead with the plan as is. I am still open to suggestion as to what parts of the "tutorial plan" are wrong, missing or just a little off (perhaps some are too big and need further breaking down etc).

I believe the code provided will be an excellent base to build upon before worrying about more complex terrain. Although i will be asking in another thread a small problem that is about terrain but is unrelated to this thread and not something i am worrying about immediately just something i would like to ponder.
LBFN
12
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Jan 2014 04:51
Quote: "Thanks for the advice. I was wondering about using blender(particularly the sculpt part of blender) for making terrain somehow but that code is great. Lots of potential AND a great way to get something up and running quickly. Thank you for that."


You are welcome. You could use a 3D modeling program, such as Blender, to make a terrain object. The Advanced Terrain commands are very handy to use, so my preference is to make a heightmap and use the terrain commands to build it. I am not a big fan of Blender, but I see a heightmap tutorial for vv 2.4 here:
http://wiki.blender.org/index.php/Doc:2.4/Tutorials/Textures/Maps/Creating_a_Heightmap_from_a_Plane

I must say that to learn / create material for a tutorial all at the same time is very unusual. Typically, one has learned the subject matter well enough in order to produce the content themselves or with links to references. So, I'm not surprised you did not get a robust response. A person could easily get FPSC and crank out games that are pretty cool. I have FPSC and have done that, but to me it is more enjoyable to develop my own FPS.

That said, I am willing to give you a hand to give this a go. I would suggest that you create a framework that is more general and can be applied to most every FPS. The listing below is a list that I threw together rather quickly, but might give you some perspective on how to approach it:



This definitely will need some tweaking, but it is a place to start. I would suggest as you go along, that you edit this to suit your needs.

So many games to code.....so little time.
Somarl
8
Years of Service
User Offline
Joined: 11th Feb 2011
Location: UK
Posted: 11th Jan 2014 09:50
LBFN, this was the kind of criticism i was looking for back when i posted the original plan in the pro forum . Like i said i made the plan based off my own judgment hoping it was either right or at least close. Looking at your plan things make a lot more sense and i see your point about trying not to create too much. Just get the essentials and the programming down and get stuck into the rest later.

What i may also do (as seen as the emails about it discounted are coming through thick and fast from TGC) is take a look at fps creator: reloaded to see how that sets up an fps and what is needed to add to it to make it work (like what extra code you need to add to personalise it etc).

Once again thank you for your time.

Login to post a reply

Server time is: 2019-04-25 20:50:24
Your offset time is: 2019-04-25 20:50:24