Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. GoliathForge

    Battletech Developer Journal - 03

    The lone wolf maybe thinks about it a little different because he's already in there but yup, smells like that here for certain. Data driven you say? Thanks for the nudge.
  3. I'm Chris Eck, and I'm the tools developer at HBS for the Battletech project. I've recently been given permission to write up articles about some of the things I work on which I hope to post on a semi regular basis. Feel free to ask questions about these posts or give me suggestions for future topics. However, please note I am unable to answer any questions about new/unconfirmed features. A few weeks ago we started a more stringent code review process where everyone is supposed to put changes on a feature branch and then get those changes code reviewed and tested before merging it back in. For most devs I imagine that's between 1-2 feature branches a week. But my task list is a bunch of small, unrelated changes all over the system so that was 1-3 feature branches per day. Needless to say, everyone has been super busy working on Urban Warfare (and things are looking awesome by the way) so I had a big backlog of these. That couple with a Jira/Confluence hiccup meant I spent most of last week implementing code review feedback and merging my code back in. But I still worked on a couple of interesting things and I have 3 years of working on Battletech to pull from. So if I don't write one of these Journals it's cause I'm being lazy. New Region Types Until recently, we only had a few region types: Positive(Gold), Negative(Red), and Hidden defined by a RegionType enumeration (enum) in code. In the early days we felt like this would be enough to differentiate and identify the different region types. But after we shipped, there was still a bit of confusion about particular regions. Like the Escort Destination region in Capture Escort - is the player supposed to stand there? Or the Ambush Convoy mission has a Negative escape region for the enemy. The purpose is to prevent the enemy from getting there, but standing there is actually a good thing. To clear up this confusion we decided to implement new region types, and expose more data to the user like varying regions by color and then adding region labels. At first I was just going to add more values to the RegionType enum, but as I worked through it, I became more aware of the hard coded switch statements tied to its label and color. Bleh. Even though it was more work right now, I refactored RegionType to be a new RegionDef data file. For each region type there will exist one of these RegionDef files. There, we can specify what colors, the labels, and descriptions of the regions. // Original enumeration enum RegionDisplayType { Hidden = 0, Positive = 1, Negative = 2, } // Sample of some hardcoded colors tied to different region types public Color GetRegionColor(RegionDisplayType regionDisplayType) { Color regionColor; switch (regionType) { case RegionDisplayType.Hidden: default: regionColor = Color.clear; break; case RegionDisplayType.Positive: regionColor = UIManager.Instance.UIColorRefs.GetUIColor(UIColor.Gold); break; case RegionDisplayType.Negative: regionColor = UIManager.Instance.UIColorRefs.GetUIColor(UIColor.Red); break; } return regionColor; } // New RegionDef files get one file per Region Type. { "Description" : { "Id" : "regionDef_EvacZone", "Name" : "Evac Zone", "Details" : "When active, move all of your units into this zone to evacuate your units.", "Icon" : "" }, "FutureColorHex" : "#F79B2680", "ActiveColorHex" : "#F79B26FF", "FutureLabel" : "Future Evac Zone", "ActiveLabel" : "Evac Zone" } Now the only code I have to write is letting the designers choose which region they want and drive the choices off of the files in the RegionDef folder. All those hardcoded switch statements get converted over to just using the appropriate bits of data like selectedRegionType.ActiveLabel. And now, any time a designer wants a new region type, they can add it themselves by just creating a new Region Def file instead of pestering me. Localization Since we're going to be showing region labels now, that's some new text in the game. New text in the game means new translations to be made. The developer who normally handles Localization tasks was busy doing other things so after a quick 15 minute discussion on how things worked, he sent me on my way. First I needed to write up a RegionDefStringsCollector class. Since I'm working with a json file, it's pretty simple. I inherit from a Json String Collector base class, tell it my ResourceType (RegionDef) and just override my Collect method. Then there's a Localization class that has a list of all the Collectors. I add an entry to my new class and then the next time the strings get collected for localization, all my new data will get collected. public class RegionDefStringsCollector : JSONDataStringCollectorBase { // Tell the JSON collector what type we are public RegionDefStringsCollector() : base(BattleTechResourceType.RegionDef) { } // Collect our strings into the locTable protected override void Collect(string jsonText, EditorLocTable locTable, string source) { RegionDef def = new RegionDef(); try { def.FromJSON(jsonText); if (def.Description != null) { Util.CollectDescription(locTable, def.Description, source+".Description"); } Util.AddToLocTable(locTable, def.ActiveLabel, source + ".ActiveLabel"); Util.AddToLocTable(locTable, def.FutureLabel, source + ".FutureLabel"); } catch (System.Exception e) { Debug.LogError("Error reading " + source + " " + e); return; } } } Work Bench And this weekend I was productive at home too. I ordered a bunch of lumber for some projects around the house and knocked out my work bench. Somebody said look at all those tools in the blog post image that he doesn't use. Well here's proof that I do! Tips from your Uncle Eck Be careful with your use of enums, they can be a code smell that something isn't quite right. If you find yourself hardcoding logic to specific enum values, you should definitely consider switching to a data driven system. That way when people change their minds, they can just change the data in a file instead of having to change code and cut a new build. Plus it makes modding your game that much easier. Links Previous Journal: https://www.gamedev.net/blogs/entry/2267089-battletech-developer-journal-02/ Next Journal: Stay tuned Twitter Post: https://twitter.com/Eck314/status/1118878585736003585
  4. RPTD

    Vulkan? OpenGL? What........?

    I guess then I need to hurry up putting those finishing touches in place
  5. GoliathForge

    When code just isn't enough...

    okay. well, if my idea is going to be a success, I think I need more than a handful of people looking at my creation. So, as I'm building what will be viewed as long lasting / desirable art, I need more. A lot more. Each telling the one next to them about this great thing that got built. A percentage will fade,some may trickle in. All depends on that crowd that pumped the idea to how ever many spikes you could get out of the thing. <'gotta stop here dude. I've reached my poetry limit> See you around the next bend.
  6. Embassy of Time

    When code just isn't enough...

    Oh, I don't mind sharing, I just respect that people rarely find my code very... elegant. It's not advanced enough to warrant protection, at this point it's mainly a few PHP file handlers and some GUI generation (text based, for now). If you want to see it when it's done, you're more than welcome! What exactly do you mean by that? It sounds interesting!
  7. Davicus

    Artist looking for team/partner!

    Hi CookieLover, Our team has two programmers and one other artist and a number of musicians on smaller 2d games using the GODOT engine. I have a gamejolt page and we have started programming a proof of concept for a WWF style wrestling game. If all goes well the programming should be done in a couple months. You can message me here or email me at david1platt@zoho.com.
  8. JoeJ

    "I hate naming things"

    Just this old video: Far from ready for a game. I really hope i can continue on this maybe in some months...
  9. GoliathForge

    When code just isn't enough...

    Too bad. If we were all open with source, this party might really kick into warp speed. (or be flooded by the copy/paste guys and gals) Tough call.
  10. Today
  11. GoliathForge

    When code just isn't enough...

    In a way I was thinking something similar outside your blog entry. How can I mass a population and inexorably make my idea better? edit: or maybe the other way around (or both) Have a great day.
  12. Embassy of Time

    When code just isn't enough...

    Oh no, I meant "look at the resulting game and say what you would add" or something like that. My code is never pretty enough for outside viewing!
  13. r1ckparker

    Controlled Randomness

    You probably want a bit of randomness in your game, for example when enemies shoot a bullet or how long an explosion lasts. However sometimes you want it to be the same every game, so the player will know that an enemy will enter the stage and always shoot a bullet. You want some randomness, but consistent randomness so it is the same every time. "When replaying levels, enemies always appear in the same location and follow the same behavioral patterns" One way to do this is to have an array and load this with pre-calculated random numbers. When your game needs a number, call the next one off the stack and loop back to the top when you have run out. One cool thing you can do with this is save a replay. If you capture the player's inputs each tick, then in theory everything in the game should play out the same way. You could use this for demo mode or as a save feature.
  14. The information is stored here, but in a nutshell I am looking to work with a programmer to develop a voxel engine ( Nice chunk of this done !) and help with gameplay using unreal engine.
  15. Gnollrunner

    Vulkan? OpenGL? What........?

    From what I understand (and I may be wrong) only the Start Citizen modified version of CryEngine supports this and of course that's proprietary. I checked into Lumberyard before and I saw some banter about it but nothing that said it was implemented yet. In fact just about every major engine has some forum posts where a few people have asked for it. The only one which defiantly has it that I found is UNIGINE and that's kind of pricey. I guess you might be right. It's better to defer this stuff until later.
  16. Irlan Robson

    Points constraint approach

    Here is a summary of three approaches that can be used for hair/rope simulation: - Mass-spring System: Here particles are connected via linear springs. Equation of motion can be solved using an implicit integrator to support large time steps and avoid instability. This is typically used for cloth simulation in movies and some games (LucasArts, Blender, Pixar). - Position Based Dynamics: Kind of what you're using and commonly used in games. Fast but as an iterative solver, constraints can break. - Featherstone: Fast and supports any time step. Large velocities may lead to instability and blow up the simulation. Can be used for simulating inextensible hair. Featherstone is a single step approach. It works in reduced coordinates. Constraints are always satisfied. However, large time steps might lead to instabilities, but we can add damping to improve stability.
  17. Gnollrunner

    Vulkan? OpenGL? What........?

    If you know of any that are available, I'd be happy to hear about them. I've asked around quite a bit on various sites.
  18. Hodgman

    Vulkan? OpenGL? What........?

    IIRC CryEngine & Lumberyard do this by default? If you want portability in general, then you'll have to use more than one GPU API You can defer this decision to a future time by keeping a strong decoupling layer between higher level rendering algorithms (scenes, shadows, lights, models, materials) and platform-specific (D3D/VK/etc) implementation details. If by "portability" you mean "support Windows and Linux", then yeah, VK/GL can solve that particular problem... but if you mean "support Windows and game consoles", then VK/GL aren't very helpful 😉 D3D11 is probably the most stable GPU programming environment due to it being used by the majority of games for the last decade, so it's a great choice to use as your "primary" API if you do end up using more than one... You can also run D3D11 on Linux (Wine) via https://github.com/doitsujin/dxvk if you want.
  19. Hello, I want to know if it's good in this moment to begin to use wasm(2D game with webassembly using code C and Javascript). Because webassembly Is new and I dont know if it's compatible with all navigators. Thanks in advance.
  20. I assume you are on Windows (because of the WM_X events) and you are using some kind of Surface to test your app at? I might be wrong but from my experience Windows simulates a right-click on holding the tap, so check if your app is getting a WM_RBUTTONDOWN message instead
  21. RPTD

    Vulkan? OpenGL? What........?

    Huh? No engine with 64bit coordinates CPU side? I hardly belief this. I do this with my game engine and I don't think I'm unique in that department.
  22. Tom Sloper


    You can talk or write all you want about any game. Commentary does not violate anyone's copyright as long as you use your own words. I'm not a lawyer, and my words are not to be construed as legal advice.
  23. Kosh Naranek


    Detailed Information: https://www.kickstarter.com/projects/1612428326/tport-a-first-person-puzzle-game
  24. Touny

    A new video

    Thank you for your response. I will be awaiting for a patreon or a similar page.
  25. I'm currently using Direct X 11 for my procedural world/MMO project. I've tried to find a freeish game engine or simply graphics engine that supports 64 bit coordinates (CPU side), but apparently there is no such animal. Right now my investment in Direct X is very small as the vast majorly of the code is straight C++ and the graphics is isolated into an interface class. However now I'm going get more into the GPU stuff and I was wondering if it would be better to switch to something else that would give the program better portability. I was leaning towards Vulkan for no other reason than it seems to be all the rage (ha, ha), but I wanted to get some opinions from folks with more GPU programming experience.
  26. Vivid3DDev

    Artist looking for team/partner!

    Hi, We are seven developers making an adventure/rpg game. It's only been in dev for a few weeks but we are making progress. We have our own domain/website with private files/forums sections.And we're looking for more members. So i'd like to see your work if you are interested. You can mail me at antonyrobwells@gmail.com if you are interested. Thanks. (We're using unity3d btw)
  1. Load more activity
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!