• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

289 Neutral

About haykan648

  • Rank
  1. I'm working on a simple project with my friend which I have to implement 2D Dynamic Shadows.   I've already gone through http://www.redblobgames.com/articles/visibility/ and Sight And Light    I've read most of this too but didn't understand most parts of it.   I'm looking for an approach that is efficient, So the simplest and first thing that came to my mind was raycasting, Since I'm a kind of a beginner in DirectX there were questions :    - How can a ray detect i it hit something in the way to it's final point ?   Iterating through every object ? , It can easily be noticed by anyone that it is not efficient.   The lighting algorithms are easy, I'll appreciate it if anyone could help me with raycasting Or suggest a better way for 2D Lights.
  2. I recently updated Visual Studio and i got an error while trying to compile Direct3D11 App based on Frank Luna's Book (Introduction to 3D Game Programmig with DirectX11) which DxTrace was used in it.   Error : Severity    Code    Description    Project    File    Line Error    LNK2019    unresolved external symbol __vsnwprintf referenced in function "long __stdcall StringVPrintfWorkerW(unsigned short *,unsigned int,unsigned int *,unsigned short const *,char *)" (?StringVPrintfWorkerW@@YGJPAGIPAIPBGPAD@Z)    DirectXApp    D:\Projects\DirectX\DirectXTest\DirectXAppTest\DirectXApp\dxerr.lib(dxerrw.obj)    1 I finally found out that when i compile it using Visual Studio 2013 compiler it works!   What is the main reason that i didn't compile using Visual Studio 2015 compiler ? and how can i make it work?   This link was helpful : Linker error compiling DX10 program in Visual Studio 2015    
  3. Battleship Game

    Since I started learning( and using ) c++ I've made 2 games so far.   Here is the first one, link in this forum : Othello Game And the second one :  Battleship I've tried to make it using n-tier architecture (for practicing) I think i tried to use pointers a lot and i think i kind of use them wrong.   If I've used/done something wrong in my program,Battleship,please tell me and share it here. -The "options" and the "load game" parts don't do anything special. -My point of writing this program was to learn more about n-tier architecture so I'd be happy to learn more tips about it.
  4. I have a similar problem to this but not the exact. Assuming we have 2 header files and a main.cpp. In the first header file we have : namespace Logic { class GameManager; } In the second header: #include "first_header.h" class Logic::GameManager { public : void init(); void run(): }; And in the main.cpp i have : #include "first_header.h" int main() { Logic::GameManager gm; gm.init(); gm.run(); } I get this error until i include the second header in main.cpp : 'gm' uses undefined class 'Logic::GameManager' And when i write the first header like this i'll get an error that init() is not a member of GameManager: namespace Logic { class GameManager{}; } -Is this way of using namespaces and classes correct ? -Is there a better way to do this? Thanks.
  5. Line of Sight - Topdown Game

    Yes it  can. I will attach the source as soon as it's ready
  6. Line of Sight - Topdown Game

    Hey , As you can see in the picture i did this LOS Lighting using meshes. Thanks To : forb, Eck , DaveSF   I just did as the same as the asset Eck gave me did And i created an object and added a mesh to it that is black and this mesh includes vertices that are the 2 edges(The edges that the endpoint of the raycasts are themselves) of the object and their raycast's end in the screen (As you can see in the picture) and i lowered the mesh's height so that the obstacle itself can be seen - I guess that's all.     THANK YOU ALL.  
  7. Line of Sight - Topdown Game

    Hey Guys, Thanks to Eck for the asset, i found it pretty convincing and spent a lot of time analyzing it. BUT It works with meshes.   The Question Is:  How can i  some how convert it to light ?     As you can see in the picture attached i set ambient light near to black but i want i to be completely dark outside of light of sight and i don't think that i can do it using meshes .   - The next picture is when ambient light is black and the mesh works well. (But i can't see part of the plane that is around the character or in other word when its near the light)   (There is no light in both pictures)   -Should I use another way like FOW ? -Is there a Way to do it using meshes?   Thanks.
  8. Line of Sight - Topdown Game

     I'm looking for both.     I think have tested that and it wasn't the effect that i was looking for.   - I'm more confused about how to make such an effect (Like the picture attached to the first post) in Unity3D, I'd appreciate it if you helped me to do so,
  9. Line of Sight - Topdown Game

    Hello ,   I have Unity3D 4.5 Free installed on my PC and I want to know how to create a LOS (Line Of Sight) in a Top-Down Shooter game.   I have written the algorithm based on this page(mostly). (Casting rays and creating a triangle fan) This page was also helpful : Line Of Sight In a Tile Based World   Similar Games : Monaco , Gish   -The thing i want to know is what is the best way to implement it in Unity3D. FOW , Projectors are the only ways that i tried and didn't work(maybe i didn't know how to work with them).   Thank You
  10. How To Make An RPG

      Or at all, maybe?   Bing yields 155 million hits for "programming a role playing game," and 7 hits specifically for "programming a role playing game unity." If none of those suits you, you're probably out of luck.   i mean in general not the programming part. just tells how it works and the programming doesnt matter
  11. How To Make An RPG

    I just started creating an idea with Unity3D engine and it's RPG (mostly), but i don't know how to make one and how the upgrade tree works and how should i make it fun and other things in RPG games. i searched and there wasn't any good article or book on making an RPG game , or maybe i didn't search well. So, i was searching for a good article or book on this topic. Thanks
  12. Unity3d Simple Soil Simulation

    how will the physics work then ? should i write it by myself?  
  13. Unity3d Simple Soil Simulation

    Hello .   I just wanted to know whats the best way to make a simple soil simulation , 2D of course, something like Pocket Tanks that you can move on it .   -Is working with mesh and mesh deformation good enough ? -it's just for a mobile game i don't want to create small cubes or planes that will lead to low performance.   Thanks and please help me.
  14. Starting Using OpenGL Or DirectX?

    Thank, I've decided to start learning Direct X  . I'm now searching for resources and books,Anyone knows any resources and books for Direct X?
  • Advertisement