14 Replies - 1326 Views - Last Post: 27 July 2012 - 06:05 PM Rate Topic: -----

#1 Samkid882  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 03-June 12

How to Make a Game about Survival

Posted 27 July 2012 - 01:01 PM

All my life I've wanted to make a game about survival... and to have it be as realistic as possible, with statistics like Hunger and Thirst, a realistic and hardcore health system, and having to collect resources to survive.

But, with survival, I also like my own twists, mainly zombies or infected, so you always have a senses of fear if you venture onward past your shelter to find supplies to use on either yourself or your shelter. I also like having the fact that you are all alone, with no one around but the infected, so there is a feeling of loneliness in the game.

Anyway, my question is this: where do I start in making a game about survival, specifically from the infected?

I'm not very good with 2d nor 3d graphics nor animations, but I do major in text-based stuff. So I thought this: "Maybe I can make a roguelike?" well, there's one problem with that...

Roguelikes are really hard to code. They require a lot of math and skill with one specific programming language before you start the basics... and I mean the VERY basics, like making the player move around a blank map.

I think the hardest thing about roguelikes are that there are no tutorials on how to start making one, and to expand upon that.

So, could anyone help me make a survival simulation game? It does not have to be a roguelike, btw, I just wanted to point out my idea on making it into one.

Is This A Good Question/Topic? 0
  • +

Replies To: How to Make a Game about Survival

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,169
  • Joined: 12-June 08

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:16 PM

Quote

Roguelikes are really hard to code. They require a lot of math and skill with one specific programming language before you start the basics... and I mean the VERY basics, like making the player move around a blank map.

I believe you already answered your question - stop and learn a language first.. then apply that to your ideas and concepts. When you are not learning proper programming then you can flesh out your system design doc for your game.. what goes in.. what can be cut.. what does what where... and then when you are sufficiently happy in your syntax knowledge then try to whack a game out.

This is what - the fifth or sixth game you have proposed working on, and you have three or four posts in 'post a job'? If you feel like you are running around like a chicken sans head then you are right... that's the point where you keep a notebook of ideas and game mechanics and you batten down to learn a language. Flailing around won't help you... most people won't join up with a group that is chaotic and lacks focus (let alone lacks any dev skills).... yeah.. take this time to learn to code.. It won't happen over night, but it'll happen sooner than if you don't start.

Honestly though - the basics of rougelike games are not that hard. A loop for an engine.. some sort of point class to track where the player is.. a two-d array for your map.. and the ability to understand how to print out where everything is in the 2d array.. so making each line of text printing it and going ot the next line..
Was This Post Helpful? 4
  • +
  • -

#3 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7650
  • View blog
  • Posts: 12,905
  • Joined: 19-March 11

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:18 PM

Any game involving plot is going to require learning a lot. A roguelike requires random access to a character-based display, whether via a library like ncurses, or via some windowing toolkit like Java's Swing (ie, row/column access in a textarea).
A purely text-based, ie, zorklike, will require at a minimum require the ability to parse english-like sentences and operate on the results. ("take torch" -> torch is removed from locale items list and added to character inventory)
If you wanted to use a more visual interface, that would prevent its own problems to solve.

So seeing as how you're going to have to learn something anyway, what do you mostly want to develop?
Was This Post Helpful? 0
  • +
  • -

#4 Samkid882  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 03-June 12

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:19 PM

@modi123_1 I do know C# pretty well... I guess it's time to settle down with just one language, and I choose C#...

Thanks for your post, btw, especially the last little bit. I might just be able to put it all together now...

This post has been edited by Samkid882: 27 July 2012 - 01:21 PM

Was This Post Helpful? 0
  • +
  • -

#5 Tayacan  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 145
  • View blog
  • Posts: 275
  • Joined: 18-January 11

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:20 PM

That's a pretty big question, and really, where to start depends a lot on the kind of game you want to make. I've never tried making a roguelike, but if you want to go 3D, I'd recommend trying a game engine such as Unity3D (which is free and awesome).

There are a few things that are universal to (most) survival games, such as the ability to move. Coding basic movement is a fine way of trying out an engine or technology, so that's where I'd probably start.
Was This Post Helpful? 0
  • +
  • -

#6 Samkid882  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 03-June 12

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:27 PM

Oh man, I didn't expect to get this many replies in this short amount of time...

I want to make it into a roguelike for sure now. I know how to make the player move, but how to I make him detect walls and such?
Was This Post Helpful? 0
  • +
  • -

#7 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:30 PM

Your player is usually represented with (X,Y) coordinates. When the player moves check the (X,Y) coordinates of the map where they want to move to. Is it an empty space? Yes, fine make the move. Is it a wall? Yes, cancel the move. Is it a zombie? Yes, the player is dead. Game Over. You get the idea.
Was This Post Helpful? 0
  • +
  • -

#8 Samkid882  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 03-June 12

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:31 PM

Thanks, I'm about to experiment on making my player detect a basic wall (@ vs. #)
Was This Post Helpful? 0
  • +
  • -

#9 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,169
  • Joined: 12-June 08

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:40 PM

yeah.. sixty eight lines of code and about ten minutes and now I have a rouge like console game that the player can control and it does wall hit detection.. see.. see what happens when you get your foundation underfoot?

Attached Image
Was This Post Helpful? 1
  • +
  • -

#10 Samkid882  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 03-June 12

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:41 PM

quick question... how exactly can I get the current character that the cursor is on?
This is all in C# btw
Was This Post Helpful? 0
  • +
  • -

#11 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:49 PM

You use the array that the map is stored in.
Was This Post Helpful? 0
  • +
  • -

#12 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,169
  • Joined: 12-June 08

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:50 PM

I don't know what you mean.. what cursor? There isn't a cursor.. well except for reading input from the user..
Was This Post Helpful? 0
  • +
  • -

#13 Samkid882  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 72
  • Joined: 03-June 12

Re: How to Make a Game about Survival

Posted 27 July 2012 - 01:56 PM

how exactly would a map array look like?
Was This Post Helpful? -1
  • +
  • -

#14 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9096
  • View blog
  • Posts: 34,169
  • Joined: 12-June 08

Re: How to Make a Game about Survival

Posted 27 July 2012 - 02:02 PM

Like any other 2d array of the language of your choice.

example -vb.net

Quote

Dim mapSize As Int32 = 5

Dim map(mapSize, mapSize) As Int32

Was This Post Helpful? 1
  • +
  • -

#15 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 573
  • View blog
  • Posts: 1,278
  • Joined: 24-April 12

Re: How to Make a Game about Survival

Posted 27 July 2012 - 06:05 PM

Ok. So what you want is a game grid represented as an array (hopefully this font will work right because you have to have a block font):

0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,2,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0
0,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0


This is a house with two rooms. The zeros are empty grid nodes. The 1's are walls. The 2's are doors. Maybe you have to open doors to pass through them. 3's are maybe locked doors.

It's totally up to you, but you can have control codes like this in a grid that represent what's at that spot. Maybe the rule is that if you try and pass through a wall (a one) you can't move in that direction.

When you draw the screen you do it from this grid. You can use characters in a rouge like fashion or you can use square sprites in a full 2D graphical game. In every spot that has a zero maybe you put grass. In every spot that has a 1 you put a wall tile. In every spot that has a 3 maybe you put a door tile. All the tiles are square so they match up easily with this array.

Really, I would forget rogue and move into XNA with actual square sprite tiles.

I tried to do something like this and found I couldn't get enough control of the console screen to position things like I wanted and just gave up and went to a more modern 2D tile sort of thing.

The whole key to understanding this is to realize you have a square array of numbers that represent what's at each square of the grid. Then you draw the grid acording to what's in the array. You can also test things like whether the character is trying to move into a wall square using the array.

A big part of the point here is that you don't have to draw on the screen exactly what's in the array. You can draw blanks where the array has zeros for instance. Or you could draw floor tile sprites in a full 2D graphical game.

So above I've got a 22 by 17 array of integers. It's just a bunch of numbers, but it represents what's in that spot of the grid.


ROFL Chicken sans head. I don't know why that's so hilarious to me but it is.

This post has been edited by BBeck: 27 July 2012 - 06:09 PM

Was This Post Helpful? 3
  • +
  • -

Page 1 of 1