Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411426 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 11:15:38 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsLife on Mars (Sci-Fi Adventure)
Pages: [1] 2 3
Print
Author Topic: Life on Mars (Sci-Fi Adventure)  (Read 5219 times)
Rebusmind
Level 3
***


Game Designer


View Profile WWW
« on: December 13, 2017, 11:01:18 AM »

Working Title: Life on Mars

Genre: Adventure
System: PC
Status: Prototype
Synopsis: A young man living in a small colony on Mars tries to find his place in a society without a history.

Features:
  • a complete colony on Mars to explore, with dozens of characters, places and activities
  • a story-driven experiences that tries to explore what it would be like to live on Mars, knowing Earth only from school books, while also telling a gripping story
  • a pseudo-voxel style that looks 3D, but is completely 2D

What has been done so far?
  • a first prototype is in an advanced state. You can move through the locations, interact with some objects and rotate the camera
  • the direction of the story has been found, now I'm collecting ideas for events and characters
  • the direction for the music is also set and there even exists quite a few tracks already (if they actually get used needs to be seen, though)

What comes next?
  • I want to keep experimenting with the prototype and build every key gameplay element. These are still not decided, so I hope having something playable will shape what the game might play like in the end
  • I need to get better at voxeling (or find somebody who is)

About this devlog
I had a devlog for my last project SwapQuest and tried to post on a regular basis, but it can be really hard. The good thing is that I feel like this game project has a lot more interesting topics to talk about, like the creation of that 3D effect. So I'd like to split this devlog into two parts: articles and updates. I'm not going to say that I will definitely post every week, but that's my personal goal.

If you have questions or want to know about something specific, leave a comment, I'll reply as soon as I can.

Articles

   



« Last Edit: March 03, 2018, 10:45:41 AM by Rebusmind » Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #1 on: December 14, 2017, 11:40:05 AM »

The Evolution of the graphical Style

I had the idea for this game in 2013, but back then it was planned as a simple pixel art game. A year ago I saw someone on Twitter posting a gif of a boat that looked 3D but was instead drawn layer by layer, with each layer shifted up a little. It looked amazing and I wanted to try that myself, but didn't have the time as I was still working on the console port of SwapQuest.
After that was out of the way, I finally got the opportunity to try it out. I will go through the different stages of the development of the graphical style now, explaining what worked and what didn't.



Stage 1: The Room
To test the effect I made a simple room that was just one object and a ground image. I rotated everything around the same point (the ground center) and voila, it visually worked. But here's the problem: there's no way to determine if something not part of that image is in front or behind certain parts. For that, every part of the room needs to be it's own object, so that they can be drawn in a different order.


A first room drawn by one object.

Saving everything as its own object was pretty easy, but now I had to find an algorithm that determines which object is drawn at which time. First attempts didn't work out that well.


After splitting the room into several objects, some heavy clipping occurred.

After some experiments I found a solution that kinda worked, but in the end was too unstable to use it for an entire game. This method sorted all objects as follows:
  • Make two lists
  • Fill the first list with every object with a y value smaller than the y value of the center (from farthest to nearest)
  • Fill the second list with every object with a y value bigger than the y value of the center (from nearest to farthest)
  • Join both lists
This may sound a bit silly to someone with experience with these kinds of things, but I was pretty happy with that approach at first, until one big problem arose.

   
Left: the new algorithm before adding the wall fix. Right: after adding the wall fix.

It only worked for pretty small objects. The walls, for example, would clip in front of other objects inside the room, so I had to put the origin of them farther back to make sure they are definitely drawn either first or last depending on their position. The same happened when bigger objects stood too close to each other. As I didn't want to limit my possibilities later on, I had to find another approach.


At the end of the gif you can briefly see there’s still a problem with bigger objects and clipping.



Stage 2: Slicing it up
As big objects seemed to be the weakness of the first approach, I came up with an idea to avoid them completely: break everything down into chunks of the same size. This of course would hurt the performance quite a bit, as this means a lot more objects and draw calls, but I wanted to see how it performs first.


After cutting everything into chunks of the same size, clipping was finally not a problem anymore.
Fun Fact: instead of having a camera follow the player and rotate, the whole world rotates around
the player, who doesn’t move at all.

As I assumed, performance took quite a hit, but it wasn’t a problem on my PC, so I kept it that way. I’m sure there will be a lot of ways to optimize later in the development. One quick fix I already added was to make every object not on screen invisible, so that the draw event is not executed at all.



Stage 3: Bring the world to life
The next element I wanted to put into the prototype were NPCs. As the game will have many (MANY) characters on screen at once (e.g. if you are on a busy street), I decided to implement them a bit different from the normal objects. Instead of drawing them layer by layer, I pre-rendered them in the same way and then saved the output at different rotation angles (right now one frame every 22°). In the game their rotation is now handled through their image_number instead of the image_angle. Of course that results in choppier movement, but I think it’s still nice enough to look at.


NPCs are divided into the legs, the torso and the head. That way, they can turn their head towards
interesting objects/people and I can also mix up different heads and clothes for more visual variety.

Another way of making the world feel more alive is to move stuff around. As the world is built with chunks, moving them around could make the clipping a problem again, so to avoid that I have to be careful with what I animate. In the train scene below, for example, the ground is drawn at a much lower depth, so that it actually never could overlap with the train. As the player will only ever be able to move inside the train while it’s moving, this is a safe method of having a big moving scenery here.


The ground is not divided into chunks, which would have resulted in way too many objects.



Stage 4: True fake 3D
Displaying the world in fake 3D is cool and all, but sometimes you just don’t want to keep moving on a 2D plane and climb some stairs or use an elevator. This proved to be quite a problem, as this meant that the player would be able to “walk through” chunks now. The depth ordering until this point was a simple depth = -y;, which means that the larger the y value, the later it is drawn to the screen. But as every chunk has its origin in the center (in order to be able to rotate it around that origin), the player would now be able to “cross” the center while, for example, walking up stairs. The problem with that can be seen below.


Moving on the ground is fine, but as soon as the player walks on a chunk, the depth ordering
breaks.

Finding a solution for that took me two whole days of intense thinking (something I try to avoid as best as I can) and I have to admit, it’s one of these rare cases where I don’t fully understand why it works that well. I added a little piece of code right under the code I posted above:

Code:
var inst_near = instance_nearest(x, bbox_bottom-1, obj_3Dchunk);
if height>0 and instance_exists(inst_near)
and point_distance(x, bbox_bottom-1, inst_near.x, inst_near.y)<16
{
    with(instance_nearest(x, bbox_bottom-1, obj_3Dchunk))
    {
        obj_player.depth = depth-10;
    }
}

This means that if the player height is bigger than 0, the depth of the player is set a slightly smaller value than the depth of the nearest chunk from the bottom of the bounding box of the player. That way I make sure the player is always standing on the chunk he’s on and not vanishing behind it.


Now the player is always on top of the chunk he is standing on. It’s not perfect, though, as can be
seen when the player initially steps on the stairway.

That concludes this article, I know it was a lot, but I hope it was a bit interesting. If you have questions, let me know. I’m also very thankful for feedback, especially if you know of a better way of doing the stuff I’m trying with this prototype.

Take care, everyone!

Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
vga256
Level 0
*



View Profile
« Reply #2 on: December 14, 2017, 12:44:05 PM »

I'm having engine envy. What are you using to build this with? Looks beautiful.

Out of curiosity, have you read Kim Stan Robinson's Red Mars series? Sure does remind me of it.
« Last Edit: December 14, 2017, 04:03:53 PM by vga256 » Logged
Aquanoctis
Level 6
*


View Profile WWW
« Reply #3 on: December 14, 2017, 12:48:42 PM »

This is looking cool. You're doing this in Game Maker right? I was working on a level editor to make building these 2.5d-style levels recently funnily enough, using a similar technique to yours [link] but I never worked out how to effectively solve to whole moving 'up' stairs problem. Seems like you got it though!
Will def be following this project, looks sweet :D
« Last Edit: December 14, 2017, 04:26:05 PM by Aquanoctis » Logged
Devi Ever
Level 2
**



View Profile WWW
« Reply #4 on: December 14, 2017, 04:02:48 PM »

Love the look of this and the setting! :D
Logged

Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #5 on: December 14, 2017, 09:02:25 PM »

I'm having engine envy. What are you using to build this with? Looks beautiful.

Out of curiosity, have you read Kim Stan Robinson's Red Mars series? Sure does remind me of it.
Thanks! I'm using Game Maker: Studio, which is great for everything 2D.
To be perfectly honest, my Mars research is almost zero at this point, so I'm thankful for suggestions. I'm aiming for a semi-realistic tone in the story, so that it does feel like Mars, but there might also be some fictional stuff to make it more interesting. Smiley

This is looking cool. You're doing this in Game Maker right? I was working on a level editor to make building these 2.5d-style levels recently funnily enough, using a similar technique to yours [link] but I never worked out how to effectively solve to whole moving 'up' stairs problem. Seems like you got it though!
Will def be following this project, looks sweet :D
Thanks, yeah, using Game Maker: Studio. Your level editor looks awesome! How did you solve the depth sorting? Stacking objects looks pretty solid in that gif you posted, I haven't seen any clipping problems. Shouldn't moving 'up' something work that way as well (I mean, isn't that the same as 'stacking' objects?)?

Love the look of this and the setting! :D
Thanks! Grin
Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
Aquanoctis
Level 6
*


View Profile WWW
« Reply #6 on: December 15, 2017, 05:53:53 AM »

I had to approach it in a slightly different way, because I'm moving the player through the world, rather than moving the world around the player so it's more of a getting-collisions-to-line-up-correctly-with-the-visuals sorta thing. Instead of depth = -y I'm calcuating the x,y coordinates as if they were aligned to the camera angle. I did try dynamically shifting the origin of larger objects to avoid having to cut them up into smaller chunks but that wasn't too succesful Cheesy I'm not a programmer so I'm likely overthinking it and have probably got it working and haven't realized! Considering your way seems to work so well though I might reconsider, hmmm

EDIT: Thinking about it, how do you go about creating your levels using GMs default editor? If you wanted to create a room with stairs that goes to a floor that overhangs the first for example? Do you simply resolve to not create any levels that have overhangs?
« Last Edit: December 15, 2017, 05:59:38 AM by Aquanoctis » Logged
Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #7 on: December 15, 2017, 08:01:52 AM »

I had to approach it in a slightly different way, because I'm moving the player through the world, rather than moving the world around the player so it's more of a getting-collisions-to-line-up-correctly-with-the-visuals sorta thing. Instead of depth = -y I'm calcuating the x,y coordinates as if they were aligned to the camera angle. I did try dynamically shifting the origin of larger objects to avoid having to cut them up into smaller chunks but that wasn't too succesful Cheesy I'm not a programmer so I'm likely overthinking it and have probably got it working and haven't realized! Considering your way seems to work so well though I might reconsider, hmmm
Ah, so you use view_angle to rotate the camera. The reason I move the world instead of the player was that I didn't want to bother with room sizes. Looking back now it's a bit stupid, but it worked so well that I just went with it. My approach is definitely very unefficient, though. I'm also not a programmer, so we're in the same boat of second-guessing every decision we make (and probably rightfully so Grin).

Quote
EDIT: Thinking about it, how do you go about creating your levels using GMs default editor? If you wanted to create a room with stairs that goes to a floor that overhangs the first for example? Do you simply resolve to not create any levels that have overhangs?
Yeah, I use the default editor. So far I have no overhangs, but I was thinking of making the train two stories high. I guess I would just add triggers that switch the collision objects on an off to make it work. In my mind that would be easy to implement, but maybe I overlooked some detail.

Btw. do you also have a devlog about your project here? Would love to see more. Smiley
Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
io3 creations
Level 10
*****



View Profile WWW
« Reply #8 on: December 15, 2017, 02:20:08 PM »


Really like the visuals. In part it's the lo-fi nostalgia of Commodore 64 8bit visuals mixed with some of the 3d visuals I would've liked to see in games. Smiley

Having done various pseudo 2d/3d games, I'd say if your approach can handle your requirements then it's "good enough".  But having moved to Unity makes working with the 3d aspects so much easier.  It may not be able to handle every aspect, but at first I thought you created the game visuals with voxels.

Also, after reading the title, the visuals reminded me of Total Recall (the one with Arnie, not the recent remake). Smiley 
Logged

faborro
Level 0
**


View Profile
« Reply #9 on: December 15, 2017, 03:17:22 PM »

Looks and sounds intriguing. I especially like the story, very current topic Smiley
Logged

ollie_r
Level 0
**



View Profile
« Reply #10 on: December 15, 2017, 09:10:57 PM »

This looks really interesting!
Logged
Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #11 on: December 15, 2017, 09:30:35 PM »

Really like the visuals. In part it's the lo-fi nostalgia of Commodore 64 8bit visuals mixed with some of the 3d visuals I would've liked to see in games. Smiley

Having done various pseudo 2d/3d games, I'd say if your approach can handle your requirements then it's "good enough".  But having moved to Unity makes working with the 3d aspects so much easier.  It may not be able to handle every aspect, but at first I thought you created the game visuals with voxels.

Also, after reading the title, the visuals reminded me of Total Recall (the one with Arnie, not the recent remake). Smiley 
Thanks! I've been thinking about my approach a lot and it's a bit nuts, as you could easily do this kind of style in 3D in a lot more efficient way. But as I've always had a hard time wrapping my head around actual 3D programming, this is as close as I'll get. Also, there's something about retro-inspired graphics and sci-fi themes that really resonates with me, probably because I grew up with movies like Star Wars and Total Recall. Grin

Looks and sounds intriguing. I especially like the story, very current topic Smiley
Haha, thanks. I gotta admit, though, the story is the part of this project I'm the most anxious about. So far none of my games had an intriguing story (more a background for the gameplay), so I'm not the most confident about my writing abilities. But I have a lot of loose ideas so far, let's see if I can come up with a nice narrative with them.

This looks really interesting!
Thanks! Smiley
Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
SolS
Level 5
*****



View Profile WWW
« Reply #12 on: December 15, 2017, 11:53:49 PM »

Wow, really nice visuals!
Logged

Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #13 on: December 16, 2017, 11:33:31 AM »

UPDATE 01

Worked on a new scene today. It's a station of MARSec, the police in the colony. I'm not a big fan of the colors (I always have a hard time finding colors that go well together), so I'm likely to do another pass soon. So far I'm happy with the layout, though. What do you think?




« Last Edit: December 29, 2017, 01:20:34 PM by Rebusmind » Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
Aquanoctis
Level 6
*


View Profile WWW
« Reply #14 on: December 16, 2017, 04:57:40 PM »

Looking sweeeet

Quote from: Rebusmind
Btw. do you also have a devlog about your project here? Would love to see more. Smiley
Aha, unfortunately not yet...there isn't much of a game to go with it so far! One day, one day.
Logged
nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #15 on: December 16, 2017, 11:19:06 PM »

I'll be following this! Two questions: have you read Ray Bradbury's The Martian Chronicles? And should I bother reading The Martian if I thought the movie was pretty boring?
Logged

Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #16 on: December 17, 2017, 03:42:12 AM »

Aha, unfortunately not yet...there isn't much of a game to go with it so far! One day, one day.
Be sure to let me know when that day comes. Wink

I'll be following this! Two questions: have you read Ray Bradbury's The Martian Chronicles? And should I bother reading The Martian if I thought the movie was pretty boring?
Fahrenheit 451 is one of my favorite sci-fi books, but I haven't read anything else by Ray Bradbury (aside from half a book of short stories). Can you recommend it?
I've read maybe half of The Martian, but I was pretty bored as well. It's a fascinating perspective, but the jokes didn't make me laugh and after a while it became a bit tedious to read, so I just stopped.
If you have any other recommendations (be it fiction or not), I'll gladly hear them.
Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #17 on: December 17, 2017, 08:31:04 PM »

The Martian Chronicles is also short stories. I read it forever ago, but I still vividly remember at least one of them, so I probably would recommend it. (All the stories take place on Mars, so good inspiration, right?)
Logged

Rebusmind
Level 3
***


Game Designer


View Profile WWW
« Reply #18 on: December 18, 2017, 11:11:54 AM »

The Martian Chronicles is also short stories. I read it forever ago, but I still vividly remember at least one of them, so I probably would recommend it. (All the stories take place on Mars, so good inspiration, right?)
Sounds good, I should check it out. Thanks! Smiley

Have you played Flashback on the Genesis? Although you sadly never go to Mars it's still a very Total Recall like game and it's always been very inspiring to me. You'd definitely get some good ideas from it I'd think!
I LOVED playing Flashback as a child (on the SNES, though, but I think they were identical). Unfortunately I never got past the level after the game show. The atmosphere and graphics were amazing back then. I have to admit, I thought about Flashback a few times since I started this project.
Logged


<a href="http://www.indiedb.com/games/life-on-mars" title="View Life on Mars on Indie DB" target="_blank"><img src="http://button.indiedb.com/popularity/medium/games/65022.png" alt="Life on Mars
io3 creations
Level 10
*****



View Profile WWW
« Reply #19 on: December 18, 2017, 02:35:34 PM »

Really like the visuals. In part it's the lo-fi nostalgia of Commodore 64 8bit visuals mixed with some of the 3d visuals I would've liked to see in games. Smiley

Having done various pseudo 2d/3d games, I'd say if your approach can handle your requirements then it's "good enough".  But having moved to Unity makes working with the 3d aspects so much easier.  It may not be able to handle every aspect, but at first I thought you created the game visuals with voxels.

Also, after reading the title, the visuals reminded me of Total Recall (the one with Arnie, not the recent remake). Smiley 
Thanks! I've been thinking about my approach a lot and it's a bit nuts, as you could easily do this kind of style in 3D in a lot more efficient way. But as I've always had a hard time wrapping my head around actual 3D programming, this is as close as I'll get.
Sounds strange that you'd have a hard time  with 3d programming given what you could manage so far.  Sure, certain aspects might be more complex but not necessarily more complicated.  Is there something in particular?


Also, there's something about retro-inspired graphics and sci-fi themes that really resonates with me, probably because I grew up with movies like Star Wars and Total Recall. Grin
Yeah, those were great movies to grow up with. Smiley

I was also going to mention The Martian.  To me it was interesting that based on the space exploration of the last few decaded (especially, having landed on Mars), I had this strange feeling of switching between watching fiction and watching a documentary. Smiley

Looks and sounds intriguing. I especially like the story, very current topic Smiley
Haha, thanks. I gotta admit, though, the story is the part of this project I'm the most anxious about. So far none of my games had an intriguing story (more a background for the gameplay), so I'm not the most confident about my writing abilities. But I have a lot of loose ideas so far, let's see if I can come up with a nice narrative with them.
That's funny because that's pretty much how I approached the "story" for my games so far.  There are a few more that don't really need a very deep story but eventually I'd like to do at least a few games with a decent story.  It doesn't seem that hard.  Just follow the tried and true formulas.  I'm looking forward to what you come up with. Wink


Worked on a new scene today. It's a station of MARSec, the police in the colony. I'm not a big fan of the colors (I always have a hard time finding colors that go well together), so I'm likely to do another pass soon. So far I'm happy with the layout, though. What do you think?

In general, if you haven't done so, you could look into color theory.  Complimentary colors is a good place to start for selecting colors that work well together. 

In terms of the image you posted, my first impression is that here's too much bright colors (the light green) in that location compared to other images that tend to have darker colors for the floor and brighter/lighter colors for the walls or other vertical surfaces.
Logged

Pages: [1] 2 3
Print
Jump to:  

Theme orange-lt created by panic