Jump to content
  • Advertisement

About This Group

Welcome to the For Beginners Group! Where you are new to game development looking for some help navigating the many choices and challenges of the field or if you are a seasoned pro looking to pass on some of your wisdom to the next generation - this is the place for you. Check out the For Beginners forum in the tab. We'll be adding more beginner resources to the group soon!

  1. What's new in this group
  2. I'm taking my first steps in programming with Direct3D. I have a very basic pipeline setup, and all I want to get from it is an antialiased smooth image. But I get this: First, I can't get rid of stair effect though I have 4x MSAA enabled already in my pipeline (DXGI_SAMPLE_DESC::Count is 4 and Quality is 0): And second, I get this noisy texturing though I have mipmaps generated and LINEAR filtering set in the sampler state. Am I missing something or doing wrong? I would appreciate any advice on that. Here is my code: 1) Renderer class: 2) Vertex shader: 3) Pixel shader: Thank you in advance!
  3. Sergey-Kh

    Can't get antialiased picture from Direct3D

    It seems like I get your idea. But I don't get how to implement it. How should I take more than one sample from a Texture2D?
  4. xycsoscyx

    Can't get antialiased picture from Direct3D

    Kudos for fixing the window scaling issue, I didn't even notice that, I thought you meant the minutia (forest through the trees and all that jazz). For anisotropic filtering, you'll need to increase the samples to more than 1 to notice the difference. I think a single sample is actually the same as having it disabled (don't quote me on that), since without multiple samples it won't be able to even it out over the surface. At the least, only using a single sample won't offer nearly the same enhancement as more samples. Note that increasing the sample size does decrease performance, but that's the price of enabling the filtering. This is why it's typically left as a user option, if they are ok with the stippling or have lower end hardware and need those few extra cycles, then they can decrease/disable the filtering.
  5. Sergey-Kh

    Can't get antialiased picture from Direct3D

    I've just tried to switch to anisotropic filtering (D3D11_SAMPLER_DESC::Filter is D3D11_FILTER_ANISOTROPIC now and D3D11_SAMPLER_DESC::MaxAnisotropy is 1). Now, it doesn't help with texture aliasing either Okay, I've just figured the reason of this stairs effect: The reason is that I passed the same width and height values for CreateWindow WinApi function, and for DXGI_SWAP_CHAIN_DESC::BufferDesc. Meanwhile, these should be different because CreateWindow takes *outer* width and height of a window to create (window rectangle), while BufferDesc should receive *inner* values (window client area rectangle). Because of that actual area on screen was *smaller* than swap chain buffer and the result of rendering was presumably resampled to fit the rectangle, which was introducing the aliasing after MSAA was already applied. Fixing the issue gave a much cleaner result (4x MSAA is applied here): But the question with texture aliasing is still open:
  6. Yes. Check out the link I posted and you'll see all the platforms supported by Game Maker Studio 2.
  7. Having zero-baseline knowledge of how to create an online video game, besides a free software to create 8-bits on my MacBook, I'm interested in creating a version of the free online game Age of War, with little money as possible. Certainly, you'd require more particulars, but to begin, I want my 2-D game to be no more complex than Age of War. I'd imagine there's a few resources out there, but I'm oblivious to where. And feel free to humble me, I want to learn the ropes.
  8. In the future, if I wanted to convert my online game to an app, would this be possible?
  9. You have a few options but the easiest route might be looking into Game Maker Studio 2 as it supports HTML5. https://www.yoyogames.com/gamemaker/features Game Maker would be more than capable. If you want to learn to program you have other options for web deployment such as HTML5 with JavaScript. Keep in mind that Game Maker also has it's own scripting language GML which can give you a good start.
  10. xycsoscyx

    Can't get antialiased picture from Direct3D

    Looking at the first picture, it does have msaa enabled, it's just subtle and the blockiness is still noticeable because of the extreme change in contrast at the edge, as well as the lower resolution being rendered (which just makes things more noticeable overall). Note the shades of red/gray along the lines when you zoom in, you wouldn't get that if msaa weren't enabled. You may need to increase the level of msaa, or look at a different method of antialiasing, if this isn't enough for your needs. For the second image, mipmaps wouldn't fix that and aren't intended to address that type of aliasing. Have you tried enabling anisotropoc filtering though? That takes into account more than just the depth and does actually help reduce the type of aliasing that you are seeing from the texture filtering.
  11. I'm taking my first steps in programming with Direct3D. I have a very basic pipeline setup, and all I want to get from it is an antialiased smooth image. But I get this: First, I can't get rid of stair effect though I have 4x MSAA enabled already in my pipeline (DXGI_SAMPLE_DESC::Count is 4 and Quality is 0): And second, I get this noisy texturing though I have mipmaps generated and LINEAR filtering set in the sampler state. Am I missing something or doing wrong? I would appreciate any advice on that. Here is my code: 1) Renderer class: 2) Vertex shader: 3) Pixel shader: Thank you in advance!
  12. I'm taking my first steps in programming with Direct3D. I have a very basic pipeline setup, and all I want to get from it is an antialiased smooth image. But I get this: First, I can't get rid of stair effect though I have 4x MSAA enabled already in my pipeline (DXGI_SAMPLE_DESC::Count is 4 and Quality is 0): And second, I get this noisy texturing though I have mipmaps generated and LINEAR filtering set in the sampler state. Am I missing something or doing wrong? I would appreciate any advice on that. Here is my code: 1) Renderer class: 2) Vertex shader: 3) Pixel shader: Thank you in advance!
  13. I'm taking my first steps in programming with Direct3D. I have a very basic pipeline setup, and all I want to get from it is an antialiased smooth image. But I get this: First, I can't get rid of stair effect though I have 4x MSAA enabled already in my pipeline (DXGI_SAMPLE_DESC::Count is 4 and Quality is 0): And second, I get this noisy texturing though I have mipmaps generated and LINEAR filtering set in the sampler state. Am I missing something or doing wrong? I would appreciate any advice on that. Here is my code: 1) Renderer class: 2) Vertex shader: 3) Pixel shader: Thank you in advance!
  14. I'm taking my first steps in programming with Direct3D. I have a very basic pipeline setup, and all I want to get from it is an antialiased smooth image. But I get this: First, I can't get rid of stair effect though I have 4x MSAA enabled already in my pipeline (DXGI_SAMPLE_DESC::Count is 4 and Quality is 0): And second, I get this noisy texturing though I have mipmaps generated and LINEAR filtering set in the sampler state. Am I missing something or doing wrong? I would appreciate any advice on that. Here is my code: 1) Renderer class: 2) Vertex shader: 3) Pixel shader: Thank you in advance!
  15. I'm taking my first steps in programming with Direct3D. I have a very basic pipeline setup, and all I want to get from it is an antialiased smooth image. But I get this: First, I can't get rid of stair effect though I have 4x MSAA enabled already in my pipeline (DXGI_SAMPLE_DESC::Count is 4 and Quality is 0): And second, I get this noisy texturing though I have mipmaps generated and LINEAR filtering set in the sampler state. Am I missing something or doing wrong? I would appreciate any advice on that. Here is my code: 1) Renderer class: 2) Vertex shader: 3) Pixel shader: Thank you in advance!
  16. Page 206 ūüėČ But in all seriousness we need to see the code, or the pages relating to the issue and what exactly your issue with it is? You've basically said, "I don't get this page of this book" where as a lot of us have not read that book.
  17. Hi guys, I've been learning to make my SDL reusable framework from the book SDL game development (image below). And now I'm trying to understand the ScrollingBackground (page 206 - creating Alien attack) but I still haven't figured out the meaning of the code. If someone finished this book please show me a more specific meaning, idea of the code (sorry for my bad english)
  18. Shaun Mitchell

    Scrolling background in SDL game development book

    Hi Hoang Minh, Can you be more specific about which part you are struggling with?
  19. What I think we're all saying is that having one state machine is what blocks extensibility. Having a collection of state machines that do the work ends up being easier as projects grow. Large behaviors are composed of many smaller state machines. The example was harvesting: Runs the Move To state machine to get to where harvesting takes place, then the harvest loop, then the move to state machine again, then the depositing loop. Even inside those sub-machines another sub-machine could be useful. When moving to a location when you are blocked, a sub-machine could trigger behavior to wait, or to replace the current action. In most systems I've worked with the state machines were able to replace themselves; the easiest example is where a target moved and the Move To action could replace itself with a new Move To action, or could replace itself with a Wait action followed by a new Move To action. Having one giant state machine can work when systems are small, but they don't grow very well.
  20. Looking at getting started on some actual AI rather than just pre-programmed drones that do simple things like only move towards the player or follow a pre-made path. I have a range of different unit that need their own behaviors (infantry, helicopters, harvesters/resource gathers, etc.), but also in very large numbers across several factions (Supreme Commander scale would be good). So far I have just made something "that works" with a state machine for all the operations (idle, move, attack, etc.). But I am not really happy with this code, since it is hard to edit and puts everything in one massive piece of code (otherwise I was finding I had to make near-duplicates of the state machine for each unit type/behaviour). e.g. void update() { switch (state) { case State::ATTACK: update_attack(); break; case State::MOVING: update_moving(); break; case State::VERTICAL_TAKEOFF: update_vertical_takeoff(); break; ... } } void on_takeoff_complete() { if (target_entity) { state = State::ATTACK; ... } else if (patrol_route) { start_patrol_route(); } else if (...) } void start_patrol_route() { state = State::MOVING; move_pos = patrol_route[0]; patrol_i = 0; ... } void set_patrol(std::vector<Vector2F> route) { patrol_route = route; if (state == State::IDLE || state == ...) start_patrol_route(); } ... I thought of adding like separate command objects to do the higher level stuff by having the command reference the unit and having its own state (e.g. patrol gets moved out to its own thing that checks when the unit gets State::IDLE and then issues the next move. Also commands for attack move, guard, etc.) but not sure that really solves all the problems or gives a good general architecture. I also want nearby units to be able to cooperate, both for performance (e.g. sharing path finding over long distances) and just generally (e.g. not all standing next to each other waiting for that AOE shell to land in the middle), which a state machine does not really seem to help me with, without a lot of extra states or making existing states more complex (e.g. when transitioning to move search around for nearby units with the same destination... maybe...). Is there a simpler architecture that allows each AI "feature" to be self contained and reusable, while still being suitable for large numbers of units? Iv'e seen a lot of talk about FSM's but not seeing how to get away from this central blob. Is an FSM suitable at all for the more complex behaviours?
  21. Zakwayda

    AI for large numbers of RTS like units

    The entity/component idea may be tangential to the problems you're trying to solve here, but just to answer this question: You're correct that you'd typically have at most one instance of a given component type per entity. What I mean by 'mix and match' is that you can combine different component types in different ways (with each entity having at most one of a particular component type). Again though, this may be somewhat orthogonal to the issues you're concerned with.
  22. SyncViews

    AI for large numbers of RTS like units

    Not sure how your suggesting the mixing here. How are several versions of the same "component" meant to play together? Which one gets to run? Do they both run, but then what order? My understanding was that for a given entity there should only be zero or one instance of some component. Kinda along the lines of some ideas I was thinking of, but then the on_*_complete currently are also needing a "view of everything" that I don't like (e.g. that if, else if, chain in the little bit of sample code I had). Will look at those articles and what nested state machines might look like. Well OK, not initially, but want to get out of this every time I do something different its almost from scratch because the state machine and rules don't match so either make a new FSM entirely or I have to refactor a whole bunch of stuff. For example adding in the "helicopters need to take off" rule effected every nearly every basic order they could be issued and a lot of the state transitions. Will look into behaviour trees as soon as I get a chance as well. They are looking suspiciously like what I was thinking with separate commands, but not had a chance to read many articles yet. Putting the state data for them alongside the unit data so the tree does not need to be replicated also seems a good idea, although not sure if in practice that would mean having to have all the possible variables there in one place...need to think about that bit. What I had could look a bit like: class VerticalTakeoffCommand : Command { public void update() { if (unit->vertical_takeoff_step()) unit->set_command(do_after); } private Command do_after; }; class PatrolCommand : Command { public void update() { if (unit->move_step()) { if (++route_i == route.size()) return unit->set_command(do_after); else unit->set_move_destination(route[route_i]); } if (target = find_target_in_range()) { unit->set_command(new AttackCommand(this, target, max_attack_range)); } } private int route_i; private List<Vector2F> route; private Command do_after; };
  23. GoliathForge

    a skeleton application

    I think the easiest way to get into directx programming is with the DirectXTK, especially if coming from XNA/Monogame because of the method naming and workflow similarities. The entire library is not required. You can break it up and only use pieces if you desire. Currently, I'm using DirectX::SpriteBatch and DirectX::SimpleMath. Here is the getting started page where a VisualStudio project template can be installed to produce your starter files automatically.
  24. Kilickaya

    a skeleton application

    Hi I'm looking for a Direct3D SKELETON application (an application as small as possible) written in C++ which makes a simple small drawing which does NOT move or rotate, so that I can get a quick start into Direct3D programming. Is there a web site that contains that kind of a skeleton application? Thanks in advance
  25. Yes then I was right about swapping the two axis. But what about the normals?
  26. I need to transform both vertex and normals between these coordinate systems: OpenSceneGraph: X right, Y into the page, Z up Unity: X right, Y up, Z into the page As far as I can tell, changing between right and left handed coordinate systems can simply be acheived by swapping two axis. For example swapping z with y should be enough. So my questions are: 1. What about the normals? Would swapping their axis be enough? 2. If I need to rotate the model after converting the normals to the correct coordinate system, do I simply apply that rotation matrix to the normal vector, as I do to the vertex point?
  27.  
  • Advertisement
  • Advertisement
  • 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!