Jump to content
  • Advertisement
    1. Past hour
    2. 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
    3. 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.
    4. DividedByZero

      Modeless dialogbox Win32 question

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

      Modeless dialogbox Win32 question

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

      Modeless dialogbox Win32 question

      I have tried a bunch of different combos, But at present, these are the settings I am using.
    7. 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?
    8. 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
    9. Today
    10. 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!
    11. DividedByZero

      Blending textures question

      Never did get this working properly 🙁
    12. 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.
    13. 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.
    14. 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.
    15. 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?
    16. 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?
    17. 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.
    18. 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); } } };
    19. 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.
    20. 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.
    21. 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.
    22. Yesterday
    23. 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.
    24. 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; } 😂
    25. 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?
    26. 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); } };
    27. 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.
    28. 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.
    29. 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!
    30. 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
    31. HI there, I'm currently working on a 2-player local card game and have run into a problem concerning hidden information. As in most other card games, I want to keep the cards each player has, hidden from the other player, but when you only have one screen this turns out to be more difficult than you think. I have multiple ideas how to solve the problem, but none of them really seams to be very elegant: 1. Turn around the cards, for the player that currently has to make a turn: This is the first idea that came into my mindt, but it also has a big problem: The other player isn't allowed to look at the screen while the other player is performing his turn. This seems unituitive because your opponent might want to think about his next move, or even worse, might need to respond to your actions depending of the design of the game. It also seems very unfun, to always make sure the inactive player turns around before making the next turn. 2. Encode the cards of each player: My second idea was to let each player choose a seed, to encode their cards. This would work like the following: Each player chooses a seed which then encodes each players cards (gives them random ids, according to the seed) The game would then only show the id's of the card available to the player. The second step would be to create a small phone app, where you could enter the seed and then display your cards by entering the ids shown on the main game. The problem with this would be that each player needs to keep track on his phone which cards he has, which he just played, etc.. This would cause the player to effectively do each turn twice because after playing a card on the main game screen he would need to manually remove it from his phone app. 3. Create a networking system that sends the game information to each players phone: Pretty much the same deal as above, only that you get rid of all the manual work of seed picking and updating the cards in your hand. A downside for me, however is all the code needed for networking to manage this stuff. For now I rather prefer to stay away from the networking aspect, as my project is complicated enough for now. 4. Scrap the idea of the local multiplayer and go full online mode (like Hearhtstone): Same deal as above, would need lots of networking. As you can see none of the solutions are very practical (if you want the project to stay local and don't use any networking). Do you have any ideas how you could solve this problem more elegant without overcomplicating the hole process of getting the information to the player and breaking the gameflow to much? Thanks in advanced for your help!
    32. Anton Kormishenkov

      2D To The Capital 2 is now live on Steam!

      To The Capital 2 is a game in the genre jRPG with classic turn-based battles in which you have to travel together with four heroes visiting a lot of cities, dungeons, mysterious places and fight with various bosses.It took almost 2 years to develop and finally we have reached this important event as the release of To The Capital 2!Big thank you to everyone who has followed our project. I hope our game will give pleasure to fans of the genre of jRPG, and beginners in it.
    33. Maybe you are right about bindless and multithreading combined, I haven't thought about it too much in a while. Although we already have texture arrays in d3d11, I don't see why we can't relax the requirement that they be all the same format and size, and just let us index an array of textures in a shader. I think OpenGL has bindless texture extension. I don't see how this causes a multithreading issue for SRVs. Seems multiple threads could reference a read-only texture resource just fine when building a command list.
    34. There's a reason I quoted two numbers in there instead of 1. You can multiply the whole thing by 10 if you like to get a safe "10km to 1cm detail" range. Fixed point 32bit was mentioned where obviously you can't use int(1) = 1m and still have millimetre details... So it holds that the same arbitrary unit techniques can obviously be used with float as well. Almost everyone works in meters and the other scientific units by default though, so I quoted my rules of thumb using those units and human scales. Did you really just assume I was telling you to store vertex position as meters in an integer and that will somehow preserve sub-milimeter details? And then repeatedly try to point out that this isn't true?
    35. DividedByZero

      Creating a global thread

      Awesome @All8Up, that worked perfectly. Many thanks!
    36. Another update, this time #4, getting close to release now ' Update #4 Live - Chopper Boss of DOOM 17 Feb @ 4:21pm - ExUnitDazza We've released a new update to Smith and Wintston! This is mainly a metric ton of tweaks to the first half of the game to make it more balanced and more fun to play. Thanks to everyone that gave us feedback and helped make the game even better. Features: Added in the Chopper boss. This is the middle boss in the game. He’s pretty epic (testable via the new BETA TEST menu) Added a BETA TEST menu so player can test specific features of the game and give us feedback without destroying their Arcade Save games. We’ll be adding things to this menu and asking for feedback a lot we think. Added a button for twitter and facebook in the title screen Tweaking/Balancing of lives and ammo based on player feedback and streamer videos Added disabled story and coop buttons to the main menu so players know they will be there activated at some point After the player dies in a level specific enemies don’t restore so it becomes ‘slightly’ easier to finish the level. The cost to the player is that they will get a slightly lower score because there are less enemies to kill. Beta Test You can jump straight to the Chopper Boss from the new Beta Test menu option. You can test the boss and give us feedback without affecting your Arcade Save game. We'd love to hear from all players Engine Changes: Upgraded BGFX rendering code. At least 10% faster on all platforms. Added Metal rendering engine for macOS (8x faster than OpenGL) Added OpenGL rendering engine for Windows macOS and Windows can select the rendering engine to use in Options > Video Bug Fixes: Fix for some of the trophies not being present Skip cutscene text is now correct for controller, KB/Mouse users. Ping Game Boy helmet renamed to the correct Pink Game Boi Chopper based enemies can now be hit by grenades Mining Laser now shoots from closer to the player so that when right up against the wall it actually hits it. This makes running through the caves and mines a lot easier. In some levels the player plows through snow or mud, after they died this stopped working, this is fixed. Some GameObject (enemies, pickups etc) were not restoring after player death long german and spanish phrases should now in to text boxes custom in game cursors appear in front of the shippy text. Once again, thanks to everyone that's played the game and given us bug reports and feedbacl. It's really means the world to us so jump in to the forum and tell us what you think!'
    37. Astrofra

      Pygame - alternatives?

      You should have a look at HARFANG 3D, that is a full C++ engine with a Python API (just import harfang and you take it from there) I'll let you have a look at the samples below and try it for yourself. Just feel free to contact me if you have any question, I'll be glad to help (I work for the company that develops HARFANG). A mini "ace combat" game, all done in Python : A snooker simulation, in full rigid body physics, all done in Python : and a couple of code snippets, including VR : https://github.com/harfang3d/vr-python-quickstart
    38. upallinsky

      My first OST | Feedback please

      Maybe you're right. Because I'm trying to meet expectations, but i think this is not my lvl now.
    39. Eternal

      Creating a global thread

      The temporary is already an rvalue, so what's the std::move for? (And the lambda also isn't useful, if you don't need the capture.)
    40. nsmadsen

      My first OST | Feedback please

      Gotcha. In that case - why not just have the audio by itself? Tying it to the Star Wars visuals definitely gives an expectation.
    41. upallinsky

      My first OST | Feedback please

      Thx a lot, man! Yeah, i have some problems with melody, because i usually used a voice for that, but in soundtrack voice doesn't need. I try to upgrade my tracks with your opinion. In Star Wars this is my first video music experience. And now i understand that this is big fail. Hope for next time i was more prepared. And again, thx so much!
    42. nsmadsen

      My first OST | Feedback please

      Destiny - Man, this is a fun track! I'd watch out for your low to highs balance here. I'm getting a LOT of highs but not much lows at all. This is making the mix feel tinny and thin. With the emotional, epic vibe you're building, there's PLENTY of opportunities here to make some big, large impacts. I really like the moment at 2:27 but I'd be careful about the rhythms here. With such a slow attack on the long(er) strings, it can make things feel out of time. The ending should be built up to be MUCH larger. The last few drum hits just don't do it justice at all. And consider a cymbal roll into that final hit with a nice, long reverb tail. It's a fun track but there's still a lack of a main melody. Not saying that's a problem but just be aware of it. The name fits - certainly feels like an epic, fates-driven song. Nice job, overall! Star Wars - You have to be really careful when writing to picture. You want to make sure your music matches the visuals perfectly in both terms of rhythm and vibe/mood. Unfortunately, I feel neither are matched up well in this video montage and your music. I would go back and look for key moments you want to hit and work out ways to build up the music (or have it suddenly drop out) to better fit the pacing of the visuals. Then also do a better job of establishing the vibe and mood you want the music to express. This music feels way more melancholy than what the visuals and the plot of The Empire Strikes Back presents. Also some of the same production tips I gave for Destiny apply here too. Hope that helps! Nate
    43. therax1986

      Theraxius - HTML5 2D action game + level editor

      I work with JavaScript for almost 10 years and I always used other frameworks and libraries (jQuery, Angular). For this project I intentionally decided to write it in pure JavaScript.
    44. All champions in League of Legeds are 3D models, animated with skeletal animation. You can see the actual models in lots of viewers, even online - like here: https://www.fanbyte.com/features/league-of-legends-model-viewer/#W1swLDAsMCwiNDAiLDMsNV1d It doesn't include particle effects at all, but basically you can see that there is just 3D model and simple skeletal animation. Not just for movement, attacks, but even for death (which points out that there is no rag doll physics involved, at all). The maps are also 3D, hand textured - the look is quite acceptable. They often use large polygons with hand painted image - especially for backgrounds around the map. They don't really use many effects (they used even less back then), I believe their goal is and always was to target even slower hardware (I was running it on integrated Intel GPU back when I was on university - and the performance wasn't bad). Some basic physics computation will be involved - for Ziggs abilities F.e. (bouncing bomb) - but they don't really use any rigid body dynamics, or cloth physics at all. Some animations are baked and look like physics simulation (collapsing environment on Howling Abyss for example). This will be just assumption on my side - but I believe Riot uses navmesh to implement character navigation on map (therefore when you move anywhere, your character immediately knows the path how to get there. Other champions can then be implemented by other agents on the navmesh, and so does minions (and abilities). You then have to avoid/block with other navmesh agents when going along the path. Why do I think it is used? Try blocking minion wave with your character, they do have some collision avoidance implemented. Also this tends to easily allow some characters to ignore the barricade (like moving through minions), easily implement 'Flash' ability, etc. Riot hosts their own servers, each of the 10 regions uses different location. What do you consider affordable budget? For development I'd dare to say that single small virtual server is enough (possibly multiple to implement load balancing) - these things are extremely cheap (I pay about $50 per year for one of these, and you can get cheaper depending on your requirements). As for live servers, this will depend on the amount of people that will play your game (your budget can easily go anywhere between $20 per month, to $20k per month and beyond). Using cloud services like AWS can be a huge advantage here, because you can scale them based on your requirements (start with small one, and when picking up more players you can upscale), this should work unless your game is simply too big, and it most likely will work for that scenario too, although ... at some point buying your own hardware and housing it will most likely be cheaper.
    45. SoldierOfLight

      Performance of D3D12 and Vulkan

      You don't get bindless texturing or efficient multithreading without manual memory management and manual resource barriers. I suppose some people may see memory management as a feature rather than a tax, but resource barriers are nearly always a tax. But if you want the ability to do bindless or efficient multithreading, the app's the only one who has enough information to be able to do it -- in order for the driver to do it, they'd need to know what you're referencing (defeated by bindless) and when (defeated by multithreading).
    46. DX12 makes sense for large teams or companies that make engines that can optimize for each GPU type. It's not worth the development cost for small companies or smaller 3D projects IMO. I hope they eventually release some sort of DX11++ that supports the ray tracing API, bindless texturing, PSOs, and better multithreading, maybe even manual resource barriers. Not really interested in manual memory management (maybe make this optional--let driver do it or do your own). I think they could have solved a lot of the CPU draw-call overhead problems without going so low-level.
    47. I like the idea of finding new names and say take it a step further and abandon the high-fantasy setting, keep the same concept, slow speed tank units that deal heavy damage, mid range units with more speed and less damage, and of course the squishy special skill users. The basic concepts of strategy the SRPG genre are rooted divide all military combat units into 3 groups,infantry, artillery and cavalry. Each has its' strengths and weaknesses and is effective against one while being vulnerable to the other. It's easy to default to knights, archers and mages when translating this concept to video games because that is the standard for so many of the best SRPGs, but at it's core it's just a basic grid based rock, paper sciscors game. If you have something awesome that will stand out like a story that absolutely needs to be told in a Tolkenesque high fantasy setting or a bunch of assets made and work done on a fantasy. Of course you should try and find a game play mechanic to make it stand out but I think a different story and setting will do just as much to make you stand out. Take for example "Shadowrun", it took the basic table top mechanics of "Dungeons and Dragons" then changed the settings and made their own distinctive world out of it. There are the same basic concepts, magic, orcs, fairies, dragons, but it's in a cyberpunk setting and set in alternate future dystopian versions of real world cities. The series has managed to stand out and have longevity compared to the countless other D&D clones of the time and has been around for about 30+ years. First, decide on a setting. If you have your heart set on high fantasy medievil we can work from there but see if you can't come up with anything else. It doesn't have to be Shakespeare, it can just be the Shmoobles wanting to fight the Schmobbles because they took all the Schmoopty, the important thing here is where is this happening?
    48. h8CplusplusGuru

      Creating a global thread

      you're going to need a std::move in there like All8Up posted.
    49. Hi All, I want to make a game similar to league of lengends but I am not able to decide certain implementation factors that I will eventually put in my code. 1) Is the game world full 3d or 2d? I am confused here because there are videos on youtube that show first person LOL and there are video captures that shows full 3d perspective view of characters. Is it 3d but the camera is fixed at angled top view? Is it not a waste of polygons of your game objects are 3d but you get to show them from one fixed global camera? 2) Is there any physics simulation involved? It looks like interacting players have fixed animation and it does change per map position. If there is some, how of physics is involved? 3) How collision detection is implemented? I believe characters just block each other and dont’t animate while trying to be at one same coordinate. They interact only throug auto(which is click and play) or abilities(click and play). 4) If my multiplayer architecture is client server, then where can I deploy the server? Do lol have dedicated high performance/ load balancing server computers for each continental areas? Are they self hosted or hosted through aws/cloud services? Is it possible to setup self hosted server application with affordable budget? How much?
    50. I've recently implemented runtime lua scripting in my game engine, and am currently just polishing it. During the polishing I noticed that when I do this one specific thing in lua, the stack gets overflown. I'm doing the memory management my self for the lua stack, and I'll code dump it at the bottom of this post in case it has any relevance. To give some context, I'm using the __index and __newindex metamethods for reading and writing fields in the user data "LuaEntity", which is basically just a wrapper for the Entity class in my engine. This is somewhat what the __index and __newindex functions look like in C++ static int32 __index(lua_State *ls) { string _index = lua_tostring(ls, -1); if (lua_isuserdata(ls, -2) && !lua_isnil(ls, -2)) { auto _entity = (LuaEntity*)lua_touserdata(ls, -2); if (SceneManagement::GetEntity(_entity->id)) { _entity->UpdateProps(); if (_index == "x") { lua_pushnumber(ls, _entity->x); } else if (_index == "some_field") { lua_pushnumber(ls, _entity->some_field); } else if (_index == "some_other_field") { lua_pushnumber(ls, _entity->some_other_field); } else /* if reading a non-default field */ { lua_getuservalue(ls, -2); WZ_ASSERT(!lua_isnil(ls, -1), "Tried reading unitialized field '" + _index + "' in '" + _entity->name + "'"); lua_pushvalue(ls, -2); lua_gettable(ls, -2); lua_remove(ls, -2); } return 1; } } else { lua_pushnil(ls); } return 1; } static int32 __newindex(lua_State *ls) { string _index = lua_tostring(ls, -2); if (lua_isuserdata(ls, -3) && !lua_isnil(ls, -3)) { auto _entity = (LuaEntity*)lua_touserdata(ls, -3); if (SceneManagement::GetEntity(_entity->id)) { if (_index == "x") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "x" to the value top on stack } else if (_index == "some_field") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "some_field" to the value top on stack } else if (_index == "some_other_field") { WZ_ASSERT(lua_isnumber(ls, -1), "Expected number value"); // .. Set "some_other_field" to the value top on stack } else /* if writing a non-default field */ { lua_getuservalue(ls, -3); lua_pushvalue(ls, -3); lua_pushvalue(ls, -3); lua_settable(ls, -3); lua_remove(ls, -1); } _entity->UpdateProps(); } } return 0; } }; This all works fine as in I can read and write both the default but also user-made fields in the entity table without a problem like this: local function update() -- A callback function that's invoked each frame from C++ local entity = entity_get("some_entity") local old_x = entity.x local old_y = entity.y -- .. do stuff if (old_x ~= entity.x or old_y ~= entity.y) then -- .. entity moved end end This keeps the memory steady with no problems, however, If I were to do the same thing but instead of storing entity position in old_x and old_y I would store it in a table called old_pos like this: local function update() -- A callback function that's invoked each frame from C++ local entity = entity_get("some_entity") local old_pos = { x = entity.x, y = entity.y } -- return values 'x' and 'y', pushed to the stack in C++, doesn't get garbage collected - memory fills up -- .. do stuff if (old_pos.x ~= entity.x or old_pos.y ~= entity.y) then -- .. entity moved end end then the values x and y, each pushed to the stack in __index as a return value, seems to not get garbage collected by lua which quickly fills up my stack budget and causes the stack to overflow. Here is how I've told lua to handle stack memory: struct LuaMemPool { const void *head; const void *tail; const ubyte *headByte; ubyte *current; LuaMemPool(void *head, void *tail) : head(head), tail(tail), current((ubyte*)head), headByte((ubyte*)head) { } void Free(void */*ptr*/) { } void *Allocate(size_t sizeBytes) { void *_ptr = current; current += sizeBytes; WZ_ASSERT(current <= tail, "Memory usage overflow"); return _ptr; } void *Realloc(void *ptr, size_t oldSize, size_t newSize) { void *_newPtr = Allocate(newSize); memcpy(_newPtr, ptr, oldSize); Free(ptr); return _newPtr; } int32 Allocated() { return (int32)(current - headByte); } static void *Alloc(void *ud, void *ptr, size_t osize, size_t nsize) { LuaMemPool& _pool = *((LuaMemPool*)ud); if (nsize == 0) { if (ptr != nullptr) { _pool.Free(ptr); } return NULL; } else { if (ptr == nullptr) { return _pool.Allocate(nsize); } return _pool.Realloc(ptr, osize, nsize); } } }; I am aware that I'm not freeing memory.
    51. JokinenHarri

      Crypts of Death: Free Android mobile RPG

      It's a really fresh and interesting take on the rpg genre! I really like it Hope to see more updates in the future.
  • 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!