• Content count

  • Joined

  • Last visited

Community Reputation

160 Neutral

About 3dmodelerguy

  • Rank

Personal Information

  • Interests
  1. So I am trying to build a turn based rogue-like game and trying to figure out the best way to structure the turn base / action system. I need to be able to support the the same action taking up different amounts of "time" (for example, some enemies should be faster and slower than the player) and different actions should take different amounts of "time" (for example, eating a meal should take long than loading a gun). After thinking about it for just a little, this is my general idea at a very high level. I would have a `ActionManager` class that would store effectively how many "action units" have pasted since the start of the game (probably be stored as a float). Any actor that can perform an action would need to register an event listener on the `ActionManager` to be notified when the "action units" have changed. The `ActionManager` would also expose itself as a singleton allowing any actor that can add to the "action units" to access it that way (right now just the player but I can foresee there being use cases where something else might need to push time forward). The singleton method might not be the best approach for this but it is probably the easiest and want to get something working before worrying about that part too much. All actors that can perform actions would need to store 2 things. One would be the last value of "action units" that it received. The other would be a list of pending actions it wants to perform (to be loaded in some fashion, not sure right now but not critical to the topic at hand). Now any time a method on the `ActionManager` singleton is called that changes the "action units", an event is fired to all listening actors. Those actors would then check the difference from the newest value of "action units" and the last one it stored. With that value it would then loop through the queued up actions is has stored, each which would have a "wait for remaining action units to pass" value. It would take that value and subtract it from the difference. If the result is a positive number, it would just update the "wait for remaining action units to pass" value. If the number is 0, it would perform the action and take it off the queue. If it is a negative number, it would perform the action and take it off the queue and then check the next action until the calculation is 0 or higher. With this system, I could say a player movement cost is .25 "action units" and one enemy might have .33 "action units" cost for movement. Every time the player moves, it would update the `ActionManager` and when the player has moved 4 times (resulting in an action unit of 1), the enemy would have only moved 3 times (1 / .33). This structure for this kinda of system seems like it would be pretty flexible. The biggest concern I have with this system is that I want to make sure it has a little overhead as possible since it will be core to the performance of the game I think. The actions in the queue I hope I can make as dumb as possible where it is really just setting data and ideally I can make the task of filling up the queue be a background process (so that when the player is doing nothing, other actor queues are being filled up to a degree) but that is another topic all together that I am sure I will be making posted about here in the future. Any kinda of critiques, opinions, ideas, suggestions, etc. for the high level system to laid out above would be most welcomed.
  2. Starting A Game Development Video Series

    Part 3: Part 4:
  3. Starting A Game Development Video Series

    Part 2 https://youtu.be/3rUDFaZQOVo
  4. So I am going to be trying something new for me and create a series of videos as I beginning developing an ARPG. I have uploaded the first video that is just a basic intro to the series and general idea of what I am going to be creating: Part 1: https://www.youtube.com/watch?v=hUX6jHboKkU Part 2: https://youtu.be/3rUDFaZQOVo Part 3: https://youtu.be/0kjzpcXu_Mg Part 4: https://youtu.be/l65Yx4-OXu4 NOTE: The aspect ratio is a bit off and the video is a little blurry but I will have that fixed for the next video.
  5. @kburkhart84 Yea, having intellisense support would be nice and while my expectation of even releasing this game are somewhat low (since I am really just doing this as I enjoy coding and enjoy gaming and this combines both of those), I would like to not restriction myself from not allowing modding plus I prefer this method for my own development as adding a piece of loot is as simple add an items to the json file and nothing more. I also don't have to worry about the order of the items with dynamically generating my string -> id mapper as with a class the manually sets the ids, if I remove an item in the middle of the list, all the ids afterwards would get messed up. I am sure there are ways to work around that (using an enum might work) but dynamically generating the mapper makes it so I don't have to do anything special for it and I can organize my files any way I want, change the loading order, etc. without much worry.
  6. Thanks for all the feedback, for some direct responses: Yea, I am familiar with over engineering and am definitely guilty of doing that from time to time in my day job but under engineering is something that can also lead to bad things like a system that requires a lot of effort to work it or major / total rewrites. Just trying to find a good balance for my initial implementation so that whichever way I go over (which I am sure I will), it might be an easier refactor later down that road if that needs to happen. I know about how game I have played in the past do handles thing like this however I am know that games like startbound has a string id or string to int id mapping (since you can do things like `/spawnitem wheat` in their in-game console) and pretty sure rim world is also similar based on the modding docs (http://rimworldwiki.com/wiki/Modding_Tutorials/Weapons) where none of the items seem to have an int or hex based id (closes thing that looks unique is `defName` which is a string). --- I did some performance testing with a database of about 9000 base items loaded and when attempting to just use an int id in code to access data 10000 times, it took `0.00005` seconds and when when using a dictionary to get the int id, it takes `0.005` seconds. So while it is certainly a lot slower (by a factor of 100), I think this is an extreme case and I can't see any real reason I would ever need to try to access more then 100 items at a time (which is still an extreme case I think) so I think I am going to go with this pattern for the time being. I am always doing the conversion from string to int as the first thing and then using the int going forward so I am minimizing the amount of string -> int conversions.
  7. I guess my though process behind using a string is that it is recognizable and rememberable, it is easy to know what "WOODEN_AXE" is but not 173.
  8. So I am building a mix of a 2d survival / action rpg (more towards the action rpg) and something that I am going to need to be able to keep track of is loot. I am going to have hundreds of base items I need to keep track of and then also each "entity" that can drop items will have a loot table of what items it can drop that I need to keep track of and I am trying to figure out an efficent way of doing this. I have an initial idea but what to get input on it. NOTE: I am doing this in C# (Unity to be more specific). I want to have 1 main class that would store an array of all possible items that can drop which would probably be read in from some sort of data file. Each of these items would have a unique string identifier so I would want to also store a dictionary<string, int> which would allow to easy access to the item by the identifier like this: Item item = Items[itemDictionary[id]]; I assume this would be more efficent than using a List and doing something like filtering especically if the list of items gets really large. Then each entity would have an array of all the possible items it can drop by storing the string identifiers. Then when the entity needs to drop a piece of loot, I can just pick a random index from that array which will lead me to the item from the main class storing all the items to know which item to drop. Obviously this is a very high level overview of what I am think of implementing and I am sure as I expand thing, stuff might have to change but as a general concept, anyone have any feedback on this?
  9. Thanks for the input all. I have decided to go with using a good portion of procedurally generated content. While I am going to have a number of static maps / map sections, I don't think my game idea is going to have enough functionality the make a fully static world work all that well.
  10. Thanks for the tips all. I ended up continuing to use the noise generator for the general map and was able to find a tutorial that was dumbed down enough for even me to understand (at least enough) on how to create a circular mask with randomization in it in order to have the map completely surrounded by water / beach. I am sure I will have more questions in the future as I am sure I am going to need to do more / better generation but at least this gives me a map that is usable for the time being.   Thanks again.
  11. So I am trying to figure out the best way for me to go about procedurally generating 2d top down world (like RimWorld) for a game I am working on. From everything I have read it seems like I would want to use noise algorithms for generating the world however the kind of math that seems to be required for this type of procedurally generation is not a strength so I am trying to find libraries that will handle most of the heavy lift as far as the math / algorithms go however the results I have been able to generate so far have been unimpressive.   Right now I am just trying to be able to generate the main world land not worrying about small things / resources like tress, flowers, rocks, ore, etc right now.  Want I am looking to be able to do right now is just: Generate a map of X by X size that is surrounded by a certain impassable tile (deep ocean, unbreakable rocks, etc.) Be able to generate a number of different biomes that have logical sense (have a beach biome only next to the ocean, have an oasis biome only within a desert biome, etc.) Make the terrain look somewhat irregular so that each map generation does not look too similar and the biome shapes should be quite varied I have been trying to use a Unity implementation of this library : https://github.com/Auburns/FastNoise_CSharp :  and I am guess I am using it wrong or something as the maps I generally filled of a bunch of oval shapes within ovals shapes. The few tutorials I could find on the topic either 1. Go into building the noise generating algorithm itself which while at a basic level I could probably do but I would be completely screwed if I had to extend that algorithm to what it would probably need to be for my end goal or 2. Talks about stuff at such with no code examples or anything and at such a high level I have not idea what they are talking about. I have no issue with using the data that is generated from the algorithms to be used for generating the world, I just know that I am not the person to actually generate those algorithms themselves.   Are there any good tutorials that have decent code examples about working with 3rd party algorithm libraries (C# would be ideal since that is the language I use with Unity) to generate maps of this nature?
  12. So I have been prototyping a crafting / survival / RPG style game for a couple of weeks now and want to just get a pulse on a topic related to the game from other people. The topic is how important procedurally generate worlds are to this kind of game. There are generally 3 different ways I general see this approached.   Everything is Procedurally Generated   One way it to procedurally generate everything from the land to the resources. Best example of this method would probably be RimWorld / DwarfFortress.   Static World / Random Resources   This is where the world will be static and you will know the layout of the area after you have played it for a while however the resources needed to survival / progress through the game are placed randomly throughout the world. The best example of this would probably be Project Zomboid.   The “benefit” I generally hear about procedurally generated worlds is that it helps prevent the game from getting boring because the world is different each time you play but then you have game like project zombie where I know certain people who can play that game over and over again regardless that it is a static world (at least as far as layout).     Just curious on what other people think, please leave and comment you wish.
  13. So I have been playing around with the idea of building a survival / crafting / rogue-like / etc top down 2D game in Unity3D and been building out very simple implementations of the core gameplay mechanics the past couple of weekends (character animation / movement / attacking, health / stamina system, inventory system, basic GUI for health / stamina / inventory, building / destroying structures, etc.). Now I am working on some basic procedural map generation. From what I have read, the easiest (maybe best for my needs) is to basically do multiple passes of using different noise generation to generate the different layers of my map. Currently I am doing one pass of simplex to generate the basic ground map (dirt / sand, grass, dark grass / swamp) and so far pretty happy with it:     The issue I am now facing is that I want to procedurally generated water surrounding this map to basically acts as a natural barrier to keep the user within this map (instead of just having a random point where the user can't move). Noise generation does not seem like it would work for this since I need it to only be around the map (and be pretty thin but still have some "natural" looking form instead of just being a straight line type thing) and noise generation is well, random.   What would I have to do to achieve something like this?
  14. Solid Game Engines For Top Down 2D Game?

    My performance "concern" was really just more of a guess as to what I think the most intensive thing for the game might be and my lack of understanding of what engines can do. Sure, I am looking to build a 2D game and compared to some 3D games, it would seems to be that graphically, it would be a lot less intensive but it is not unheard of for 2D games to have performance issues (I heard Starbound had some performance issues though it might have had entirely nothing to do with the 2D rendering).   Also, I would imagine not all game engines are optimized for 2D games. From what I have read, Unreal Engine 4 was not all that great for 2D in the early days (though I know they have whatever this Paper2D thing is now and it seems to be improving it’s 2D support). Even Unity is still working on a bunch of 2D features in their engine to optimize that workflow.   I agree that productivity in the engine for focusing on building out the game is high as if one engine is slightly more performant or optimized for 2D games but is 10X harder to use, probably not worth it, at least for me to use it but so is the opposite (much easier to use and just terrible performance), just need to find the engine that has a nice balance. I also know if performance was a huge concern, I know the C++ would be the way to go (or really assembly) but that is one of the trade offs I am will to make to increase my productivity.   Just really looking for engines to try out beside the limited options I have already tried. I have tried Unity and that is pretty good as far as usability (and can’t imagine its performance is all that bad). I have tried UE4 however the coding being C++ and the alternative being the visual blueprints system is a bit of a no-go for me. I also did a bit of research into Lumberyard but there is not a lot of good that has been said about it when it come to 2D. So while I have looked at some of the ones backed by big names, I just want to see if other people might know of other engines that might not have as much written around them as they might not be backed by names like Epic, Unity, Amazon (even though I don’t think of game development when I hear the name Amazon).
  15. So I am looking to play around with the idea of building a top down (maybe with isometric styled graphics) 2D survival / crafting / adventure style game (think Terreria / Starbound but top down or Forsaken Isle which would be a much closer example). Basically a game where I am going to want to generate and save random maps, make a lot of the world destructible (trees, rocks, etc.), allow the player to modify the map, fight monsters and such, and probably a bunch of other smaller mechanics (food / water, health, maybe NPCs, etc.). I am looking to see what would be a good choice for a game engine for this style of game. I am not looking to create my own engine with lower level libraries / framework as that it not a part that is extremely interesting to me not to mention that it would probably take me a while to get something that is anywhere close to ok anyways. I don't mind an engine that requires coding (I actually prefer coding over visual style programming) but I am look for an engine where the coding is not C++ (not a fan of dealing with manual memory management and stuff like that).   Right now I am leaning toward Unity as they have an interface to the engine that I quite like, I don't mind the C# language (even if they are on a older version of mono), and it is something I have some experience with (though it has been a good 2-3+ year since I really did anything with it up until just playing around with it last week). The biggest performance issue I think I would probably face would be just rendering the world. I would like to be able to load maps with hundreds of thousands of tiles but with the world being highly destructible, I imagine I would need lots of colliders to be able to handle that would and that would be performance intensive (I imagine the best way to handle that would be steaming the world in and out as the player moves but of course that is something I have no idea about and would have to figure out or figure out a different way to handle it). I just want to make sure the engine itself can handle something like this so that I can mostly focus on building out the game itself.   Not sure if there is any other engines that I might want to play around with before I dive deeper with Unity.