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, 06:57:03 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsGearBlocks - Build working physics based machines and mechanisms [EARLY ACCESS]
Pages: 1 2 3 [4] 5 6 ... 12
Print
Author Topic: GearBlocks - Build working physics based machines and mechanisms [EARLY ACCESS]  (Read 52064 times)
Mittens
Level 10
*****

.


View Profile WWW
« Reply #60 on: December 20, 2014, 09:51:42 PM »

Dude, this is wicked, I used to love making things like this in the garry's mod sandbox. This game looks like it takes that and makes it intentional with physics that can handle it and make more interesting things possible

Keep up the good work
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #61 on: January 02, 2015, 05:35:36 PM »

Now in the game, some bug fixes and a bunch of new gears!

Hi / lo gears

There are now two versions of every bevel and crown gear, a "hi" and a "lo" version.  The only difference between these two versions is where the gear is positioned along its central collar (i.e. either offset high or low along it).  This effectively allows for half-unit increments for where a gear can be attached to an axle, as can be seen in these examples.



This gives a lot more flexibility for how various combinations of gears can be used with each other.  The high / low naming is a bit confusing I know but I couldn't think of a better naming scheme, I might change it if I can come up with something better.

Differential gear



In order to allow the outside wheel to turn faster than the inside wheel during a turn, rather than have a solid driving axle, most vehicles use a differential gear to split torque between the driven wheels.  I've now implemented this in the game, it works in exactly the same way as the differential in a real world vehicle.  You have to build it up by attaching axles and the planetary gears to it, as can be seen below. 



Just like all the other gears, it works in a fully physical manner, so its behaviour just naturally matches that of a real world open (i.e. non limited slip) diff.  If one of the driving wheels isn't contacting the ground it will spin up without the vehicle moving; both wheels have to be touching the ground for the vehicle to get proper drive.

Next up

As I mentioned a couple of weeks ago, I was thinking I'd have to overhaul the part pairing system to allow for certain kinds of part pairing relationships (e.g. axles and gears pairing with the differential at different attachment points).  Well fortunately that turned out not to be really necessary, only some fairly minor changes were required.

However, the differential gear did show up a tricky bug with way I'm snapping the orientation of parts to each other, so that's what I'll be looking at fixing next.  I'm also gonna put together some videos soon to demo how to use these new gears.
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #62 on: January 03, 2015, 05:17:14 PM »

Another dev diary demoing the new hi / lo variations of the bevel and crown gears.


« Last Edit: December 22, 2015, 09:01:49 PM by dangersam » Logged

takemikazuchi545
TIGBaby
*


View Profile
« Reply #63 on: January 04, 2015, 03:02:41 PM »

Have you considered dynamically adding gearboxes? I think there are a lot of situations where someone is getting two or more axles, and 99% of the time they want two gears to transfer the motion perpendicularly. My first thought looking at your gearbox demo was, "wow, that looks like a lot of work" - while the system looks amazing and I'm sure if I played this game there would be many situations where I would want to tune the gear configurations on my own. A good(and bad) example of this is staircases in minecraft, instead of a separate corner block the corners are generated based off of context(I say it's a bad example since it's also infamously frustrating to get right). I think while you have made great gains in terms of the mechanical possibilities in your game, as you noted earlier it's success will be determined by the tools you give to your player to realize their goals with minimal frustration.

I'm sure the specific feature I mentioned would be bug-prone and perhaps impossible to get right(and even then not worth it) -but I think the essence of the idea would have some application to your game's design(if you haven't already thought of it yourself). Thanks for sharing your progress with all of us.
Logged
dangersam
Level 2
**



View Profile WWW
« Reply #64 on: January 04, 2015, 07:09:45 PM »

Have you considered dynamically adding gearboxes? I think there are a lot of situations where someone is getting two or more axles, and 99% of the time they want two gears to transfer the motion perpendicularly. My first thought looking at your gearbox demo was, "wow, that looks like a lot of work" - while the system looks amazing and I'm sure if I played this game there would be many situations where I would want to tune the gear configurations on my own. A good(and bad) example of this is staircases in minecraft, instead of a separate corner block the corners are generated based off of context(I say it's a bad example since it's also infamously frustrating to get right). I think while you have made great gains in terms of the mechanical possibilities in your game, as you noted earlier it's success will be determined by the tools you give to your player to realize their goals with minimal frustration.

I'm sure the specific feature I mentioned would be bug-prone and perhaps impossible to get right(and even then not worth it) -but I think the essence of the idea would have some application to your game's design(if you haven't already thought of it yourself). Thanks for sharing your progress with all of us.

Thanks for your feedback takemikazuchi545!

A context based system of automatically adding gears (or indeed any other parts) would be tricky to get right, but I'll have a think about it. Smiley  I do want to add the ability for players to save individual constructions (or sub-constructions) and then recall them later for reuse, hopefully that would go some way to reducing redundant effort.  Another idea I had was a symmetry / mirroring tool to (optionally) automatically add the same part on the opposite side of your construction, could be helpful as vehicles and such often end up being largely symmetrical.
« Last Edit: April 07, 2016, 08:32:01 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #65 on: January 04, 2015, 07:10:55 PM »

Here I’m showing how to use the new differential gear in the game.


« Last Edit: December 22, 2015, 09:02:13 PM by dangersam » Logged

DJWeinbaum
Level 0
**



View Profile WWW
« Reply #66 on: January 04, 2015, 08:14:42 PM »

This is way cool. I've been wanting someone to try and make a game like this. You're taking crafting to a whole new level! I think everyone likes the idea of building working vehicles which they can control, and I think you have awesome design goals. There is so much possibility here we need more people like you to explore it! I hope this genre of games becomes as massive and diverse as FPS.
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #67 on: January 07, 2015, 03:20:32 PM »

This is way cool. I've been wanting someone to try and make a game like this. You're taking crafting to a whole new level! I think everyone likes the idea of building working vehicles which they can control, and I think you have awesome design goals. There is so much possibility here we need more people like you to explore it! I hope this genre of games becomes as massive and diverse as FPS.

Thanks!  Yeah, I've been wanting a game like this too, so I decided I'd have to try to make it myself... Smiley
« Last Edit: April 07, 2016, 08:31:32 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #68 on: January 07, 2015, 03:21:04 PM »

The latest build update resolves an issue with the way I was snapping parts to each other that occasionally caused them to snap together with the wrong orientation.  To do this I had to change the save game format though, so unfortunately any existing save-games won’t work!
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #69 on: January 16, 2015, 09:28:20 PM »








Made a six wheel dump truck in the game

My attempt at making a larger, more complex construction in the game.  The truck has four driven wheels through differentials and a tipping load bed driven by a motor through a gear reduction.  The load bed is only represented by a framework as it got too heavy when I attached plates to it, and would no longer lift (the gears would slip).

As well as being a lot of fun, building a model of this scale was useful in highlighting some issues:-
  • Gears slip under high torque loading.
  • Plates are a bit too heavy.
  • Odd bug where axles connected by hinges would sometimes drift from their correct location after adding / removing lots of other parts, and had to be detached then reattached to put them back in the right place.
  • Need more parts made from other materials, building a truck from wooden beams is a bit crappy!
« Last Edit: December 22, 2015, 09:03:15 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #70 on: January 21, 2015, 03:41:27 PM »

Slider rails

There are now some new parts in the game, and a new attachment type.  Slider rails can attach to blocks either with a rigid or with a slider attachment (you can cycle between these).  The slider attachment allows relative linear motion between two parts in one direction only.  This allows you to create sliding platforms, lifts, extending crane booms, and all sorts of other things!







Construction mechanic

I have also made some improvements to the construction game mechanic to make things work a bit better:-
  • The construction you have currently selected no longer collides with other constructions.  This prevents you from accidentally knocking other stuff around due to physics collisions with the selected construction.
  • After cloning a construction, it becomes currently selected.  It used to be that the construction would collide with its clone, causing stuff to fly around uncontrollably; this no longer happens.
  • You can now only detach parts from frozen constructions.  Given that you can only attach parts to frozen constructions, I think this behaviour is more consistent.
« Last Edit: December 22, 2015, 09:03:42 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #71 on: February 07, 2015, 01:54:04 PM »

Part material variations

I’ve implemented a system that now automatically generates variations of all the generic block / plate parts with a selection of different materials.  These materials are just test examples for now, and are not final.





To make this work, I had to change the part ID convention, so I’m afraid any old save games will no longer work!  The good news though is that this part ID change should more easily allow modding in the future.

Now that there are more parts available (and eventually I plan to add many more), it’s starting to make the inventory UI a bit cumbersome to use.  At some point I think I’ll change it so that you first pick the block size, and then pick the material from a sub-menu.  First though I want to port over to Unity’s new UI system before making any more UI changes.
« Last Edit: February 20, 2015, 04:54:53 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #72 on: February 20, 2015, 04:52:37 PM »

Minor tweaks

I’ve made some improvements to the way parts get serialized out to save games (I’m afraid this will break any existing saved games).  I’ve also removed all options for multi-player from the game.  The current networking implementation isn’t ready for prime time, and multi-player is currently on the back burner while I work on the rest of the game.  I don’t want to promise what I may not be able to deliver, hence the disabling of multi-player for now.

Game design and project planning

On the subject of what I hope to deliver with this game, I have been working on finishing the overall game design and planning out all the tasks needed, at least up until alpha release.  This has meant facing some harsh realities about project scope, as I’m the only one developing this game, I have to try and be realistic about what I can get done.

I have decided to settle on a fairly simple design consisting of two game modes, “creative mode” (basically the existing sandbox mode), and “challenge mode”.  This second game mode will have a series of distinct challenges that get unlocked as the player progresses, each challenge will require the player to build a particular construction and then use it in some way to complete the challenge.  My hope is that this will give the player a feeling of progression and will gradually ramp up the complexity of constructions they build.  Ultimately I also want players to also be able to create their own challenges and upload them for others to play.

This alone will still take me quite a while to build, so that’s why I have sadly had to cut out all the crafting, exploration and survival ideas.  I have also cut multi-player from the plan, at least until post alpha.

I have lots of ideas for challenges for the challenge game mode, which I’ll share as I get to working on refining them in more detail.
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #73 on: March 03, 2015, 03:49:48 PM »

Over the past week I have continued working on the game design and project plan.  This has taken most of my time, but I have also made some improvements to the build.

Unfreezing / deselecting inside the terrain

Previously if you deselected or unfroze a construction while it was positioned inside the terrain, it would immediately be free to move under physics.  Due to the interpenetration with the terrain a massive impulse would then be applied, flinging your construction way up in the air, which was very annoying.  To get around this, for a construction that is currently interpenetrating the terrain, deselecting it will simply freeze it, and unfreezing is prevented until it’s moved away from the terrain.  Hopefully this will eliminate one of the big frustrations while building constructions in the game!

New parts

I have made some new assets for the electric motor and servo motor.  Note that the new servo motor is a different size to the old one, so this may affect your existing saved constructions.  I have also added 4 unit length beams.

Other than that I’ve done a few minor bug fixes and code cleanup.  Next task I think is to port over to Unity 5 to see how that goes, might be a big job, not sure yet.
Logged

marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #74 on: March 03, 2015, 04:11:49 PM »

very impressive. I can't imagine how complex the physics must get... keep up the good work!
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #75 on: March 03, 2015, 04:34:41 PM »

very impressive. I can't imagine how complex the physics must get... keep up the good work!

Thanks! Smiley  Yeah, the physics can get tricky, a lot of it is about battling Unity / PhysX quirks...
« Last Edit: April 07, 2016, 08:36:53 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #76 on: March 07, 2015, 07:30:47 PM »

Unity 5 upgrade on hold for now

This week I tried porting over to Unity 5.  It went pretty smoothly to start with, a few shader and code tweaks were required to get everything running properly, but nothing too bad.  However once I got things going I found some pretty fundamental physics bugs that totally break my game:-

  • Once frozen, rigidbody rotations can’t be unfrozen (positions are fine).
  • Joint motors, limits and velocity drives seem to be non-functional (at least when setting them from code).
  • The OnCollisionExit callback never seems to be called.

It’s a pity really, as I can already tell the physics performance is significantly improved (which I sorely need!), but for now I’ll have to stick with Unity 4.6.  Hopefully Unity will resolve these issues fairly soon.

In the meantime I’ll have to re-jig my task plan a bit, but it shouldn’t hold things up too badly.
Logged

marcgfx
Level 8
***


if you don't comment, who will?


View Profile WWW
« Reply #77 on: March 12, 2015, 02:46:07 PM »

damn, thats annoying. the thing is, I can imagine you are doing a lot more complicated stuff than most people. so you are more likely going to pick up on bugs... I assume you reported these errors. hope it gets fixed soon, as its always a pain in the ass when you can't fix an issue yourself.
Logged

dangersam
Level 2
**



View Profile WWW
« Reply #78 on: March 12, 2015, 08:17:51 PM »

damn, thats annoying. the thing is, I can imagine you are doing a lot more complicated stuff than most people. so you are more likely going to pick up on bugs... I assume you reported these errors. hope it gets fixed soon, as its always a pain in the ass when you can't fix an issue yourself.

Yeah, a little annoying, but the PhysX upgrade was a big change within Unity, so a few bugs are not surprising I guess.  I've not submitted the bug reports yet, as I first need to put together some test projects to more easily repro the bugs, hope to get this done soon though.
« Last Edit: April 07, 2016, 08:37:20 PM by dangersam » Logged

dangersam
Level 2
**



View Profile WWW
« Reply #79 on: March 14, 2015, 05:10:51 PM »

Save game system overhaul

Over the last week I have completely reworked the save / load system.  Previously I was using Unity’s PlayerPrefs to save game state into, which was only ever a temporary solution.  The PlayerPrefs are only intended for small amounts of player settings data, not for save games.

Now I serialize everything into a single binary file per save game (into a local “SaveGames” directory).  This does away with the old fixed slot based system and allows you to name your save games and have as many of them as you want.

This works great for the standalone build, but the Unity web player doesn’t allow file IO for obvious reasons.  So for the web player I tried saving the binary data into PlayerPrefs (much like I used to do with the old save game system).  This works fine, however the .NET serialization I’m now using doesn’t seem to work in the web player (deserialization fails with a FieldAccessException for some reason).  I don’t have time to look at this right now, so I’ve had to disable save / load in the web player for now.
Logged

Pages: 1 2 3 [4] 5 6 ... 12
Print
Jump to:  

Theme orange-lt created by panic