Jump to content
  • Advertisement
    1. Past hour
    2. I am curious about this subject because I am getting to the point where I will be refactoring the rendering of my engine soon. I have searched the internet for how to order the draw calls and this answer came: https://gamedev.stackexchange.com/questions/49779/different-shaders-for-different-objects-directx-11 However, shouldn't I be instancing all my meshes even if there is only 1 of them? And since we are instancing the meshes, doesnt that mean we are going to overdraw the pixel shader? What is the solution? Overdraw if there is > 5 meshes of the same type on the scene, or only instance in batches while keeping render order 100%. Seems like there might be some net positive for rendering out of order vs rendering in order, even if we suffer overdraw. P.S. Okay, profile it. I get it. I do. I just want to know what is usually done. Thanks!
    3. Short update: managed to get the version as in Realtime collision, working. The issue was that the extents in my OBB werent half, multiplying by 0.5 solved that implementation. In my testcase I also made one of the 2 cubes static, to check if the other implementation suffers from 0 cross product issues, but still doesn’t work. Now figuring out what else could be the cause. Any thoughts appreciated.
    4. Trying with different take: When you use something the compiler needs to know the size and names. If you want to say a pointer to something, it needs to know it exists. If you have a function that takes foo(A* const bar) then the compiler needs to know that A is a thing. The compiler already knows how big a pointer is, but it needs to know that an A is a thing. If you're working with actual instances of an object the compiler needs to know how big it is and what data it's got. If an A is 32 bytes, or 64 bytes, or 256 bytes, or some other size, the compiler needs to know how big it is in order to work with them as objects. If you want to access something inside it the compiler needs to know the name and where the data is at inside the structure. Inline functions can be part of those descriptions when properly marked so the compiler knows they're not the regular standalone functions. Header files give those details. The compiler allows you to repeat those details as many times as you'd like as long as they're the same every time. It is generally possible to include files multiple times without being an issue other than longer compile times. However, when you've got functions that manipulate those objects, the actual implementation of the class's functions that code should only appear once. Those are part of a compilation unit and can only exist in one place. When other compilation units call the functions the linker links up the call with the one-and-only implementation.
    5. As it is my first post in this forum, I want to say hello to everyone. Firstly I will tell what I want to acheive, then I will provide some example. So, I'm writing game in c# using MonoGame Framework and my own ECS. It's first time when I try to implement multiplayer feature. In my ECS every system is run one by one and order of systems is important. So I tough that the easiest way to implement networking, will be to receive packets asynchronously and group them together every frame. When client system would be executed every packet, which was collected since last frame would be read and used to update game state. But I don't have experience in asynchronous programming, so it's hard for me to combine asynchronous and synchronous part. Note, it's not my real production code, only example. using System.Collections.Generic; using System.Linq; using System.Net.Sockets; using System.Threading.Tasks; public class ReceiveServerData { private IList<byte[]> LocalPackets; private IList<byte[]> GlobalPackets; public ReceiveServerData(IList<byte[]> globalPackets) { GlobalPackets = globalPackets; LocalPackets = new List<byte[]>(); Init(); } public void Init() { Task.Run(async () => { using (var udpClient = new UdpClient(11000)) { while (true) { var result = await udpClient.ReceiveAsync(); LocalPackets.Add(result.Buffer); } } }); } public void Update() { GlobalPackets.Clear(); //-----Can this process be interrupted, by ReceiveAsync? ---- var localCopy = LocalPackets.ToList(); LocalPackets.Clear(); //----- If yes some packets may be lost due to poor design? foreach(var packet in localCopy) { GlobalPackets.Add(packet); } } } My problem with this code, is that, if I understand correctly, asynchronous code can be executed in any moment, so if the process of rewriting local packets to global packets will be interrupted, packets which was received during this interruption will be lost. I know that when using UDP I should expect some packets to be lost, but here packets will be lost not due to some network problem but because of how code is designed. For me it's indication that something is wrong with my code and design. Also, I use Global packets so every other system after this one, is safe to use GlobalPackets because they will not change until next synchronous update. Note 2, I want to keep things simple, I'm making this game as a learning experience and I don't want to bother my head with complex network design patterns. Firstly, I want to make it work
    6. People use their social networks (the people kind, not necessarily the web sites). Talk to friends, ask about friends-of-friends, that sort of thing. If you're involving the social network web sites to work the social network people, that involves posting things like "Can anybody recommend a person to do this thing?"
    7. When learning a new language or brushing up on an old one, I tend to re-implement the core algorithms in the tools of the language. Typically I implement some core data structures like stacks and queues, some searching and sorting algorithms, and minimal interface to visualize them in progress. A weekend of that is usually enough to ensure I've got enough of the language to get along with, even if it isn't mastery.
    8. Looks like a 2D style side scrolling platformer with 3D graphics. Only two degrees of freedom of movement. I personally prefer an open world 3D platformer with all directions of freedom of movement. Linear gameplay is also fine for me but I prefer more freedom of movement and gameplay similar to Rayman 2 or the Crash series so if this game is what is intended, I would suggest making some more freedom of movement and freeing the camera to maybe be behind the player.
    9. IcedCrow

      When to use zBrush? When to stick with Blender?

      Appreciate the input thank you!
    10. Interesting, but I would really appreciate it if the game had 3rd person camera movement and controls like in No Man's sky. I have this kind of game planned in development to add features missing in No man's sky. For the homebrew vs ready made game engine, it depends on the objective. If the main objective is to learn or develop an own game engine, then the homemade engine is an option, but if the objective is to develop a game that can compete with other titles, then the ready made game engine is the option.
    11. BitsNPiecesMusic

      Bits & Pieces Music

      @nsmadsenThank you for the feedback! One of my biggest challenges is harmonizing, and I admit that I wasn't sure where to "take" the song next. But this is another one that I'll be working on when I'm back from my vacation. I really appreciate your input!
    12. frob

      Want to gain sevap points??

      That's a danger sign. Putting on my career counselling hat, I'm not entirely sure you actually want to develop games. Many game developers tell stories about how they built small games and found joy in it, tell stories about when they build their first text adventure games, their mastery of tic tac toe, writing their first AI, or their first time trying to figure out what the ideal move is under given circumstances. Why do you want to program games? Is it because you enjoy playing games? Or is it because you enjoy creating games? What is your personal reason, what is your driving force, why do you personally decide you want the job of building games? Here are some parallels: I love to eat great food, and I enjoy cooking for myself, but I would hate to be a chef where I make everything to order all day every day. I enjoy beautiful music, and I can play several instruments reasonably well, but I would hate the job where I must practice all day and perform every night, and I hate the stress of performing on stage. I enjoy movies but have absolutely no skill as an actor and wouldn't enjoy the job. I love driving, but I have zero skills as a mechanic and zero skills if I were to try to build a car engine, those would be terrible jobs for me. Consuming something is different from creating something, and even if I do enjoy creating something it doesn't mean I want to create the thing for my career where I do it all day, every day. Unfortunately there are people who feel that because they enjoy playing games they want to get a career creating games. Some people follow that path even though they have no interest in creating games. You can do it, you can force yourself to become skilled at something you don't enjoy, but it will be hard to find motivation in your life. Game programmers tend to love programming. Game programmers can (and frequently do) pass the time discussing algorithms, reminisce talking about how the code had problems with one algorithm and how one day the programmer realized another algorithm would be perfect, or discuss why one data structure is abysmal and should only be used under duress. If that isn't your passion, you should consider what things you are passionate about. If you could do anything in the world, what would it be? When you have time on your hands (other than being entertained) what do you do? What are your hobbies? What are your passions? I've worked with several people who described a situation much like you did. At a young age they decided they wanted to be a game developer because they enjoyed playing games. They focused on education that got the job they wanted. They pushed hard to get into the career. And when they finally got the job they discovered they were miserable. One of them loved music, was always playing guitar, and after about two years at the company announced he was going to quit games and become a music teacher. Another had the job for about six months and then said that their best experience was not making games, but was the job working in a nursery with plants as they worked their way through school, they were quitting to go work with plants again. They were so fixated on what they thought was the ideal job that they forgot to look around, to look inside themselves, and never figured out what they truly enjoyed. There is a great book called "What Color Is Your Parachute?" that talks about it. I strongly recommend finding a copy. It's been a best-seller for decades so you can find recent editions in libraries and used book stores if you prefer that to buying it. Inside the book there is a section called the Flower Diagram. The purpose is to spend time identifying what you deeply enjoy, what you are passionate about, your most favored people environments, your most favored industry environments, your most favored living environments, and so on, and identify what can bring your own personal bliss. I suggest you get a copy and work through the exercises. It is entirely possible that you work through the exercises and figure out that you really do love programming, that given any job in the world you would choose the job of creating software above all others, and that you're merely in a slump at the moment. In that case, wonderful. You can find ways to get through the slump but know you're on the path to your personal bliss. Or you may work through the exercises and discover your personal bliss is something else. In that case, also wonderful, you'll still be on your way to your own personal bliss. Go get a copy of the book, read it, and figure out your own personal bliss.
    13. Cheers matey. Yeah, just working on a small Android game for my phone and will try and get it on the play store at some point. Even if only one person downloads it and leaves a really crap review, but has no issues running the game...I'll be over the moon!
    14. jb-dev

      Vaporwave Roguelite

    15. I've decided to change the frequency of these updates: most of the times, I just do some minor updates and graphical tweaks here and there. Therefore, if I do these updates weekly, then I'll have a lot more content to write about. So, yeah... Last week, I've been working on adding many different types of rooms in the level. You may or may not know that I use BPS trees to generate a level, and previously, only 5 types of rooms spawned in a level: starting rooms, ending rooms, normal rooms, tunnel rooms and Malls. It was very static and not flexible, so I've changed it to make it more dynamic. Malls Variations First, I've added two different variations for Malls: Blood Malls and Clothes Malls. These were originally planned and already built. Big Malls These are your typical type of Malls. You can find everything here. This is where, for example, you'll find hearts, keys and/or bombs. They were already in the game, but now they're more specialized (or generalized in this case) Blood Malls The Blood Malls specialized in bloody activities. (meaning that you'll mostly find a selection of weapons here) Clothes Malls The Clothes Malls are specialized in clothes, which in our case are actually pieces of equipment the player can have New Rooms Aside from these new type of malls, I've also added 3 new types of rooms. These rooms, however, are guarded by a locked door: the player must use a key to enter. In order to unlock a locked door, the player just needs to touch it. If the player has enough keys, then a key is used and the locked door disappears. There's also an event that triggers that can do things when the player unlocks the door (like revealing hidden models and what not) The Gym The gym is a room resembling some of these outside gyms you can see in some places. The player can use up to tree gym equipment to get a permanent stats bonus to a randomly selected stat. The prices of usages of these gym equipment doubles after each use. (i.e. if using one piece is 10$, then after buying it the others will cost 20$ and so on) I've planned that NPC would use non-interactive gym workstations for decoration, but it's not really important as of right now... The Bank The bank is not fully functional at the moment, but it still spawns. The idea is to give the player a way to store money persistently throughout runs. The player can then withdraw money (with a certain transaction fee) from that bank. That means that you can effectively get previously deposited money back when you'll need it the most. The Landfill The landfill gives you the opportunity to gain back previously thrown away pieces of equipment. Basically, the game stores the last three thrown away pieces of equipment. When the rooms spawn, it simply displays you those pieces of equipment. you can then pick them up for free. This, however, comes with a caveat: pieces of equipment that will be switched from a previously thrown away pieces of equipment won't reappear in another landfill. Also, once the landfill despawns, the items in that landfill will be discarded. (Think of it as a last chance opportunity) There aren't any props at the moment, but it's fully functional. Minor Tweaks Aside from that, there are also some minor tweaks: Bombs now damage the player if the latter is within its blast radius; Player jumps are now more precise: letting go of the jump button early makes a smaller jump than if it was held down longer; Ground detection (that was previously done with raycasting) now uses Unity's CharacterController.isGrounded property; When the player is hurt, a knockback is applied to him; The strength of said knockback is actually the total amount of damage the player took. Coins and money items now emit particles to help the player localize those important items; They're now keys (left) and bombs (right) counters in the HUD; The key one still needs a specific icon, but it's fully functional; There were many shader optimizations and adjustments: Many shaders were merged together and are now sharing most code; I've also changed the shaders so that we can use GPU instancing for most props, I also now use MaterialPropertyBlock for things like wetness; Also, now the palette texture and its palette index are now global variables, this effectively means that I only need to set these values once and everything else follows; A small "Sales" sign is placed in front of most types of malls. This sign has a random orientation and position each time it's spawned. ; Props that obstruct a passage are removed from the room; This way no prop can obstruct the room so that the player cannot exit it. Some rooms now spawn ferns instead of palm trees; Lianas also have different configurations based on which prop spawns. Next week Over the next week, I've planned to integrate the first relic. Relics are items that give the player capacities and stats boosts. It's common to have something similar in most roguelite and roguelike games. That type of thing needs to have a good abstraction in order to work: there are many different types of capacities that affect the player in radically different ways. There's a lot of work ahead. But I'm confident it'll be easy. Just need to get in the groove.
    16. Today
    17. Check the sticky here its a ten year old thread but still seems relevant. I'm late but these vlogs are a great idea!
    18. This doesn't seem the best sub-forum but I can't find a forum in the jobs area - mod please move if so! We're looking to advertise non-game work for projects that use almost 100% game dev technologies. It's always been a challenge - we've used Upwork, StackOverflow, etc, and advertising on all of them is expensive if you only want one part-time person. I guess Upwork is the biggest pool but is not specialist and the decent people are in the minority so a lot of sifting is needed. Where do decent, solid game developers look for work that they won't be competing with $5/hr hackers?
    19. Considering how crazy the expectations on games nowadays, making our own game engine alone is like one of the greatest art for our enjoyment. It's a good hobby.
    20. Scouting Ninja

      When to use zBrush? When to stick with Blender?

      Zbrush for organic models. That is characters, trees animals etc. Even characters in armour is better in Zbrush. Zbrush for cloth editing also, also I use marvelous designer for clothing; but it is a lot extra to learn. Blender for hard edge modeling and everything else. Weapons, objects, vehicles, props, anything that isn't alive. You will use Blender more than Zbrush unless you are a character modeler. Blender also has sculpting, I like to use it for terrains with the Dynamic topology; because it works great on things like rocks etc that have wide range of details.
    21. Hey! I want to make an online server based game that can be played in a browser. What engine is best suited for this purpose? The game itself will be rather simple, using "locking on" features rather than real time collision/hit detection, if that is a relevant factor. I am looking to make the game with 3d-graphics so that one can zoom/rotate the camera but from a rather distant, isometric view. Any help is very much appreciated! Also, my programming experience is limited.
    22. I'm currently in the process of learning Blender. However I have come across zBrush for sculpting. My question is simply -> when do you want to use zBrush in your workflow?
    23. mychii

      Architecture of and engine editor

      If I didn't misread, for example like in Unreal Engine 4, the runtime (the game app) has simple macro like "WITH_EDITOR" kind of macros. So I think the editor code is injected in the runtime with all things frob has explained. It can pause, it can add or remove object in the editor display and put it as data that is used on the runtime, it can re-run the game, etc. Something like this (just one of many) in their runtime code, general main file, Launch.cpp: ... #if WITH_EDITOR if (GIsEditor) { ErrorLevel = EditorInit(GEngineLoop); } else #endif ... Then when you publish, I believe all these links are removed. Supposedly like that in general. Again I'm just assuming, with data-oriented design (somehow), I'd focus on syncing data on both editor and the runtime (that means they are connected indirectly). For example, you drag-n-drop a cube into the game, the runtime is waiting for the editor to write the information about the cube (in a file or memory I dunno); its location, its name, its mesh, and more. After that is written, the "write" information is then dispatched to the runtime saying "hey, there's a new cube here, can you display it for me?" ... or other alternative, the runtime with the injected editor library code would be like "Oh hey look, there's a new information from the (probably) editor! a cube in location XYZ. Let's display it!" etc. So what I'm suggesting (again, not sure if this is how Unity works) is basically there's a bridge which is the data they share, which keeps the runtime and the editor loosely-coupled but well-connected to each other with their own job. When you save the information from the editor, all the data is stored (cooked) in the .scene file that is meant for the runtime, either editor or published app.
    24. So, I'm using PerspectiveOffCenterLH (in SharpDX, but that should not matter) to project perspective correct stuff into screen space. Up until last night, it was working well. I could translate on all axes, and I can rotate on the Z axis just fine. So I added y-axis rotation for giggles and that's when things went all weird. Every time I rotated about the Y-axis, my geometry (a simple quad) gets distorted. Now, I have to admit to being a dumbass when it comes to linear algebra, and it's been a very long time since I've had to deal with a projection matrix directly, so it could be that I'm using the wrong tool for the job due to my ignorance. I'd post screen shots, but I can't right now (I'll try to do so later today), so this description will have to do: Basically it looks like the vertices on each side stretch off into the distance (more and more as I rotate). I'd like to note that I have another app, where I'm using PerspectiveFovLH, and that's working just fine. So again, this very well could be a case of "the wrong tool for the job". Here's the code I'm using to build up my stuff: // Matrix construction code. Anchor is 0, 0 for now, so we can ignore it. // ViewDimensions is the width and height of the render target. var anchor = DX.Vector2.Zero; DX.Matrix.PerspectiveOffCenterLH(-anchor.X, ViewDimensions.Width - anchor.X, ViewDimensions.Height - anchor.Y, -anchor.Y, MinimumDepth, MaximumDepth, out ProjectionMatrix); // This is my code for combining my view + projection DX.Matrix.Multiply(ref ViewMatrix, ref ProjectionMatrix, out ViewProjectionMatrix); // And this is my code for building the view. DX.Matrix translation = DX.Matrix.Identity; DX.Matrix.RotationYawPitchRoll(_yaw.ToRadians(), 0, _roll.ToRadians(), out DX.Matrix rotation); // NOTE: This doesn't work either. //DX.Matrix.RotateY(_yaw.ToRadians()); DX.Matrix.Multiply(ref rotation, ref translation, out ViewMatrix); // My code in the vertex shader is pretty simple: Vertex output = input; output.position = mul(ViewProjection, output.position); return output; The order of operations is indeed correct. It works just fine when I don't rotate on the Y (or X - but that's not important for today) axis. So, yeah, can someone tell me if I'm dumb and using the wrong projection matrix type? And if I can, an explanation for it would be much appreciated to so I don't make this mistake again (don't go too math crazy, I'm old and my math skills are worse than ever - talk to me like I'm 5).
    25. You're already familiar with Unity, so I highly recommend to keep going on with that one. There's also another 2D game engine called Cocos Creator that is totally free. But Unity is easier to understand if you miss something because it's popular (easy to search for troubles) and well-documented.
    26. AireSpringfield

      [D3D11]Access Depth Buffer using SV_Depth

      Thank you very much!
    27. It is a running joke / meme with computer programmers / developers that they get hammered with a bunch of ideas regularly from other people that they want to see the developer do. Developers don't typically work that way. If you want a developer to do a game for you, you're going to have to pay the developer to do that work. Otherwise there is no incentive for a developer to develop your idea for you. Its a massive time sink with little to no value for the developer.
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!