GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Hook'd! (working title) Page 1, 2  Next
View previous topic :: View next topic  
Author Message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sat Oct 24, 2015 4:26 am    Post subject: Development Log - Hook'd! (working title) Reply with quote

Yay!

I've recently felt the urge to do something more action focused. And there's this one mechanic that makes every game [insert big number here] times better: the HOOKSHOT! Be it Zelda, Worms or Just Cause, the hookshot is a really cool tool and opens up the world for players. I want to make a game based on that mechanic.

The second thing that urges me is network multiplayer (and couch multiplayer as well). Not only the effects it has on gameplay, but also the technical difficulties of making something multiplayer intrigues me a great deal! :) Especially online multiplayer .

Knowing that the whole networking part will be the most challenging aspect, I dove into that. There's a lot of reading material out there: the Gaffer articles, Gabriel Gambetta's blogposts and the stuff from Valve. But it still took me quite some time to grasp all the concepts. The most difficult thing to wrap my head around was how to deal with different timelines and states of information. The fact that you see yourself in the present but other players in the past needs to be incorporated into the gameplay. Its really interesting how for example Counter Strike deals with these problems.

Making a physics based game doesn't make it easier either. Box2D has no networking capabilities and is NOT deterministic across architectures. Furthermore, it does not support rewinding time or replaying from a past point... it doesn't even support snapshots. Mmmmmhhhhh, juicy problems! :D

So I've been dabbling:
https://www.youtube.com/watch?v=q6tXbv2j4ss

The video shows a client and a server, both layered on top of each other graphically (the server's the more transparent stuff). They run in the same screen/program for demo purposes, but are actually two separate processes and can be started separately. The two only communicate over the network (loopback in this case). I simulated 200 milliseconds ping, 10% packet loss and introduced some arbitrary jitter to make it more real-world. Client side prediction and reconciliation is properly implemented and the physics run on both the clients and the server. So if a client does something 'illegal', the server will correct it ASAP. Clients only send inputs, server responds with updated positions based on the input. Neutral objects (like the spinning box) and their properties are extrapolated from the last known server state on the client. Other clients are interpolated between the 2-3 last received states, so are even a bit more delayed. Because of the delay of other players, I don't think I will be able to pull off versus-multiplayer where you shoot each other with the hookshots. Most FPS can get away with it because they don't have ballistic bullets but instantly hitting ones. So they can reproduce if a client actually had the enemy in his crosshair when he pulled the trigger. I can't really do that... or can I?

I still have to test how it all behaves when the client and server run on different architectures and Box2D produces different results for equal inputs. My hope is that the differences are small enough to not accumulate too much and server updates correct the errors in a timely fashion.

Oh, and did I mention that I'M ENJOYING EVERY SECOND OF IT? I LOVE problems like this. I think about them all the time! :D
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9345
Location: Not Finland
PostPosted: Sat Oct 24, 2015 4:31 am    Post subject: Reply with quote

Quote:

Be it Zelda, Worms or Just Cause, the hookshot is a really cool tool and opens up the world for players.


I totally agree. A long time ago (like a decade ago) I worked on a small platformer demo with a grapple. It was a lot of fun to mess with, but I wasn't at a point in my life where I wanted to make it into a full game. That was the first time I genuinely invested in vectors and other physics-based thingies. I learned a lot :)


Quote:

Box2D has no networking capabilities and is NOT deterministic across architectures. Furthermore, it does not support rewinding time or replaying from a past point... it doesn't even support snapshots. Mmmmmhhhhh, juicy problems! :D


Yeah, those are problems indeed.


After your last few projects, I expect great things from this :)
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1630
Location: Your consciousness.
PostPosted: Thu Oct 29, 2015 12:50 am    Post subject: Reply with quote

Quote:
Box2D has no networking capabilities and is NOT deterministic across architectures.
But does it allow you to read the data at any given frame? Then you could run all the physics on the server and send the calculation results to each client, so they all get the same data for game-play-relevant objects. For irrelevant clutter (eye candy particles or whatever) the clients could still run the physics themselves.

Reminds me, we had an interesting networking thoughts exchange in 2009 here: http://gamedevelopersrefuge.org/viewtopic.php?t=919
_________________
0xDB
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sat Oct 31, 2015 12:09 am    Post subject: Reply with quote

0xDB wrote:
Quote:
Box2D has no networking capabilities and is NOT deterministic across architectures.
But does it allow you to read the data at any given frame? Then you could run all the physics on the server and send the calculation results to each client, so they all get the same data for game-play-relevant objects. For irrelevant clutter (eye candy particles or whatever) the clients could still run the physics themselves.

Reminds me, we had an interesting networking thoughts exchange in 2009 here: http://gamedevelopersrefuge.org/viewtopic.php?t=919

Yeah, it's possible to extract all (most?) of the relevant data. One small problem is that - according to some people - Box2D stores internal stuff about a running simulation which you can't easily extract/inject again. But I don't think that changes the simulation too much. The bigger issue, which I THINK I have overcome by now, is that every data the server sends back to the clients about object properties is actually in the past! So, for things controlled by the player, I need to rewind time back to the state when the client sent the corresponding input, inject the state received by the server, simulate forward until present time and, if the simulation results differs from the current one, apply corrections.
As I can't really rewind time, I have to store all game state in snapshots for each frame a couple seconds into the past and use those as a starting point for simulation.
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Wed Nov 11, 2015 6:27 am    Post subject: Reply with quote

First law of gamedev: particles make everything better: https://vine.co/v/elthhhm2bFO
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sat Nov 14, 2015 3:10 pm    Post subject: Reply with quote

Gameplay-vine: https://vine.co/v/iBr9Y3AZxpz
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
Alex
Developer

Joined: 05 Sep 2005
Posts: 1159

PostPosted: Sat Nov 14, 2015 10:04 pm    Post subject: Reply with quote

Looking nice. Does it zoom in when you go slow and zoom out when speeding up? or is that just the camera recording?
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Wed Nov 18, 2015 2:54 pm    Post subject: Reply with quote

Alex wrote:
Looking nice. Does it zoom in when you go slow and zoom out when speeding up? or is that just the camera recording?

Yeah, I'm definitely experimenting with different zoom levels based on how fast you are... so you're seeing more the faster you move through the world. :)
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sun Dec 20, 2015 11:12 am    Post subject: Reply with quote

I finally switched to a proper 3D rendering pipeline, instead of relying on LibGDX's primitive drawing functions. To make myself more productive, I also implemented live shader reloading, so I can immediately see the mess I create in shader code. ;)

Here is it in action: https://twitter.com/IMakeGames_/status/678647662003027969


edit: also, shotguns! https://twitter.com/IMakeGames_/status/676173969851097092
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Mon Dec 21, 2015 9:16 am    Post subject: Reply with quote

I have/had a really hard time getting a good control scheme going for both controller and mouse+keyboard. I don't really want to force players too much into a direction and try to balance the two, making sure you're able to do the same maneuvers with both input methods. For the longest time, I thought going with two analog sticks was the right move for gamepads (one for aiming, one for movement). That made the game control very much like a twin-stick shooter. But then I needed all four additional shoulder triggers (for shooting the rope and gun, as well as extending/shortening the rope), which was rather awkward. Not sure about you, but pressing both triggers on one side at the same time felt awful to me. The "normal" buttons are out of reach anyway with your thumbs on both sticks. Using the vertical axis of the left stick for controlling the rope length felt strange as well.

And now, it finally dawned on me that using the left analog stick in itself is the problem. I completely forgot that I could also be using the D-pad for movement! Now I can use D-Pad up/down for rope-movement, D-Pad left/right for normal movement, the two shoulder buttons for shooting (only one on either side) and the right analog stick for aiming. As an additional bonus, the game now plays much more similar with a mouse+keyboard as well. Pfew! :)
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10606
Location: Canadia
PostPosted: Mon Dec 21, 2015 10:58 am    Post subject: Reply with quote

When I was doing something similar a decade ago, I found a single stick was more than enough for some pretty decent spidering.

https://www.youtube.com/watch?v=yipwYISJnps

White circle shows which way I'm pushing on the Analog stick.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Mon Dec 21, 2015 11:29 am    Post subject: Reply with quote

PoV wrote:
When I was doing something similar a decade ago, I found a single stick was more than enough for some pretty decent spidering.

https://www.youtube.com/watch?v=yipwYISJnps

White circle shows which way I'm pushing on the Analog stick.

Very interesting!! How did you do controls for the multiple (2?) ropes?
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10606
Location: Canadia
PostPosted: Mon Dec 21, 2015 11:53 am    Post subject: Reply with quote

To keep it simple, you basically had a stock of 2 ropes. When you fired a rope again, the oldest rope was detached.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Dec 22, 2015 4:07 am    Post subject: Reply with quote

PoV wrote:
To keep it simple, you basically had a stock of 2 ropes. When you fired a rope again, the oldest rope was detached.

Seems to work really well! Did you have separate buttons for firing a rope and detaching a rope?

I think the game has the potential for preeeetty hard challenges:



:D
_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Dec 22, 2015 3:40 pm    Post subject: Reply with quote

If multiple people play on the same screen, the player characters (which I started working on) become TINY!


_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10606
Location: Canadia
PostPosted: Wed Dec 23, 2015 12:19 am    Post subject: Reply with quote

IMakeGames wrote:
PoV wrote:
To keep it simple, you basically had a stock of 2 ropes. When you fired a rope again, the oldest rope was detached.

Seems to work really well! Did you have separate buttons for firing a rope and detaching a rope?

:D

Yes, but I also had a maximum length. Firing away from the terrain would have the same effect.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sat Jan 02, 2016 2:24 am    Post subject: Reply with quote

I'm experimenting with bold outlines and parallax effects. I feel like I need to advance the art front of the game so I get a better feeling for the whole experience while playing.


_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Mon Jan 18, 2016 6:30 am    Post subject: Reply with quote

I'm experimenting with mechanics that allow players to help each other out better. Currently playing with a drone that you can deploy and can be hooked onto by the other player:


_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
Diablo
Contributor

Joined: 19 Nov 2015
Posts: 171
Location: Tristram
PostPosted: Mon Jan 18, 2016 9:33 am    Post subject: Reply with quote

I have a hot idea, and in exchange for your eternal soul I will now share it with you. Insert an enemy which can only be defeated if the players attach a hook to it from opposite sides, very similar to one of my favorite torture techniques, drawing and quartering. }:)
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Tue Jan 19, 2016 7:52 am    Post subject: Reply with quote

Diablo wrote:
I have a hot idea, and in exchange for your eternal soul I will now share it with you. Insert an enemy which can only be defeated if the players attach a hook to it from opposite sides, very similar to one of my favorite torture techniques, drawing and quartering. }:)

I don't know what this "soul" currency you speak of is, but I'm sure we can come to an arrangement. Your idea is indeed intriguing, to say the least! Ripping enemies apart sounds... delicious. :D

My experimentations with the artstyle continue. I'm really digging glowing particles against dark backgrounds, so this is what I came up with:


_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Thu Jan 21, 2016 1:49 pm    Post subject: Reply with quote

Switch to 3D, they said. It's gonna be easy, they said:

A case of garbage in the depth buffer.

Shaders are still a part of gamedev where I feel like a child. Most of the time I've no idea what I'm doing but some outcomes are quite cool:

_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Sat Jan 23, 2016 2:08 pm    Post subject: Reply with quote

Implemented background blur and better lighting. But I STILL cant decide whether I want darker backgrounds and bright outlines or vice versa. \_(ツ)_/


_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
IMakeGames
Contributor

Joined: 13 Apr 2011
Posts: 499
Location: Austria
PostPosted: Thu Feb 11, 2016 2:08 pm    Post subject: Reply with quote

Implemented a few new gameplay mechanics, including pressure plates that open doors and weights you can position on these plates:


_________________
My current project: Hook'd
View user's profile Send private message Visit poster's website
arvidsson
Contributor

Joined: 13 Jun 2011
Posts: 109
Location: Sweden
PostPosted: Tue Feb 23, 2016 8:14 am    Post subject: Reply with quote

Nice work! I like the combination of grappling hook skills and puzzles. Maybe you can have both art styles in different levels?
View user's profile Send private message
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4961
Location: Silicon Valley!
PostPosted: Wed Feb 24, 2016 5:33 pm    Post subject: Reply with quote

Looks awesome. I find the mouse cursor distracting. Going to turn it off for release? :]
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Hook'd! (working title) Page 1, 2  Next

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.