Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 24 Apr 2012
Offline Last Active Apr 24 2015 10:43 AM

#5208022 "bind slots vs. registers" concern

Posted by Xanather on 01 February 2015 - 06:05 AM

I have always found that compiling the shader with FXC.exe is a useful learning tool.  This command line tool requires you to tell it the file and the function you are compiling, along with the shader type and target model.  You can create an html output file, which gives you lots of information about the shader, its input resources, and the shader's input and output signatures.


That will tell you about the shader, but you can also programmatically access the same data through the reflection interfaces.  There is examples in my engine (linked in my signature below) about how to use the reflection interface, so feel free to take a look and borrow code as needed.


I just wanted to say thanks for mentioning this! I didn't know such a feature existed within the fxc tool. I had so many questions about the output of shaders and I just answered them all myself (was going to write a long question on gamedev.net).


Goes to show it's sometimes quicker testing things out yourself than asking.


Edit: For others who don't know what I am talking about, it's the /Fc command in fxc.exe.

#5207431 Direct3D11 without a Depth/Stencil (back)buffer

Posted by Xanather on 29 January 2015 - 08:04 AM

Thanks for the reply.


I think the default value for the DepthStencilState (even when it's initially null) is to have DepthEnable enabled https://msdn.microsoft.com/en-us/library/windows/desktop/ff476110%28v=vs.85%29.aspx, so maybe I should just create a state object for that and set it to false there too just incase.

#5082667 Learning C# and Xna for game programming

Posted by Xanather on 02 August 2013 - 10:40 PM

Be sure to take a look at MonoGame. XNA wont be updated anymore but MonoGame will continue on.

#5081706 UDP protocol to minimize latency?

Posted by Xanather on 30 July 2013 - 08:14 AM

Just want to put this out there, I am developing a client-server 2D TCP networked game, I tried connecting to my game server (hosted at my home) on my laptop though my phones WiFi hotspot (I was further out in the country at the time aswell). That version's build had liquid animation that was compressed -> It ended up running pretty well and latency was within 200ms and this is a game that is not developed for internet through the phone.


It would be pointless to use UDP if your going to just reimplement TCP. If some packets can be dropped and/or you want a custom error detection design other than the way TCP handles it then UDP would make more sense, otherwise in my opinion TCP saves time and is optimized well.

#5080453 Looking for the right framework/sdk/game engine

Posted by Xanather on 25 July 2013 - 08:18 AM

MonoGame is actually continuing on, whether XNA continues on or not. Several new features that are in MonoGame include RenderTarget3D, multiple window support, and some others. MonoGame can basically build to all the platforms you want with high code re-usability. I am using a varient of MonoGame called MonoGameSDL and it is working very well so far. MonoGameSDL uses SDL2 as a backend but still follows the XNA layout.


Not sure about MonoGameSDL's performance compared to say a native openGL/directX program though, but then you have to ask what would be better, productivity or performance?


I have been able to draw thousands of sprites per frame using MonoGame.

Edit: talking about desktop here, MonoGame does support iOS, Android and WindowsPhone8.

#5057653 Microsoft burned down my home, where now?

Posted by Xanather on 28 April 2013 - 11:39 PM

I agree, I think it would have been a great idea for Microsoft to continue with XNA and integrate it with the new Windows 8 Metro/store etc, instead they did not, who knows why?


I think the final determination of Microsoft and indie game developers will be what they do with the NextBox. Ive already left XNA and have been using MonoGame and MonoGame only (I only use XNA to compile content once in a while). The Windows DirectX platform of MonoGame will probably release soon (the current released windows version uses OpenGL), you can already use a early version of it by downloading from the MonoGame github.


The DirectX MonoGame platform uses SharpDX and Direct3D11, they have already started expanding the API further than XNA (multiple window support, RenderTarget3D class, etc...)

#5057195 Improve on Java or preapre for C++?

Posted by Xanather on 27 April 2013 - 04:34 AM

Managed languages like C#/Java have to convert MSIL/Java Bytecode (which is what C#/Java compilers create) into machine code at runtime. This can slow down the initial startup up of the application (using something like NGEN can overcome this though). Not only that but both languages use a garbage collector to pick up and delete unused objects as well - which also uses process time.


C++ does not do this and is always compiled to machine code before use. No garbage collector exists in C++. C++ is just lower-level in general compared to C#/Java and allows you to deal with smaller things for specific optimizations.


You don't have to learn both at the SAME time, if you think your going good with Java then keep using it. I'm just saying there's nothing wrong with learning both :)

#5056326 What should a games programmer know?

Posted by Xanather on 24 April 2013 - 04:30 AM

You aren't really taught how to do "specific algorithms" because all algorithms will be different based on the context. You just end up "self-learning" how to create algorithms - something that comes with just doing general programming.


I think XNA would be a good choice, it is very high level and you will also familiarize yourself more with the visual studio IDE. MonoGame is getting better, I recommend using that aswell.

#5055437 Switching from Java to C#

Posted by Xanather on 21 April 2013 - 02:34 AM

Well, you'll need to learn the base class library obviously. I don't know Java that much but from memory I remember:


- All method names have a capital as their first letter.

- New: properies
- No checked exceptions


take a look at this for feature comparison: http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java

#5053828 [SharpDX.Toolkit] How to store game assets

Posted by Xanather on 16 April 2013 - 07:40 AM

XNB's do infact speed up the loading time, think of it as being converted to a raw read-ready file that can be sent straight into memory. I don't think it will matter with what your doing with SharpDX anyway.


MonoGame is good, and they are actually breaking away from the XNA framework now and adding new things like RenderTarget3D and multiple window support. I recommend taking a look at it :)

#5053638 [SharpDX.Toolkit] How to store game assets

Posted by Xanather on 15 April 2013 - 05:47 PM

Well yeah that shouldnt be a problem, unless you dont want users to look through files that easy. Most of the time though the raw assets end up being extracted from compiled files.


I use XNA/MonoGame which uses .xnb files, which can be decompiled.

#5053474 [SharpDX.Toolkit] How to store game assets

Posted by Xanather on 15 April 2013 - 09:59 AM

I would just place the content files in a seperate folder in the Project, prefarably under the name of "Content". You then selected all the content that you place in there and choose "Copy if newer".


Everytime you compile the project the content is copied to the debug/release directory accordingly.

#5043311 C# for 2D game

Posted by Xanather on 15 March 2013 - 03:29 AM

So why choose monogame, if XNA won't be updated?

MonoGame will be (and already has) started to introduce some new features beyond XNA. MonoGame is not tied to XNA anymore since just about full 1:1 code compatibility has pretty much been reached.



Now installed monoGame, and created project, and seeing that xna is included. So it use XNA libs?

MonoGame currently still uses the Microsoft.Xna.Framework namespaces, this will probably change in the future. The main reason why its like this is so people can port their XNA games over to MonoGame with less hassle. This means MonoGame does not use the XNA libraries at all.



Tried to give my friend realeased project, but only gets error.

MonoGame does have some dependancies depending on the platform, but like I said does not require XNA to be installed.
From what I know:
The current released windows platform, which uses OpenGL for rendering, also uses OpenAL, you can google OpenAL that and tell your friend to install that (OpenAL is actually installed when you install MonoGame 3.1. There should be no other dependencies needed. Once the windows directX platform is released the only required dependency that will need to be installed is .net 4.0/4.5.



Or maybe u have to suggest other C# game dev solution?

I think MonoGame would be a good choice, you could also use XNA, no problem with that even if its not going to be updated anymore (you can swap XNA -> MonoGame code bases easily anyway).


The only problem with MonoGame at the moment is that the content pipeline is still missing (I think it will be available soon though).

#5043281 C#/XNA socket programming question

Posted by Xanather on 15 March 2013 - 01:49 AM

From past experience I don't think there is a easy way to getting actual keyboard char presses from the keyboard. Last time I successfully achieved it on XNA I had to use unmanaged code (PInvoke) etc... However, the Keyboard.GetState() is fast enough if you call it at the beginning of each tick/update since its as fast as the game is simulating.


Anyway I'm guessing your question is how to make two sprites move on the screen, 1 sprite per player? Your server will need a list to store all clients that connect, you will also need to remember the IP for each client as a way as separating up different clients (or you could just use TCP which I think would be easier for beginning networking).

Then you need to do all these required things:
- Handle disbatching of new client connections (add them to the list), which then means...

- Once a client connects you need to send data to all other currently connected clients to indicate that someone has connected (so the existing clients can add the new player to their list aswell).

- Handle the disconnections/time outs of connections, and do the same as the point above, but to remove clients from lists.

- Handle receiving messages, and then relaying the messages to all connected clients.

#5031729 Please vote to support request for DirectX tools for C#

Posted by Xanather on 13 February 2013 - 02:45 AM

I am definately voting for this. This would be awesome, since XNA is apparently being discontinued it seems like microsoft is doing nothing when working with C# and DirectX together.