Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

440 Neutral

About arbitus

  • Rank
  1. This cannot be your problem, as com is the single most common package prefix in existance, next to possibly org. Almost every java library package is prefixed with com. This is because a major Java convention is to begin all of your package names with your domain name, which typically takes the form of [CompanyName].com. Since package naming is intended to go from least specific to most specific, the .com is prepended, so you end up with com.[CompanyName].[Module].[Module/Class] Are you importing using star(*)? Something like import com.*? If so, try just importing the class names that you are using in the file, and see if you are still having problems.
  2. arbitus

    Differences between C# and Java

    I don't believe that is true, as I believe both Ubuntu and Fedora are distributed with Mono. I really have not bothered checking other distros for this though. Edit: It looks like GNOME requires Mono, as some of its components use it, especially Tomboy. So any distro that uses GNOME is going to require Mono by default.
  3. All I see are more unsubstantiated claims and a decade of work with no released product other than promotional video. Sorry if I don't find that convincing.
  4. arbitus

    [HLSL] mul(WorldViewProj, position)?

    Unfortunately, this answer doesn't tell the whole story, and by itself is not correct. While it is true that this will fix his particular issue, it will only cloud the issue should he use a different library for math, different library for loading shader parameters, or any other number of variables. It is best to understand why the matrix operations produce the results that they do, and how to preserve this understanding across the application -> shader program border.
  5. arbitus

    [HLSL] mul(WorldViewProj, position)?

    This is a combination of several factors related to linear algebra, and matrix multiplication in general. Hopefully I will be able to explain. In linear algebra, vectors and matrices are multiplied using the standard matrix multiplication algorithm. Thus there are a few rules concerning the order of operations and "shape" of the matrices involved. Mathematicians usually treat vectors as matrices containing a single column of elements, with a translation multiplication looking something like this: [ 0, 0, 0, tx] [ x] [ 0, 0, 0, ty] *[ y] [ 0, 0, 0, tz] [ z] [ 0, 0, 0, 1] [ 1] First note that matrix multiplication produces a result of a specific row/column configuration according to this simple rule: AxB * BxC = AxC. In other words, a matrix of size A rows and B columns multiplied by a matrix of B rows and C columns will produce a matrix of A rows and C columns. Also, in order to be properly multiplied, B must be equal for both. In this case, we have 4x4 * 4x1, which produces a 4x1, or another column vector. If we changed the order of multiplication, it would be 4x1 * 4x4, which would be illegal. However, computer scientists often treat vectors as a matrix with a single row. There are several reasons for this, but often because a single row represents a single linear chunk of memory, or a single dimensional array, since arrays are typically addressed as array[row][column]. In order to avoid using 2 dimensional arrays in code, people simple use "row vectors" instead. Thus, in order to achieve the desired result using matrix multiplication, we swap the order to be 1x4 * 4x4 = 1x4, or vector * matrix: [ x, y, z, 1] * [ 0, 0, 0, 0] [ 0, 0, 0, 0] [ 0, 0, 0, 0] [ x, y, z, 1] Notice how the x, y, z, elements of the translation matrix had to be moved in order to preserve the proper result for multiplication (in this case, it is transposed). When using column vectors, the typical transform order of operations are P* V * W * v, because the column vector must come last to produce the proper result. Remember, matrix multiplications are associated, not commutative, so in order to achieve the appropriate result of vector transformed by world, transformed into view space, transformed into homogenous screen space, we must multiply in that order. This gives us (using associativity) P * (V * (W * v)), thus working from inner parens to outer parens, world transformation first, view next, projection next. If we use row vectors, then the multiplication is as follows: v * W * V * P. Using associativity, we realize it is simply the same order of operations: ((v * W) * V) * P. Or world first, then view, then projection. Both forms of multiplication are equally valid, and the DX library chooses to use the latter because it matches memory layout patterns, and it allows you to read your transformation order from left to right. HLSL supports BOTH orders of operations. The "*" operator performs a simple element by element scaling, it does not perform matrix multiplication. That is performed using the "mul()" intrinsic operation. If you pass a 4 element vector as the first parameter to the mul() intrinsic function, it assumes you wish to treat it as a "row vector." Thus, you must supply matrices that have been multiplied in the proper order, and supplied using the proper row/column format. This is the default behavior when passing in matrices from the DX libraries using the DX effect parameters. If you supply the 4 element vector as the second parameter to the mul() intrinsic, it treats it as a column vector, and you must provide properly formed and multiplied matrices for column vectors. I hope some of this made sense, otherwise it should have given you enough keywords to google a better explanation.
  6. arbitus

    [C#] Game Loop That site contains tons of examples using XNA. But off the top of my head, a blank XNA solution has two projects, one for your game and one for the your content. You put your art assets, sounds, and other assets in your content project so that they can be "compiled" into formats used by XNA and loaded with no effort on your end. Your game will have a class deriving from Game that has stub implementations of methods for loading your resources, performing your game logic updates, and for drawing. It is a pretty straight forward template, and your best bet is to look at some examples and get a feel for it.
  7. arbitus

    [C#] Game Loop

    XNA gives you a simple framework to start working with immediately. The game loop is already written for you, all you have to focus on is writing code that makes your game work. I don't think these tedious details are necessary for you to learn the language, and in fact will hinder your understanding as you fight to make your game loop work. SlimDX also comes with a simple sample framework that you can use if you just want to take their game loop logic. They have lots of samples that will show you how. With that said, Application.DoEvents() causes garbage and is ill suited for this task, also your game loop should occur on Application.Idle, not in the Window.Loaded event (unless you were spawning off a separate thread to run your game logic). If you don't want to use an existing framework, then your only real option is the Tom Miller blog option that has been linked several times. The only time I have had to deviate from this method is when using WPF, since it works a bit differently than Forms. And as I said before, you really need to focus on getting the proper implementation of just your game loop working, without any logic for frame throttling. Right now, because both your loop and your logic are suspect, we need to start from square one in order to properly see you through this. No amount of frame logic is going to fix a buggy and inefficient basic loop.
  8. arbitus

    [C#] Game Loop This is pretty much the default standard for game loops in .NET, and is the result of a series of blog posts exploring the topic thoroughly. It is also the inspiration behind the code linked in the SlimDX tutorial. Once you have this game loop working without any frame limiting logic, then you should look at the other links provided that allow you to fix your timestep.
  9. arbitus

    [C#] Game Loop

    The link provided gives you the information required to build your own game loop in .NET and does not require SlimDX libraries at all. P/Invoke is the method used by .NET to make calls into native C libraries. Basically, the example just emulates the basic C/C++ message pump.
  10. As I said, I would not force my preference because not everyone uses the same language or tools. Since my background is C++/C#/Java, whitespace is decorative, and you can end up with some fun results with mixed tabs and spaces. I just think the tools that allow you to standardize on this help a team maintain consistency, if they so desire.
  11. Both Emacs and Vim, as far as I can remember, have this capability, as do most of the bare bones open source editors including Notepad++. It is seriously a basic feature missing only from things like MS Notepad, which is fine for simple and quick editing, but I must question the sanity of anyone who uses it as a serious development platform. On the tabs vs. spaces debate, the *only* reason I prefer tabs is because I work with several people who like different indents. I keep my tab width at 2 or 3, one of my co-workers likes 5, and a guy we used to work with likes 8.[/quote] I can accept this argument, and only reply with the idea I prefer consistency that comes with preventing the mixing of tabs and spaces that almost invariably occurs when tabs are allowed. But I am not one for imposing personal preference on team members.
  12. I am not even sure I understand the tab vs. space debate, given that any text editor worth coding in allows you to set tabs as spaces, and then you get the benefits of both and none of the drawbacks. Also, why not take 15 minutes to set up formatting rules for a code formatter plugin for your favorite editor so that if you screw up your formatting, you can correct the entire document with a few key strokes? This really seems like an issue that was already resolved with a solution that would work for everyone.
  13. To me it seems that people are prematurely declaring victory for 'HTML 5.' But as you pointed out, HTML 5 is not a perfect replacement for browser plugins like Flash. In fact, it really isn't even a good one (look at the myriad APIs and features that have been cut or removed from consideration and are now individually championed by those wanting to impose their own implementation). But if you look at the moves by Adobe and Microsoft, you see a bit of a different story. Both are retaining and renewing their efforts on platform level runtimes instead of browser based plugins (Metro and AIR). It seems that both companies believe (along with Apple) that Apps are the future of web-delivered content, more specifically web-delivered platform Apps, rather than browser based Apps. It only seems natural, as there was no reason the runtimes needed to remain dependent on browser integration anymore.
  14. arbitus

    OpenGL Issue

    No problem! The good/bad thing about OpenGL is that when you start looking online for tutorials and help, you find a lot of old material thanks to the massive popularity of NeHe's legacy tutorials (I am willing to bet those are the ones you have been looking at). Since they seemed to be rehosted at GameDev, it might be worth it to maybe go back and add a legacy disclaimer to the tut pages?
  15. arbitus

    OpenGL Issue

    glBegin/End and the matrix stack/fixed function pipeline were removed after v2.1. We are currently on version 4.2.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!