Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 07:50:27 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsQuestica -- Another Gosh Darn Pixel Game
Pages: 1 ... 4 5 [6] 7
Print
Author Topic: Questica -- Another Gosh Darn Pixel Game  (Read 20517 times)
purenickery
Level 0
***



View Profile
« Reply #100 on: April 21, 2016, 11:08:37 AM »

Glad you guys like it!  Smiley

I can make the maps however big I want to, and I'll probably settle on an official size after testing it out for a while. I still need to rewrite town generation to handle the full map (which is the part I am most concerned about doing right).

Right now a full map is about a mile long and takes ~10 minutes to walk all the way across.

I've also gotten cave systems to start generating underneath the island!


Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
purenickery
Level 0
***



View Profile
« Reply #101 on: May 02, 2016, 08:49:44 PM »

I've had to do a lot of refactoring of the base code in order to handle the larger maps effectively. I've always had the map split into individual chunks of tiles, but the system needed a huge overhaul. The big changes were:

-The entire map cannot be loaded into memory all at once, it is too large. I need to save groups of chunks to a file that can be loaded at run-time. I decided on groups of 8x8 chunks to minimize the number of files created and memory used in-game.
-Chunks very close to the player must be added to the sorting buffer asynchronously so there is no jitter in the framerate
-Chunks further away from the player should have all the entities update
-Zooming around the map in editor-mode should be quick and without lag

Here's a visualization of the chunk loading and unloading as the player moves around



Next, I also implemented the asynchronous adding of objects to the sort buffer (so I don't have to sort all the objects being drawn every single frame). Chunks coming in to view will be added to the sort and chunks going out of view will be removed from it



Since then, I've been working on making this all work in multiplayer, which is also proving to be a pretty monstrous task. Once I get that working I'm going to do a much larger post about how the entire networking system is set up!
Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
purenickery
Level 0
***



View Profile
« Reply #102 on: May 10, 2016, 06:16:25 PM »

Added more functionality to the world editor. Finally adding houses is a pretty easy process!

Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
purenickery
Level 0
***



View Profile
« Reply #103 on: May 14, 2016, 06:47:24 PM »

Started moving the town generation over to the big maps. There's a lot of variation and features I have to add this still but I really like how it's coming so far! Smiley

Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
RujiK
Level 2
**



View Profile
« Reply #104 on: May 17, 2016, 12:33:04 PM »

Is that the ole midpoint displacement/diamond square algorithm? That weird straight line of islands on the left looks like it!

I never tried generating roads. The only odd thing is how they kinda go to nowhere. I assume most towns will be connected at some point?
Logged

purenickery
Level 0
***



View Profile
« Reply #105 on: May 19, 2016, 03:09:30 PM »

Is that the ole midpoint displacement/diamond square algorithm? That weird straight line of islands on the left looks like it!

I never tried generating roads. The only odd thing is how they kinda go to nowhere. I assume most towns will be connected at some point?

Close Smiley I'm using Brownian noise at the moment that is offset by distance to the center and some radial noise. I'm probably going to switch from Brownian noise soon to avoid those straight lines. And yes, it starts out generating two big roads through the towns that will eventually connect to other towns!  Smiley


In other news, today I implemented something I've been putting off for YEARS and holy Jesus I could not be happier that I finally put it in. It was easier than I was expecting and looks so stinkin' good in the game.  Hand Shake Left WTF Hand Shake Right Basically,



Dynamic 2d shadows! I'll post something on the devlog soon about how I accomplished it. I'm so stoked about how it turned out!!
Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
purenickery
Level 0
***



View Profile
« Reply #106 on: May 21, 2016, 08:05:37 AM »

Alright pals let's go over how to do these shadows.

In my post about the lighting, I went over the process to give each pixel a 3d coordinate so I'm not going to go over that part again here. Now, I can create a separate frame-buffer to store all the shadow data and reference that on each pixel to find out if it's in shadow.



Based on the time of day, each pixel will look down at the shadow map based on the z height of the pixel. As you can see in the image, the line on the left comes from an area on the tree in shadow, but the line on the right comes from an area on the tree in the light, but they both map to an area on the shadow-map. When I draw the shadow-map, the G channel is used for the darkness of the shadow, and the R channel is used for the height of the pixel that casts the shadow. When each pixel checks the shadow-map to see if it is in shadow, if the pixel drawn on the shadow-map was cast by a pixel with a lower z value, then it isn't actually in shadow.

This will guarantee not only that high objects are not in shadow when flying over trees, it also puts half of each tree in shadow based on where the light is coming from.



In this image, you can see the two lines are coming from different sides of the tree, but the line on the right maps to the shadow cast by the other tree. Since the height of the other tree is higher than the pixel, it gets put in the shadow of the tree to the right. In order to make sure all the shadows align correctly and that higher shadows are drawn on top of lower shadows, we just have to draw the shadows from left to right instead of top to bottom.

All together a scene looks like this now!



And you get this nice effect when walking under the trees




I also have a few other wonderful updates for things we've been working on. Namely, the world editor! Here's a few previews of what's possible now:

Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
Thirteen
Level 0
**


@i_am_thirteen


View Profile WWW
« Reply #107 on: May 22, 2016, 07:03:26 AM »

Those shadows are co beautiful, AAAAAAAAAAAAAAAAAAAAA  Hand Shake RightCrazyHand Shake Left
Logged

PypeBros
Level 0
***


Simplest, but not Simpler


View Profile WWW
« Reply #108 on: May 22, 2016, 07:10:06 AM »

The amount of effort you injected into this dynamic shadows system is impressive. Applause! It's giving a nice distinctive look to your game ;-)
Logged

purenickery
Level 0
***



View Profile
« Reply #109 on: May 22, 2016, 01:33:40 PM »

Those shadows are co beautiful, AAAAAAAAAAAAAAAAAAAAA  Hand Shake RightCrazyHand Shake Left
The amount of effort you injected into this dynamic shadows system is impressive. Applause! It's giving a nice distinctive look to your game ;-)

Thanks guys! Smiley There's still a few more things I have to do, like I want the shadows to move across the ground during the day so I'll have to make some special shadows for when the sun is directly above. Summer break just started so I'll be getting as much done as I can with this game while I have the time  Wink
Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
RujiK
Level 2
**



View Profile
« Reply #110 on: May 23, 2016, 08:49:07 AM »

Wow. That's a lot of work but it really looks nice.

I think most 2d games (Like mine) just draw shadows onto the ground and skip all the hard stuff.
Logged

_bm
Level 2
**


i'm so confused


View Profile WWW
« Reply #111 on: June 11, 2016, 08:14:26 PM »

Wow! What a cool project. Really like the visuals, you've done such a good job with lighting and making things look accurate yet stylistic. Definitely going to stick around.  Hand Thumbs Up Right
Logged

purenickery
Level 0
***



View Profile
« Reply #112 on: June 11, 2016, 08:41:56 PM »

Wow! What a cool project. Really like the visuals, you've done such a good job with lighting and making things look accurate yet stylistic. Definitely going to stick around.  Hand Thumbs Up Right

Thanks! Smiley Ever since I learned how to use shaders I've been getting a little carried away with myself...


Just a quick and dirty update for today, we have something much more cool and exciting coming tomorrow
to show you all!

First, I've changed the entire tile rendering system. Types of tile are ordered by depth and drawn one
on top of the other from deepest to highest. Each type of tile has images for each type of edge so it
can be smoothly drawn. Before, the deepest tile type would be drawn entirely, and each one above it
would only draw the tile in the corner of the tile that had that type. Now, tile draw edges such that
it covers every edge except for the tiles deeper than it. To illustrate the changes I have this gif:


A few other fun features I've added are beaches that generate by the ocean and foggy areas that work
with the shadows!

Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #113 on: June 12, 2016, 08:06:39 PM »

Looking great Nick! Smiley
Logged

RujiK
Level 2
**



View Profile
« Reply #114 on: June 13, 2016, 05:44:02 AM »

Woah. That fog is really cool. Show me a gif of it!
Logged

DiogoRBG
Level 0
**



View Profile WWW
« Reply #115 on: June 13, 2016, 06:18:18 AM »


A few other fun features I've added are beaches that generate by the ocean and foggy areas that work
with the shadows!


nice Hand Thumbs Up Left
ambiance makes all the difference
Logged

kcbanner
Level 0
***


View Profile
« Reply #116 on: June 13, 2016, 07:14:52 AM »

Loving the novel lighting approach you took! I really enjoyed working on the lighting in my project and always great to see how others do it.
Logged

purenickery
Level 0
***



View Profile
« Reply #117 on: June 14, 2016, 09:16:50 PM »

Looking great Nick! Smiley

Thanks Ben! :D

Woah. That fog is really cool. Show me a gif of it!

Here's a video!!



nice Hand Thumbs Up Left
ambiance makes all the difference
Loving the novel lighting approach you took! I really enjoyed working on the lighting in my project and always great to see how others do it.

Thanks guys Smiley I end up spending most of my time working on the graphics and ambience stuff so I'm glad it's turning out to be worth it





Over the past couple days I've been working on this new content editor to replace my old one (and therefore, the 2 I made before that as well xD). However, each time I rewrite this stuff it always gets much much better!

This editor is built entirely from class reflection of the data objects being edited, which is something I've wanted to do for quite a while. I always found it really tedious to add a new control to the editor and link it to the data when I can just have a generator do it all for me! The code is relatively straight-forward using Java Reflection, so I won't go into the code (unless some people really want me to). I'll just go over some of the features I'm especially proud of.

Specifically, arrays. You can directly manipulate arrays of data in the objects, whether they are primitives or objects.



You click the plus button to add an element and the minus button to remove an element. This array will automatically generate if there is an
Code:
int[] intArray = new int[0];
in the class definition.



This gets generated if you have something like this in the code:
Code:
public static class Drop {
public String name;
public float probability = 1;
public int min = 1;
public int max = 1;
public Drop() {}
}

public Drop[] drops = new Drop[0];

The editor will also change the Class of a specific object if you want it to be of a different subclass. Just clicking on one in the tree on the left will copy all of the data over to a more specific subclass with more fields. I am also planning on implementing a component system like in Unity.



The preview at the top of the frame will automatically update with the new collision info, and eventually with the shadow and light info once I put that in

All of this will, of course, be available to people who want to make mods of the game. I will integrate features specifically for making and packaging mods when the game gets to that point.
Logged

Working on Questica!

Devlog: Here!
Twitter: @purenickery
www.questica.net
RujiK
Level 2
**



View Profile
« Reply #118 on: June 15, 2016, 06:40:31 AM »

That is a really impressive interface. I absolutely loath making gui's/dialogue boxes/whatever.
Logged

Oats
Level 1
*


High starch content.


View Profile
« Reply #119 on: June 15, 2016, 10:17:05 PM »

the fog looks really cool, the only problem I can see with it is the particles suddenly appearing , it's very noticeable and makes the affect feel unnatural. Would it be viable to blend the textures from transparency as they appear?
Logged

eh
Pages: 1 ... 4 5 [6] 7
Print
Jump to:  

Theme orange-lt created by panic