Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411630 Posts in 69393 Topics- by 58447 Members - Latest Member: sinsofsven

May 12, 2024, 03:20:40 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsApple and Worm: Patching Holes In Spacetime
Pages: 1 ... 9 10 [11] 12 13 ... 33
Print
Author Topic: Apple and Worm: Patching Holes In Spacetime  (Read 69480 times)
JobLeonard
Level 10
*****



View Profile
« Reply #200 on: February 21, 2017, 04:02:20 AM »





Anyway, yeah, this sounds like a lot of duplicate variables.

I think you might want to look at tutorials on graph structures for inspiration how to store those quads - You're not using a neat grid, so it makes sense to treat each quad as a node with up to four connections.
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #201 on: February 21, 2017, 12:08:51 PM »

Might be a good idea, yes. I got it halfway working (you can see how sometimes the quads don't detect corners because of the sprite it uses).



How I achieved this? Quads now how a list of tiles. Map Layer has a list of tiles! You get a list of tiles! you get a list of tiles! EVERYONE GETS A LIST OF TILES!

I'm the Oprah of shitty coding.

There was this mind boggling bug in the auto tile system that I'm happy to have solved it because it was keeping me from doing real work. I was completely obsessed by it. So now I'm off to do real life work!  Coffee Next weekend I'll clean this up and try to find a better way to organize the system.
« Last Edit: February 21, 2017, 12:57:29 PM by diegzumillo » Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #202 on: March 04, 2017, 06:21:55 PM »

I didn't update this last week, so here's the news on that front. I spent some time fixing and cleaning the stuff that looks solid enough. I'm also remaking some code I lost. I.. well, I got overly excited and deleted an entire folder thinking I wouldn't need any of that any more. hehe whoopsie.  Durr...?

But all is fine. Remaking things is often very productive. And I realized the way I made the local frame thing before was gonna give me some trouble for character movement.

The left side shows how I was doing it. Everything is defined by 4 points, and I can almost see it in my head, the player keeps getting stuck because it's hard to detect when the player's feet is on the ground. Middle and right shows my current solution. 4 quads always defined, then as soon as you cross an edge, your quads shift to follow the geometry perfectly.


A quick news from the gaming world. Nitrome just announced this game and it's the most similar thing to apple and worm I've seen so far: Flat Pack

It may not look like it, but that's the general gist of the mechanic on apple and worm. You have a curved space and as you move through space you can find yourself under different orientations. Funny how the presentation makes it look like something completely different. But it's still different enough though.

My main motivation to make things has always been linked to originality. Doesn't have to be fancy or even good, but it has to be  a tiny bit original (I know nothing is completely original). I know, I know, that's a bad thing. Everyone says that and they are all right, but I have no control over my motivations, they are what they are. But I'm still excited! My game is still sufficiently original to keep me interested. Let's hope it remains like that for the next few years lol.

PS: The deleted code is unrelated to the code I lost due to power shortage. I deleted old code that wouldn't run any more but there were useful logic in there. I lost my newly made code to power shortage yesterday though. And it was perfect. It was working nicely, debugged and cleaned. But it was only one small file, the local frame script that creates a local y and x unit vectors based on its location inside a quad.
« Last Edit: March 06, 2017, 07:59:35 AM by diegzumillo » Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #203 on: March 12, 2017, 05:17:55 PM »

Almost regretting my past decisions by now  Big Laff . Boy, is this new system a handful. But it's coming along nicely! Now I have an adaptive "quad" thing. Quotation marks because it's actually 9 quads. I figured I'd use 9 instead of 4 to account for the cases where the object is larger than the grid size.

Kind of a pain to get all these vertices where they need to be, and then get my sprite system to work with 9 vertices too, and the whole UV thing made me wanna die for a few minutes, but there it is. I'm happy now.



Getting real close to the interesting update. You know, the one where this whole thing might actually resemble a game again. Just a matter of defining colliders for those tiles and a basic player controller. Aaaand now that I said that out loud it might not be that close Tongue

Have a great week, everyone  Coffee
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #204 on: March 12, 2017, 05:34:41 PM »

 Hand Thumbs Up Left
Logged
marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #205 on: March 12, 2017, 10:34:45 PM »

nice to see this new system working! I'm interested to see how the puzzles will change with a strongly warped character :D
Logged

oahda
Level 10
*****



View Profile
« Reply #206 on: March 12, 2017, 11:46:32 PM »

This was a super interesting update tho! Really cool.
Logged

Zorg
Level 9
****



View Profile
« Reply #207 on: March 13, 2017, 12:18:55 AM »

I'm looking forward to mind-bending levels. Smiley



Logged
NuSan
Level 0
**



View Profile WWW
« Reply #208 on: March 13, 2017, 02:07:26 AM »

Pretty great project, I love curved spaces! Having lattice to morph shapes is an awesome idea too. You can then play on scale, rotation and everything.
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #209 on: March 18, 2017, 10:01:06 AM »

Thanks, guys :D

My plan was to work on rigid bodies simulation with colliders that adapt to the geometry, and then use that as a starting point for the player controller too. But it turns out that's not a good idea. I put some thought into the physics simulation and concluded that a collider that adapts to the geometry and have all forces acting on a central point is not enough to bring the physics simulation to the deformed space. The problem can be illustrated with an example. Collisions happening on parts of the collider that are not in the same polygon as the center of the body will respond incorrectly because it doesn't know the direction of movement is not the same as in the center of the object. The physics engine only sees the euclidean plane.

I don't think it's worth making my own physics engine at all. The one in Unity can be used and abused like that because it's greatly optimized and runs on the GPU. Whatever I'd come up with would certainly drag the game and be unusable. I'll still use it though, but strictly on less important stuff.

However, that changes my current plans a bit. I'll put this deformable collider system on hold and work on the player controller, which is now the standard implementation: intersection checks. Lots and lots and lots of them. If anyone has any suggestions, tips and tricks etc, I'd appreciate it. Because, as common as this is, this article* is the only thing I found. And even if doesn't seem hard to pull it off, it's one very important aspect of the game that I want to do very carefully. I don't think curved space will change anything on how this is done, in case anyone's curious. I have my own 'trace' function that follows the curvature, and player controller will never perform long enough traces to hit itself in the head or anything weird like that.

Another consideration worth mentioning. After I rebooted the development I mentioned a couple of methods and I'm currently implementing one. The winning argument was that the other wasn't playing nice with the physics system. So this is almost a game changer! it almost makes sense to go back and take the other route. I'll definitely consider the work I've already done, and see if there's anything else that makes this method better.

*The hobbyist coder #1: 2D platformer controller by Yoann Pignole on Gamasutra. Pretty good read!
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #210 on: April 02, 2017, 07:51:17 PM »

Last few weekends were a little slow but I got stuff done. The current goal at the moment is character controller, and that requires coding a lot of extra stuff I can't take for granted in the level mesh. The basic piece of code necessary for a character controller is trace to detect collision, so I needed a way to trace across the level mesh, doing a sequence of built-in trace inside each quad. Right now I have a basic collision system working but it only traces from the corners, there are no traces being done in-between them, so it can fall through a collider that's smaller than its dimensions.



Usually, you would simply take the y component of upper left corner, for example, and replace it with height/2 or something like that. If your character is rotated you could still use a vectorial interpolation between the two corners. In my case, however, I need to know exactly in which quad this middle point will be, as it's necessary for the trace. I have two options to solve this: either I make the trace function accept null quads, in which case it will try to find it (but might be expensive), or add a function inside the class that generates those corners that gives me the information I need.

My point is it takes a while to do even the simplest things. Progress is slow but steady, I'm never really stuck on any problem that seems too difficult.

I hope to have this last step of the collision system working next weekend, or before, if I find the time. Then I can start working on the meat of the character controller! states, gravity, sprite etc. The fun part!
Logged

Zorg
Level 9
****



View Profile
« Reply #211 on: April 02, 2017, 11:42:03 PM »

As the physics are working, wouldn't be a physics based approach to the controls an option? Or is that a big no-no?
Logged
oahda
Level 10
*****



View Profile
« Reply #212 on: April 03, 2017, 01:16:35 AM »

At this point I'm wondering if it wouldn't have been easier to just warp the levels entirely in shader, perhaps using some kind of texture to define where and how to do so, and then be able to use traditional logic for everything.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #213 on: April 03, 2017, 02:51:18 AM »

As the physics are working, wouldn't be a physics based approach to the controls an option? Or is that a big no-no?

I'd say it's a medium size no-no. The physics engine works in the regular space, so it will think collisions are happening in neighbor quads where nothing is. I still intend on using physics but definitely not on the character controller.

At this point I'm wondering if it wouldn't have been easier to just warp the levels entirely in shader, perhaps using some kind of texture to define where and how to do so, and then be able to use traditional logic for everything.

Yes!I ranted about that a couple pages ago, just after restarting development. The idea was to break the levels into cells, each with a camera that render to texture, and that gets applied to a mesh. It really needs to be disconnected because the levels' topology would overlap parts of the level if it were all laid flat. At the time my argument for the current method was because it plays better with the physics engine. And it does, those separate cells give no easy way of dealing with the physics. But the current method is not that much better either as it turns out. So that kinda backfired in my face.

So you're right. I am reconsidering the shader solution. It's just that this solution is moving along so smoothly, even if slowly, and I'm betting on being able to still exploit the physics engine to some extent. But I might put together something in parallel and see if it evolves faster.
Logged

Ger
Level 0
**


View Profile
« Reply #214 on: May 10, 2017, 06:39:52 AM »

The pixel are looks really good but the lack of player fantasy in the theme could ruin the chances of the game.
Look at what happened to Airscape. If you don't have $60 million to make a plumber or an apple exciting then as an indie you have to play by different rules, capture the players imagination with player fantasy. Something they would love to be. With Airscape, who wants to be a cute octopus? If it's not too late for a character or theme change, consider imagining what would be cool to play as.

A must read article on this about Airscape. Good Isn't Good Enough
http://www.gamasutra.com/blogs/DanielWest/20150908/253040/Good_isnt_good_enough__releasing_an_indie_game_in_2015.php
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #215 on: May 10, 2017, 08:07:38 AM »

Hey Ger! thanks for taking the time to analyze and give suggestions. I really appreciate it. However I couldn't disagree more with you. I read that article, it's really interesting but that's really not what I took from it.

Logged

oahda
Level 10
*****



View Profile
« Reply #216 on: May 10, 2017, 11:34:59 PM »

Just saw this, not sure if it's relevant or useful to you: https://twitter.com/Fenderrio/status/862564699367518208
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #217 on: May 11, 2017, 04:54:07 AM »

Just saw this, not sure if it's relevant or useful to you: https://twitter.com/Fenderrio/status/862564699367518208

YES! It just might be the solution I need. Mine still has bugs to work through, and I would certainly need to write a bunch of new logic for this package. But I'm willing to give it a shot for 10 bucks.

Thanks for sending it my way :D
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #218 on: May 20, 2017, 03:58:50 PM »

Quick update.

I did the worst thing a disorganized developer could do. I stopped working on the project leaving a bunch of bugs unsolved! So now, obviously, I came back after my few weeks long hiatus completely lost and unmotivated to solve bugs on my awful code. I barely remember how it fits together.

But, against all odds, in a single day I solved all those nasty bugs that were driving me nuts then! After I got through the initial barrier of reacquainting myself with the code it was rather refreshing.

The bugs I solved are: the sprite system messes up when in certain orientations. I was getting the coordinates of the midpoints of the mesh completely wrong but this mistake wasn't visible most of the time. The other bug was some colliders of the tiling system seemed to be inverted. It was just a matter of finding which tile was wrong and fixing it, nothing complex as I thought at the time.

My current goal is to continue fixing the player controller. It's functional but not smoothly. My two solutions for collisions involve sliding on walls smoothly but sometimes getting stuck OR never getting stuck but it gets all jittery when touching a wall.

@Prinsessa I bought that asset and didn't find any use for it. I might ask for a refund later. It turns out it's specific for UI stuff. But it's all good. I'm more confident on my system now too.

More design ramblings

The design is more or less consistent in my head but I've been craving some solid examples that could help me shape the level design better. At the end of the day, this is a navigation challenge, a maze. Part of me doesn't like that it's just a maze but I'm sure a maze can be interesting if there are complex triggers that change the possible paths, that's the general thought process in every feature I add to this game, things that influence navigation somehow.

But then it hit me! ZELDA DUNGEONS! Sure, you hit enemies with a sword and looks like an RPG but its dungeons are a navigation challenge as well. The same mechanisms I'm trying to implement here are present there as well.

You can tell those level designers also struggle to step away from key-door-maze and try to find ways to spice it up.

Like when I made a level where you push a block that falls on the underside of a flexible bridge (opposite gravity directions) and you can use the lump it creates on the bridge to reach the portal. It's the same strategy they seem to use all the time, with their water level systems, moving towers etc.

So my homework now is to play zelda games. Because shamefully I haven't played many of them. Get me some inspiration from these masters of dungeon design :D
Logged

Zorg
Level 9
****



View Profile
« Reply #219 on: May 20, 2017, 04:06:08 PM »

This could help:

Boss Keys is a game-by-game analysis of the dungeon design in The Legend of Zelda
https://www.youtube.com/playlist?list=PLc38fcMFcV_ul4D6OChdWhsNsYY3NA5B2
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 33
Print
Jump to:  

Theme orange-lt created by panic