Jump to content
  • Advertisement
    1. Past hour
    2. 8Observer8

      c# console snake game

      What is bad with this instruction? Why do you dislike it? It describes basics of development of snake prototype. It does not matter that it is in Python. It is very simple to rewrite it to another language. I rewrote it to: Snake 2D using C#, WinForms, GDI+ Snake. WinForms, OpenGL 3.1 Snake 2D using JavaScript/ES5, Canvas API Who disliked it? Why did you make it? I spent my time to make these instructions to help beginners.
    3. Shaarigan

      Need Advice Important (advanced questions)

      Sorry dudes but all of you that tell someone that especially asked for making an engine, even as beginner, to just drop that and instead make a game is not even mistaking but even worse is leading people to the wrong track! Without going too offtopic here, I despise those people that tell anyone that he/she can't do anything 'just because' and this is exactly the fact here. I don't say anything against telling those people what work is behind the topic, providing resources and so on but there is a huge difference between 'It is not possible' and 'it is possible but hard to achieve'. Sure Unreal and Unity have some more devs that are driving development but even those are cooking just with hot water and no magic happens here anyways. Unreal for example links the SDL2 library and a lot of other third party libs.The most time consuming part of developing a game engine along with design decisions is learning/developing technologies that weren't available before but they also write blog-posts, articles and make talks so taking their solutions saves a lot of research one would need to do otherwise. You could even take a look at their source code and see what happens behind.
    4. If a beginner* starts asking about individuals making game engines, and you give them any answer other than "this will never ever happen", you are doing them a disservice. Everything else is just nitpicking. * Someone who is 20 years out of touch may be called a beginner for all intents and purposes
    5. My personal feeling is don't complicate your life. Assuming floats and/or doubles I just make 1 equal to 1 meter. Done. IMO the only real reason to jostle with units is if you are trying to use fixed point and at least for what I'm doing I don't see a lot of value in that these days. In addition it just seems like your building in a limitation should you choose to expand things later.
    6. Today
    7. Irusan, son of Arusan

      Need Advice Important (advanced questions)

      You seem to be using match to mean "can make a acceptable game with"; I'm using match to mean actually equivalent to. The Deck13 engine is not remotely as full featured as the big engines you can get hold of. Which is not a criticism of their engine; just a statement of fact. Can you make a game engine with a team of one? Sure you can. Can you make an engine like Unreal? No, you can't. Of course you can't, if you could it would mean that Unity and Unreal are staffed by incompetents and they're not. But, in any case, trying to develop a game engine as a solo devoloper is a mistake; instead you're better to just develop the technology for your game. You don't need to make an engine to make a game.
    8. True. This is why I'm getting stressed when trying to use free models on the Internet... People do not use the same representation unit and are not telling about it. So we have to guess. Everyone is free to use whatever measure system he wants as long as the unit is respected. If for one object, let's say a house you define your single unit to be metter, and for let say a tree the unit suddenly changes to feet, then something will definitely be wrong. If all scales are respected you'll have no warms except one: you need your types be able to handle all your scale range, from your minimum detail precision up to the larger one.
    9. Shaarigan

      Need Advice Important (advanced questions)

      The linked paper article is written about Deck13's work on Fledge and it does well match Unity from their perspective as far as they worked with Unity inhouse and took it as template for their work. It illustrates that it is never impossible even for a single person to make an acceptable game engine with enougth time and motivation. Except that I think most people at Unity are support and sales so anyways ... So be patient with your "this will never ever happen" statements in the future :)
    10. suliman

      Alternative names for fantasy classes

      I like the high fantasy setting for this project so it will likely remain. Im actually going for a mix of hero quest (the classic board game), darkest dungeon (gritty gothic/lovecraft) and battle brothers (slightly more realistic medieval). So while the mechanics are classic, I was looking for a way to make the classes sound slightly more original while still maintaining that old-school feeling. Hard, I know
    11. Irusan, son of Arusan

      Need Advice Important (advanced questions)

      How does an engine which doesn't match Unity or Unreal being created by 20-30 people remotely demonstrate that a single person can make an engine that matches Unity or Unreal?
    12. DividedByZero

      Modeless dialogbox Win32 question

      One weird thing I just noticed. Windows 10 seems to be very excited that I have created a pop up window. Every time I trigger the window creation from my parent window I get the 'Select to capture what you just did' Windows 10 notification. Close the pop up and re open the pop up and the message keeps coming back - LOL.
    13. Shaarigan

      Need Advice Important (advanced questions)

      The Fledge Engine developed by Deck13, created arround 2013-2014, was made with just a total of 70 employees and maybe a third of them was involved in engine development so your statement isn't true at all. In the end it depends on the team (or person) and the time and tools used to achieve the goal
    14. Resources and security would be early tiers, for sure. Environmentalism as in climate etc. would be late tier. What kind of resources and security did you have in mind? Design is good, but I'm open for all input at this (and any later) stage A 10 mile territory is too big. Starting scales are more city block size, or local neighbourhood. Small scale, for better overview. My idea was to have early players get the chance of defining the territories near them, according to some criteria, but that's just a thought. When a team (or guild, in your words) reaches a certain level in their territory, they can access adjacent territories, growing as they progress. Actions beyond your territory are allowed, of course, perhaps allowing them to be "softened up" for when the team can expand? Just spitballing, here... Your entire thing on organizations and NPCs(?) fascinates me, please elaborate when work isn't demanding your time?? Animal Crossing could be a good pre-study for structure. It and something like Stardew Valley seem to lean on the concept, though of course not IRL. Perhaps a "pure" game as training grounds / tutorial before going IRL? The measuring of progress IRL would need to have some systems of evaluation, of course, I'm still racking my brain on that... And virability is now a word, at least in my vocabulary!!
    15. Hi all! Im looking JSON editor for tuning my 3d model. First what I need - it is binding to special widgets for mist popular data types. For exmaple "color" must to be editable in widget with gamma-colors, like in photophop, "one-float" types must to be editable via slider, for usefull drag-n-droping his value be mouse, "bool" types must to editable by checkbox, and e.t.c. I finded a few JSON editors, where I have widgets for "color" type and checkboxes for bool type. No any JSON editors with slider for "float" types values. Also I want to edit several another pupolar types, like "position", "arrays", "combobox-selector" and "file path". Also I want to tuning scheme of present information. For example I value with name "Albedo texture path" must to be top, "Metalic texture path" must to be buttom, "weapon type" must to be from left and e.t.c. Before to start to write this tool my self, I want to find best tool from existing for now.
    16. DividedByZero

      Modeless dialogbox Win32 question

      Will do. I thought I'd post what seemed to be the obvious section to start with, as I don't have much experience when it comes to intermediate window handling. I have always dealt with a single simple window up until today. But now I am feeling adventurous - LOL. Thanks again.
    17. CrazyCdn

      Modeless dialogbox Win32 question

      Yup, that would do it. In the future post as much code as you can. But try and first make the smallest working example of your problem. No one wants to read 3000 lines of code 😉 Glad you got it figured out though.
    18. Once again, thanks for your incredibly detailed answer! A lot of the basics you described sounds perfectly doable with Unity's tools, while the more sophisticated parts may be solvable with custom editors and tools. Best of all, the way you described it is simple enough for beginner like me to understand. I esp. like the idea of the 4 corners with the point in the center -- who would've thought! Now that just leaves me one last question: do you do consulting for sports games? I wouldn't be surprised if you already do!
    19. DividedByZero

      Modeless dialogbox Win32 question

      Strange, even if I manually override the resource file like in the example above, the parent window still not respond unless the dialog box is closed. STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION Just found it! I was doing this in the dialog box procedure DefWindowProc(hWnd, msg, wParam, lParam); I have changed it to... return FALSE; ...and all is happy. Thanks for your help guys!
    20. Just like everything else, it's a tool. Currently I use a static variable to share a single resource between multiple instances. The major downside is the resource has to be manually freed,
    21. CrazyCdn

      Modeless dialogbox Win32 question

      Honestly I'm not a fan of CreateDialog(), according to the docs it just uses the CreateWindowEx() function anyway, just do it manually and have a lot more control. I'm sure you read this already but here is an example from Microsoft themselves. Here is an older example too.
    22. ALT PLUS VIETNAM

      3D ASSET BUNDLE - VIASS VILLAGE PACK

      ❣️❣️HEY GUYS, WE ARE VIASS - VIETNAM ASSET DESIGN ❣️❣️ Allow me to introduce to you guys, our 3D asset for your game - VIASS VILLAGE PACK Inspired by the Japanese ancient village, VIASS’s designer team decided to create a village package containing realistic 3D simulation models of the Middle Ages. From houses, tools, items to fences, woods, mountains,... Everything appears to be marvelous. With this package, you can create your own game with polygonal style based on your imagination. All of the package’s prefabs and equipments is made in Japanese Middle Ages style.Modular sections are easy to piece together to create various combinations. More than 80 unique models, for example:-Temple-Building set-Wooden/Stone fence-Grass ground-Tent-Wooden/Stone bridge-Road-Ornamental plant-Ancient gate-Stone-Mountain, hill-Tree x 6-Pond-Rice tree-Bamboo x 3 💥💥So what are you waiting for? Are you excited to get this fullest asset package??? 💥💥 ------------------------------------------------------------------------------------ To get this amazing package, click the link below: Unity Asset Store - Click here Follow us to stay updated: https://www.facebook.com/ViassDesign https://viass.altplus.vn/ Thank you!
    23. DividedByZero

      Modeless dialogbox Win32 question

      It might be something to do with how I am handling my message events. Once the dialog box is open, the main window no longer responds to any events. My main loop is pretty basic; while (bContinue) { while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); if (msg.message == WM_QUIT) bContinue = false; } } If I click on the main window, the title bar of the dialog box greys out like as if it has lost focus, but the events continue to function as per normal on the dialog box. When I close the dialog box the main window is happily on control again.
    24. I haven't used Unity's IK, but if this is the case, you can always write your own solution. To get AAA style sports-game animation, you'll probably have to write a hell of a lot of custom animation code rather than using an off-the-shelf solution In my experience, sports games do a lot of intensive animation blending and state transition stuff that isn't required by most games / won't be supported by general solutions. Things like keeping track of which foot was the last on the ground and doing different blends based on that (which requires tagging the foot-fall animation frames and then all other frames with left-phase or right-phase), tagging frames for when the ball and a hand/foot should collide or lose contact, having a massive database of similar animations on hand and being able to quickly query which ones are the best to blend for different target poses, etc... Ignoring IK for a moment, you can get a long way with simple animation blending. Say you want to write a solution for when the ball is going to pass through a 1m x 1m square to the right of the character. You could make four swinging animations -- one for hitting a ball at each corner of that square -- and then by blending those four animations with varying weights, you can generate a new swing animation for any other point within that square too! To get better quality, you can add a fifth animation for the center of the square, too (which breaks it into 4 triangles, so can also make it cheaper as now you only need to blend three animations). You can also make single-frame animations which are basically just poses, or different ways of holding the racquet. By blending those in, you can change the angle at which the racquet hits. Also, blending doesn't have to occur globally across the entire skeleton. When blending animations you can restrict it to just an arm and fade out at the shoulder, or just the spine, or just the legs, etc... Again, you can either use unity's existing tools for this, or take full control and implement all of this animation/pose logic yourself. I would try to do most of the work by having a catalog of every different kind of swing that you want your characters to be able to make -- enough of them so that by blending them together you can pretty much place the racquet anywhere. Then I'd add IK on top of that just to do any final tweaking that's required, NOT as the main technique for getting the racquet to the right spot. Also, if you want to completely avoid the fake hit situation from the video you posted, you can detect when your animation system has failed pretty easy by putting a sphere collider on the racquet and checking if the ball actually hits/misses it. If the ball misses the racquet (because your animation code has failed to move it to the right place), you can choose to not apply your fake physics
    25. There are several names but the most common name would be pubsub: https://en.wikipedia.org/wiki/Publish–subscribe_pattern, though, given the implementation it may be better termed as an event bus. It is a fairly common pattern in engines and there is nothing generally wrong with it. Unfortunately like all things, it will depend on your specific use cases as to how good/bad it fits your goals. In the general scheme of things, the fact that you are using a static is not actually the worst thing in the world. I personally don't approve as it would break the rules of my codebase, absolutely zero global or static state can exist which is mutable in any form. But, you may not need to enforce such a strict rule, but I would highly suggest considering just what impacts a single vector of listeners may have in the future. For instance, do you expect to route any object->object messages through this? if so you really need to reconsider the static and potentially might wish to consider multiple instances each with a different set of events which is will supply. I.e. the UpdateBus, the EntityBus, the etc etc different buses which each thing can pick and choose from. Additionally, something to keep in mind, if you intend to thread anything, beware of this pattern. You will almost always need to make this a deferral based solution if you intend to use threads anywhere near the publisher. The easy solution, wrap access in a mutex, is a solution worse than the problem in such patterns all too often. End point, what you posted is reasonable for something simple. If you intend to use it in a fairly comprehensive manner and/or with threaded systems around it, you likely need to rethink the implementation a bit.
    26. DividedByZero

      Modeless dialogbox Win32 question

      Not much to the call - CreateDialog(hInst, MAKEINTRESOURCE(IDD_DIALOG1), NULL, ToolDlgProc);
    27. Endurion

      Modeless dialogbox Win32 question

      And the parameters to CreateDialog are? Chances are you're setting the parent HWND, try using NULL there.
    28. DividedByZero

      Modeless dialogbox Win32 question

      I have tried a bunch of different combos, But at present, these are the settings I am using.
    29. Endurion

      Modeless dialogbox Win32 question

      Help us help you. Which parameters are you setting in your call to CreateDialog? Which windows styles are set in your dialog resource?
    30. mysteriousmonkey29

      Multiplayer networking for modded open source game?

      Wow, this is intense! Really interesting how they run simultaneous simulations with the same inputs rather than have one machine do all the processing and then pass it all to the others. Are most RTS games done this way, or was it specific to AoE? It also sounds like a nightmare to impliment in either case, so the lesson learned is, don't try to do this myself, haha
    31. Thank you so much for such a crystal clear, detailed response! I'm leaning towards the former -- fake physics -- as that's what most if not all non-VR, non-1st person tennis games do. My follow up question below mainly involves (TLDR:) how do I implement this in a logical, natural looking, and easily tunable way in order to account for every hitting angle in my game? (by hitting angle, I mean the difference in height[Y] between the players hip and the incoming ball), Here's my thought process. Hope I'm not horribly over complicating it or going down the wrong path-- Assumptions: Setting an IK target is relatively easy in Unity since I can just create an empty game object and make it a child of the ball, or just make the ball the target object directly. Unity's IK solution only allows the hands or feet to be controlled by IK -- I am assuming IK cannot control the racket directly. To make the racket position AND angle (z-rotation, like a windshield wiper) look precise and convincing, this would require an accurate X/Y/Z position at contact and some z-rotation of the racket if the ball is above or below the "comfort zone" -- comfort zone being between hip to shoulder height. I don't want IK or code to affect the Y and X rotation of the hand or racket. For this case, let's set the sweet spot to a range around the player's hip height as the Y value for comfort zone, say Y = {1.0-1.5}. In other words, the comfort zone is the range of Y values where the racket can hit the ball and still be parallel to the ground at contact. Setting the correct X/Y/Z position seems easy enough since hand y = racket y, and hand z = racket z, and hand x = [racket X - racket length], but the z-rotation (windshield wiper motion) of the racket is where things get tricky-- Need to decide on the min/max Y range of the player's hand y before the hand+racket is allowed to z-rotate upwards or downward (lets say Ymin/ymax is 1 and 1.5), and the min/max hand+racket z-rotation angle (let's say -80deg to +80deg), then use that z-rotation angle and the racket's length to calculate the "sweet spot" of the racket face. then in code (or IK?),offset the players X position in order to line up the racket and and ball exactly-- not sure if using transform.position or IK would be the better solution here? Caveats: My goal is to not change each animations elbow angle angle too much, but it would be super nice if there is a procedural way to add a little dynmaic extra elbow flexion or extension, and or shoulder raising/dropping and outward stretching or inward squashing (not sure if these are the right terms), depending on ball distance -- as long as it looks natural. To sum everything up, I'm just trying to emulate what every AAA tennis game does to achieve proper contact of the racket with the ball in a more procedural way, to reduce the number of animations I would need to make. Please let me know if this seems like the right track!
    32. DividedByZero

      Blending textures question

      Never did get this working properly 🙁
    33. Hi Guys, I have a modeless dialog box that I have created with CreateDialog() being called from the parent window. According to the docs, being modeless, I should be able to select the window below it to give it focus. But for some reason the dialog box always retains focus until closed. The dialog box is created using the 'Add resource' option in the resources in Visual Studio 2017, if that information is of any use. How do I go about allowing the parent window to be selected again? I am using the Dialog box as a tool bar, so I'd like to still have it on top but allow other windows within the same application to gain focus. Thanks in advance.
    34. I've got a paradigm that I'm somewhat fond of and which I use quite a bit in my engine. I came up with on the fly and have been using it for a while but now I'm starting to rethink my code practices and just wanted to run this code by you guys to make sure its kosher. Here's the template: class Listener { public: Listener(Listener* instance){ mListenerList.push-back(); } virtual void ProcessMessage(MSG& msg) = 0; static void _(){ for(auto listener : mListenerList) mListenerList->ProcessMessage(); } private: static std::vector<Listener*> mListenerList; } Typo: static void _Listener_UpdateAll() Then I have an object who uses the interface class Camera : public Listener { public: Camera() : Listener(this) {} virtual void ProcessMessage(MSG& msg) override; } And then I update somewhere in my main engine loop void EngineLoop() { Application->Update(); //etc.... Listener::_Listener_UpdateAll(); //.... } My question: is there a name for this patter and is it ok to use it in this fashion with all the static methods and variables and such, mixing it with interfaces etc. By the way I use this in lots of places, not only for message distribution but if I want to have a class "auto update" itself without the need for me to call ->Update() manually I just define the Update function in the interface and call it from the base pointer in the engine loop. Or if I want to parent one object to another and have the child follow the parent around in the world I have a similar class that links their position vectors through an interface. In other words I kind of use this everywhere. So would that be something that is discouraged in general and if so what is the appropriate way to accomplish something similar? Thanks.
    35. There's basically two ways to handle that hit -- actually do real tennis racquet vs ball physics, or do fake physics... In the video it looks like they're faking it as at 0:50, yeah, you clearly see the ball get "hit" even though the racquet doesn't hit it... With fake collisions, the gameplay can decide whether you hit or missed however it likes (did you press the right button, have the right timing, right skill, right dice roll, etc) and then if it decides that you hit the ball, it can temporarily place a rigid physics plane at some position that the ball will bounce off of, or use some other method such as just overriding the velocity of the ball directly. The next problem then is how to make the animation actually look convincing (and hide the fact that the physics are fake). To do this properly, you really want the game to be able to decide whether your character will hit or miss a short amount of time before that actually happens. The ball follows a predictable path, so you can estimate where it will be as it passes next to the character, and then use that position as an IK target for the character's racquet to reach. You now have a position for the racquet and a time that it need to arrive. You can then pick a swinging animation (or a blend of a few of them) and add some IK blending on top to make sure that the racquet reaches this location at this time. Then, it should look convincingly like the character actually hit the ball (even though it really just bounced off of a magic infinite-plane). With real collisions, you do much of the same thing -- when the player presses a button to swing, you predict the ball's path and identify the exact location and time for when the ball will pass next to the character. You then select a blend of different swinging animations and IK algorithms to make sure that the character's racquet is swinging through that location at that time. You can use IK to subtly change the angle of the racquet based on the user's input in order for them to be able to aim their shots. Instead of doing fake collisions where the ball is magically bounced backwards, you do real collision against the racquet's collision shape. Because these are two small, very fast moving objects, you will want to perform your physics at a very small fixed step size / very large fixed update rate, or use a continuous-collision-detection scheme (CCD) that can determine sub-frame collisions between a moving sphere and a moving hull.
    36. thanks for the advice Rutin! BTW I found this tutorial for Final IK which does exactly what I need. However I'm wondering if similar results can be obtained using Unity's built in IK? (I don't need the uneven terrain adjustment, only the target tracking:) https://www.youtube.com/watch?v=OhCtiV5r8HA Any further suggestions?
    37. Thanks Vilem Otem! You have cleared most of my doubts. One doubt I still have is whether the bounding boxes are 2d or 3d. If implementing either results in same effect then keeping it 2d will give performance gain. If it cant be done in 3d then can you think one such interaction that might require 3d bounding box? PS-Every interaction is animation I believe, auto attack and abilities with some something like ziggs’ trajectory might be dynamically calculated(that is too there is no variable to calculate intensity of his trap jump) But, Is infrastructure to make my server network tolerant and protect it against various securities and DDOS maintainable? Do you know where Notch was hosting his Minecraft server back when he just started?
    38. Julie.chan

      Hidden information in local card game

      My thought is, if you're requiring use of mobile phones anyway, why not just do the entire thing in the phones? Either way, you're still using networking, so I don't see how tying the game to a third screen is helpful to anyone. Actually, the most elegant solution I can think of is much simpler: just don't make it a video game, make it a physical card game instead. You can get cards printed quite cheaply at BoardGamesMaker.com (that's the service I use for a card game I designed, Keeper of the Cards), and then you don't need to worry about any technical concerns at all. The only reason I can think of to make a card game into a video game is so you can play it either over a network or against an A.I.
    39. Thank you for stopping me from discovering that the hard way I'm using Lua 5.3.5 I'm trying to completely clear the stack after each update() call, yet the problem persists. Also I found out that it doesn't seem to have anything to do with my __index function, as this happens whenever I create a new table in update(). I've now implemented the Free() function for my memory management, it still doesn't manage to catch up with all the allocation for the tables. I'm guessing the lua gc is just too slow to collect that many tables, but it seems like such a loss to not be able to create tables for such simple tasks in update(). Doesn't seem like I can edit the post anymore (I'm new to this site), so I'll just dump the new code for the memory manager here. struct LuaMemPool { const void *begin; const void *end; ubyte *current; static constexpr u8 ALIGNMENT = 8; static constexpr u8 MIN_BLOCK_SIZE = ALIGNMENT * 8; struct FreeList { FreeList *next; } *freelistHead; LuaMemPool(void *begin, void *end) : begin(begin), end(end), freelistHead(nullptr), current((ubyte*)begin) { } void Reset() { freelistHead = nullptr; current = (ubyte*)begin; } void Free(void *ptr, size_t size) { size = SizeToAllocate(size); if (size >= MIN_BLOCK_SIZE) { FreeList *_newHead = (FreeList*)ptr; _newHead->next = freelistHead; freelistHead = _newHead; } else { } } size_t SizeToAllocate(size_t size) { if (size < MIN_BLOCK_SIZE) { size = MIN_BLOCK_SIZE; } return size; } void *Allocate(size_t sizeBytes) { sizeBytes = SizeToAllocate(sizeBytes); if (sizeBytes <= MIN_BLOCK_SIZE && freelistHead) { // Allocate from freed memory void *_ptr = freelistHead; freelistHead = freelistHead->next; return _ptr; } else { current = (ubyte*)(((uintptr_t)current + (ALIGNMENT - 1)) & ~(ALIGNMENT - 1)); void *_ptr = current; current += sizeBytes; WZ_ASSERT(current <= end, "Memory usage overflow"); return _ptr; } } void *Realloc(void *ptr, size_t oldSize, size_t newSize) { size_t _toCopy = oldSize < newSize ? oldSize : newSize; void *_newPtr = Allocate(newSize); memcpy(_newPtr, ptr, _toCopy); Free(ptr, oldSize); return _newPtr; } int32 Allocated() { return (int32)(current - (ubyte*)begin); } static void *Alloc(void *ud, void *ptr, size_t osize, size_t nsize) { LuaMemPool& _pool = *((LuaMemPool*)ud); if (nsize == 0) { if (ptr != nullptr && osize != 0) { _pool.Free(ptr, osize); } return NULL; } else { if (ptr == nullptr) { return _pool.Allocate(nsize); } return _pool.Realloc(ptr, osize, nsize); } } };
    40. FYI the OpenGL extension requires you to manually specify texture residency if you're going to use the texture through a bindless handle, effectively putting you in the same position as D3D12.
    41. I like the idea of the main game being displayed on screen with the phones being used to view the cards. The second idea sounds the easiest to implement and I like the idea of avoiding all the network hassle. The thing is it still has to be convenient, even if the game looked awesome if I had to type in a code I wouldn't play because I'm lazy, as I'm sure many other people are. You should do scannable QR codes that link to an app and show the player the corresponding card. You could embed the codes in game art that either gave the other players a hint at what kind of card it was without outright showing them to encourage planning ahead and strategy or make it alternating artwork with codes worked in so that it's always different and there is no to tell your opponents cards before hand to keep the element of surprise up. All of this seems a lot harder to implement than something that's always online like Hearthstone but it's also original and I think worth the effort. Good luck with everything.
    42. The challenge is over, but that doesn't mean I'm done working on this thing. Diablo-clones are a core part of my fundamental nature as a human being, so of course I was going to get addicted to working on this project. Main things I've been working on have been tweaking the on-screen display of loot item tags to eliminate overlaps: and I have started work on building the inventory and equipment management systems and UI: UI is a fiddly, annoying beast to work on, and these kinds of inventory control systems with their UI are some of the worst. Lots of little edge cases, a whole lot of widget wrangling, some pretty complicated interactions etc... Luckily, the world has advanced since the days of Diablo 1/2, so I have plenty of existing models for how it should function properly. This system is far away from the levels of polish that will be necessary, but it's getting there. For the UI tags, I tested several different methods, and finally settled on the simple scheme of collecting all items within a radius of the player, sorting them based on their world coordinates so that they are in back-to-front order as seen from the player's view, then inserting their labels one by one into the label container for display. If a label to be inserted overlaps any existing labels in UI space, move the label downward until it no longer collides. While there is occasional flickery weirdness this way as the player moves, it seems to be at least on a par with Diablo 2, and doesn't suffer from some of the weird inaccuracies that Path of Exile suffers from. As far as the inventory system, I am at the point where picking up items places them in your bag, after first attempting to place them in an open equipment slot appropriate for their type. Can't drop anything yet, and can't yet move from bag to equipment and back, but that'll be on the menu for tonight/tomorrow.
    43. Yesterday
    44. SoldierOfLight

      Performance of D3D12 and Vulkan

      Read-only resources don't necessarily require barriers, but they do require residency management: if you have 2GB of read-only resources on a 1GB card, but only reference ~512MB per command list, that's doable as long as the OS knows which 512MB you're referencing. In D3D12 you do that with explicit MakeResident and Evict operations. In D3D11/GL, the driver needs to detect it - which is hard to do if you have all 2GB of those resources available to any draw operation via bindless indirections. If you want to add potentially writable resources into bindless, then you need manual resource barriers as well. Similarly, efficient multithreading requires manual resource barriers, because even if the driver can detect what you're using, they still don't know the order in which they're going to execute, which is necessary information to get the barriers correct.
    45. Hodgman

      Creating a global thread

      The rest of us are over here like thread t1; int main() { t1.~thread(); new(&t1)thread(functionToThread); t1.join(); return 0; } 😂
    46. That is weird... What version of Lua are you using? In the past when I've had an issue like this it's always been that my code has unbalanced the stack. I now use a macro at the top of every function that's callable from Lua, which does nothing in shipping builds, but otherwise makes a RAII object that records the stack size upon entering my function and then asserts that the stack depth upon leaving is the same (or the same plus the return value in the case of functions that are meant to add things to the stack). I'd add some similar assertions first just to make sure that your own code isn't accidentally responsible. I'm reading on my phone with bad code formatting, but it looks like there's some code paths through __index where you don't push a result but still return 1?
    47. h8CplusplusGuru

      Creating a global thread

      can also do the following: class A{ std::thread mThread; void threadWork(){ std::this_thread::sleep_for(std::chrono::seconds(1)); } public: void start(){ auto threadWorkFunc = std::bind( &A::threadWork, this ); mThread = std::thread(threadWorkFunc); } };
    48. DividedByZero

      Creating a global thread

      Man, how do you guys keep up with all this? I have been using C++ since 2005 and I still feel like a beginner.
    49. h8CplusplusGuru

      Creating a global thread

      Well std::thread has a deleted assignment and instead a move-assignment, so normally you do explicit std::move. However, with the temporary it is not necessary.
    50. hplus0603

      Multiplayer networking for modded open source game?

      Those are the best game designs 🙂 Btw, if you like Age of Empires, here's a very good networking article about that very game: https://www.gamasutra.com/view/feature/131503/1500_archers_on_a_288_network_.php It's in many ways the first really public description of the RTS lock-step simulation/networking model, and well worth a read!
    51. Once i was writing earth sim, i used double precision to define vertices and do the collisoon math, i used 1 unit as one meter so even when earth center was at 0,0,0 i had to deal with numbers bigger than const double earth_radius = (6371.0 * 1000.0); didnt work well for.collision and had.many precision issues, was wondering for about a year on this, answer was use integrals, and 'pivots' So lets assume theres an earth radius aas this double thing Now to define a vertex position you define a pivot point (reference point) All that matters to use the less precision: 60000-59999 equals to 1 right? But what about 60-59? Aint that easier to compute? Unfortunatetly i didnt code that = waste of time. One thing is to store a int number and denominator int to recalculate floating point but even long double could output here 0.999999 not 1
  • 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!