Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

22 Excellent

About im_an_engineer

  • Rank
  1. im_an_engineer


    Thanks for checking it out! You're two guides away from hitting the end of the existing story content, so I'm stoked you've played it this far! I should make a bigger show of it, but when you climb to the top of a solar tower it unlocks a fast travel action on the ladders, so you can quickly get to the top again. (And the bottom, but jumping over the railing is always more fun) Cheers for all the feedback, it's great to hear, helps me fine tune things and learn what people enjoy for future content/projects. Was there anything specific about the survey screen that you had issues with? I've love to hear about it.
  2. im_an_engineer


    Map fog mesh generation Probably the most important engine feature for Bearing was the addition of the drawTriangles command. It was added right around the time I was attempting a fog-of-war overlay using textures, and having a very hard time making it perform well. Swapping textures for a solid mesh meant that performance improved dramatically, enough to increase the resolution of the overlay, and paved the way for the Survey gameplay mechanic. It also became the core of later map and animating effects. Below are some example steps involved in generating the mesh seen in-game. This mesh is generated on the server DLL, with an array of vertices sent back to the client, and so cuts a few corners to keep the generation time down. The Marching Squares technique is used to fill the 1x1 cells. - 1 - - 2 - - 3 - - 4 - 1. We start with a grid of cells, the corners of which can be visible (green) or non-visible (red) 2. Visibility is handled by adding Survey Mark circles and flagging all corners within them as visible 3. We recurse through the grid, splitting it in half with alternating horizontal/vertical divisions, to look for completely visible or non-visible rectangles 4. So far we have two rectangles that we can flag as non-visible, and skip any further processing on - 5 - - 6 - - 7 - - 8 - 5. If we run into a division that is a mix is visible of visible and non-visible corners, we subdivide it further 6. We treat fully visible rectangles the same way as fully non-visible, and skip subdividing it any further 7. More subdivision here 8. We've hit the last of the rectangles we can discard here, the rest will be 1x1 cells - 9 - - 10 - - 11 - - 12 - 9. Here we can discard two visible and one non-visible cell 10. Now we're left with 7 mixed-visibility cells, which we need to generate meshes for 11. There are only 4 different types of cell to worry about 12. Here are all 16 variations there can be, and the predefined mesh for each. The first and last variation will never be used, because we always skip those - 13 - - 14 - - 15 - - 16 - 13. Choose the variation we want. Each variation has a unique ID we can generate with some bitshifting/multiplication, where each corner is 1 or 0: uniqueID = BL + ( BR * 2 ) + ( TR * 4 ) + ( TL * 8 ) 14. This is what we get when the meshes are added 15. Back to the previous subdivision view, we have a number of shapes to turn into triangles that drawTriangles can use 16. The final mesh result The island map has 1200 cells on each axis. It is pre-divided into 8x8 smaller groups to improve processing time. The full mesh generation happens on a separate thread on the server DLL, and processing time could be further improved by moving each one of the groups shown into its own thread. Corners cut: Using an alternating horizontal/vertical division. Ideally the technique should evaluate the cells within and select the result which gives the most skippable rectangles. Alternating was picked because it gave generally better results than sticking to just one axis, and was faster than doing it properly. The edges of the mesh could be smoothed further with some linear interpolation on the vertices, as mentioned in the Marching Squares article, but was skipped due to the performance impact. A lot of alternative mesh subdivision techniques exist (which can be seen in a later Navmesh post) which would vastly reduce the number of triangles, but I kept this process because the results were good enough for the performance target it needed to hit. These shortcuts could be removed if the processing was done on a client DLL, where processing time is more available. Wishlist: drawTriangles being able to take vertex colours (particularly alpha), and UV coords. Being able to create textures/sprites at runtime from script, and being able to edit pixels individually or filled as a subrect.
  3. im_an_engineer


    Bearing - An Orienteering RPG One billion people missing. A global communications blackout. Join a scientific and engineering expedition team on Altis as they try to discover what happened in Europe, and why radio signals are being disrupted across the world. About Bearing Welcome to the info and feedback thread for Bearing, a server-only RPG mod that focuses on orienteering and navigation. But first, here are a few things that Bearing is NOT about: No Combat No Death No Stamina No Survival Bearing is a relaxed game, and won't be for everyone. If you find these features essential then this game is likely not for you. How do I play Bearing? Filter your server browser for 'Bearing'. Currently, there is a single test server with a limited number of slots. The server is online most of the time, unless there are issues with the game or server. Current State The early portions of the game have been implemented, featuring a variety of gameplay mechanics and a small amount of supporting dialogue and story telling. Most Guides on the island currently have no dialogue, and existing story tasks end after (approximately) a few hours of gameplay. More features have been partially developed, and will be added to the game later. Expect bugs and occasional server downtime. Features Bearing is essentially a single-player experience. You may encounter other players from time-to-time, but there are currently no multiplayer features. Tutorial A detailed tutorial story will take you through the basics of playing Bearing Story Follow story tasks to unlock new gameplay mechanics and learn more about what is happening on the island Progression Unlock new equipment, clothing and movement options as you play. Your progress is saved, so you can come back at any time Observation Use map, photo and audio clues to track down new Guides and Transport hubs Cartography Triangulate your position to create your own map with Bearing's Survey Mode Fast Travel Build a transportation network across the island and request a pick-up from any nearby road Power Repair damaged power sources and restore the island's power network [Partially Implemented] Relaxed There is no combat, survival or stamina to worry about, so you can take your time exploring the world Mods/Addons Required None. You can play Bearing with the base game. No DLCs are required. Mods Supported None. Bearing's development began with a few self-imposed limitations, one of which was to require no mods before playing. Another was to develop without supporting other mods, so that I could focus completely on Bearing. This is unlikely to change in the future. Feedback and Updates This thread will be the best place to submit any general feedback you might have about the game. Follow @BearingMod for content updates and other development pictures and videos. Media
  4. im_an_engineer

    setMarkerPolyLine anyone tried it?

    This sounds awesome! I've been doing custom markers with drawTriangle for a while, but it's fairly high maintenance - this sounds like a much cleaner way of doing it