Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. Hi everyone, I'm trying to implement the displacement mapping technique by William Donnelly from GPU Gems 2: Chapter 8 for a project. I'm working in XNA/MonoGame and using HLSL for my shaders. The problem I'm having is how to create the distance map and I'm not really understanding how I would go in creating it. I know that Nvidia has released the code for that chapter but the files are in c++ and I'm not familiar with c++ so its been throwing me off on how to recreate it in c#. Any explanation on how I should go about in creating the distance map would be extremely helpful. Thanks for any help or suggestions.
  3. Today
  4. Jess Daniel

    Survey - Game Deve

    https://american.co1.qualtrics.com/jfe/form/SV_1ZddG4mHflUCQND Hello all! I am a graduate student at American University and I am doing research on game developers and their habits. I would love it if you would fill out this survey! It would truly help me out a lot.
  5. GoliathForge

    Battletech Developer Journal - 03

    This blows me away because it's exactly what I do. First with string ID then ah, cool a numeric ID. Now I've hit the more you learn the more you realize you don't know thing. Nice one.
  6. I'm happy to help. When I first discovered enums oh so long ago, I thought, "These things are awesome! It's a strongly typed value I can use and bring clarity to my code." And that's mostly true. It's honestly not too much trouble to keep bolting on more hard coded logic any time you want to add a new type. But once you start working on bigger projects with people who want new things... and they can't code the new stuff themselves... UGH! Now I have to take time out of my day to do some boring grunt work when it should be as simple as someone copying/pasting a file and changing a few values.
  7. 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.
  8. 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
  9. RPTD

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

    I guess then I need to hurry up putting those finishing touches in place
  10. 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.
  11. 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!
  12. 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.
  13. 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...
  14. 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.
  15. 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.
  16. 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!
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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.
  22. 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.
  23. 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.
  24. 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
  25. 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.
  26. 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.
  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!