All Activity

This stream auto-updates     

  1. Past hour
  2. Hello! I would greatly appreciate any feedback on the art/design of these characters I've drawn for a 2D Platformer. I have included the background and a few other assets mostly to provide context for the game the characters will appear in, but feel free to comment on the other aspects as well as the characters themselves. Try to take this image as if it were a snip from the final game, and not just something in production. Feel free to completely rip into this art. Make me cry if you have to. I'm not afraid of people pointing out flaws and problems. (I may reply with comments about my intents and efforts, but I still do honestly consider what is said.)
  3. More Template questions

    Already gave up, never though for a second this was better than using a Function object in any way, just exploring! Also thanks for all the explanations @jpetrie, really nice to see that template<auto value> coming! I bet eventually it will work with floats too
  4. Today
  5. Because I'm imprecise when I talk most of the time There's not too much difference between them. You're right though. Shader code is SIMD if your thread-group size matches the hardware vector instruction width. If your thread-group size is bigger then it's SIMT as the GPU is juggling multiple thread-groups at the same time (something akin to "hyperthreading"). i.e. the instruction set is SIMD, but the shader code environment built on top of that is SIMT.
  6. Play Audio Script - Volume adjusting

    You should look at Unity's manual. Check out AudioSource: On Unity's site they have a tutorials section for Audio: I'm not 100% sure about fading as I don't use Unity, but check out this script for smooth audio transitions: This should help solve your problem.
  7. Image Processing Server

    Are all of the cameras and processing cards in the same local network (such as in a car or in a closet) and do you control all the traffic on the systems? If you control all the traffic, then TCP and TCP-based protocols (such as HTTP) could work fine, because packet loss will be very rare, and your "real time" requirements won't be impacted. If the system requires some kind of shared link -- internet uplink, shared switch with other application data, office LAN, or what have you -- then there is some risk that TCP-based protocols will end up sometimes "hiccup-ing" because of packet loss and re-send intervals. If you'd rather just have the next frame of data, than wait for the previous frame, when packet loss happens, then you need to use some protocol on top of UDP. When going over UDP, there are also encodings that allow you to send a few more packets per frame, but recover from some number of lost packets. (Look into self-correcting codes, self-healing protocols, and so forth.) The rest of your problem isn't really possible to given good advice about unless we have a lot more information about your specific system hardware and requirements.
  8. So just to make things clear, there's two ways to do matrix math on paper - putting the basis vectors in the rows, treating vectors as rows, and doing left-to-right multiplication: \(\begin{bmatrix} Vx & Vy & Vz & 1 \end{bmatrix} \cdot \begin{bmatrix} Xx & Xy & Xz & 0\\ Yx & Yy & Yz & 0\\ Zx & Zy & Zz & 0\\ Px & Py & Pz & 1 \end{bmatrix}\) Or putting basis vectors in the columns, treating the vectors as columns, and doing right-to-left multiplication: \(\begin{bmatrix} Xx & Yx & Zx & Px\\ Xy & Yy & Zy & Py\\ Yz & Yz & Zz & Pz\\ 0 & 0 & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} Vx \\ Vy \\ Vz \\ 1 \end{bmatrix} \) Then a completely separate issue is how you decide to store 2D arrays in linear memory. Row-major: \(\begin{bmatrix} 0&1&2&3\\ 4&5&6&7\\ 8&9&10&11\\ 12&13&14&15 \end{bmatrix}\) Or column-major: \(\begin{bmatrix} 0&4&8&12\\ 1&5&9&13\\ 2&6&10&14\\ 3&7&11&15 \end{bmatrix}\) That results in four different conventions for doing matrix math in a computer (row-major/column-major array indexing, and row-vector/column-vector math). GLM uses column-vector math and column-major array indexing. In the HLSL code that you posted, your math is written assuming row-vector math (left to right multiplication ordering), which is the opposite convention to what GLM uses. Your HLSL code also expects column-major array ordered data. If, on the CPU side before the shader runs, you rearrange your data from column-major to row-major array ordering, then HLSL is going to accidentally interpret your data wrong -- it will read rows as columns and columns as rows... which has the same effect as doing a mathematical transpose operation, which cancels out the fact that you're using the opposite mathematical conventions. i.e. your mathematical conventions in the vertex shader are the opposite of what GLM expects, but by also using the opposite array storage conventions, these cancel each other out and two wrongs make a right, so it works. You should be able to get rid of all your transposing and just rewrite the VS to use right-to-left multiplication order, e.g. position = mul(worldMatrix, position);
  9. Database Structure for MMO's

    It's great that you point out the limit on number of columns of many databases (typically 255, but check your specific database!) I don't think SQL people will necessary beat anyone up for having lots of columns. After all, for a customer record, we don't create separate property tables for "name" and "email address" and "mailing address line 1." If you think this table is fine: CREATE TABLE customer( customer_id NOT NULL INTEGER, name VARCHAR(255), email VARCHAR(255), address1 VARCHAR(255), address2 VARCHAR(255), mailing_code VARCHAR(255), mailing_city VARCHAR(255), mailing_country VARCHAR(255), phone VARCHAR(255), PRIMARY KEY(customer_id)); Then why is this table bad? CREATE TABLE character( player_id NOT NULL INTEGER, character_id NOT NULL INTEGER, strength INTEGER, dexterity INTEGER, mana INTEGER, swords INTEGER, polearms INTEGER, shields INTEGER, dodge INTEGER, swimming INTEGER, PRIMARY KEY(player_id, character_id)); If you specifically use MySQL/InnoDB, you can even make your tables allow adding more columns without having to update table stores, by pre-creating 255 columns as nullable, named "future_01," "future_02" and so on. Nullable columns end up only taking a bit in the record when they don't have a value, and you wouldn't be referencing them. Then, when you introduce a new skill, ALTER TABLE RENAME some future_ column to the skill you need. That's a very fast data dictionary update! I also don't understand why serializing out of a single row would be any more or less work than serializing out of a self-join table or out of a BLOB/TEXT field. You still have to look up the string "strength" to some integer variable somewhere, and you very likely want to write that as some kind of IDL that generates code from schema, rather than manually doing it, no matter which of the options you choose. For most smaller games, the one-row-per-character option is actually surprisingly usable, and surprisingly easy to work with. You only need to bring out the bigger guns if your design and implementation actually exceed what you can do with that initial approach.
  10. Current Positions: 3D hard surface modeler - You will have the opportunity to work off of our concept art to create and texture spaceship models to be used in the game. 2D Artist- A 2D concept artist to help with character, vehicle, and environmental design. Final Equinox: The Arrival is a turn based space combat sci-fi role playing game with a unique combat system. The main character is a newly appointed star ship admiral whose fleet encounters a new enemy in deep space. The game takes place in a complex world filled with multiple different races, in the midst of political upheaval. Rules and feel of the game hark back to the days of old school role-playing games,where combat is difficult and the game forces players into morally compromising situations. Our website can be found here Experience in Unreal Engine is appreciated, but not required. Looking for someone who is hard working, passionate, and has a genuine enthusiasm and passion for game development, as well as role playing games. This project is a revenue share project. Requirements: Inventive and innovative personality Works well in a collaborative environment. Understanding of digital art ability to help us bring our world to life Pluses: Interest in Computer Role Playing Games Avid gamer Interest in Science Fiction Ability to help in multiple areas send portfolio to
  11. JavaScript is routinely compiled these days, with various levels of optimization triggered by access frequency and invocation history. This has been a big part of the performance improvements of Google's V8 and Apple's Nitro, especially on mobile. Your argument is poor, and takes a single socio-political position as justification to demean and dismiss the entirety of someone's technological contribution. Don't do that; that's zealotry, too.
  12. DX11 Constant buffer and names?

    Normally we explicitly define the register slots. So for const buffers you would do: cbuffer MyBuffer0 : register(b0) { // Declarations.. }; cbuffer MyBuffer1 : register(b1) { // Declarations.. }; cbuffer MyBuffer2 : register(b2) { // Declarations.. }; If you do not explicitly tell the register slots, the compiler will assign them for you and you have to retrieve them via HLSL reflection (which is cumbersome and error prone). When you call VSSetConstantBuffers( 0, ... ) the 0 will correspond to MyBuffer0, and VSSetConstantBuffers( 1, .. ) will correspond to MyBuffer1, etc. In the case of your buffer: cbuffer MatrixBuffer { matrix worldMatrix; matrix viewMatrix; matrix projectionMatrix; }; If the buffer you bind via VSSetConstantBuffers is less than the 192 bytes required for this structure (4x4 x 4 bytes per float x 3 matrices) the debug layer will complain, but you are guaranteed that reading const buffers out of bounds will return 0.
  13. DX11 Constant buffer and names?

    You'll notice on the VS/GS/PS SetConstantBuffers function there is a start slot argument, and an input array of constant buffer pointers. When a shader is compiled it assigns a constant buffer slot to each of the cbuffers in the shader. The example shader you posted makes it easy because there is only one constant buffer, which means that it's assigned to slot/register 0. There are 16 constant buffer registers but you shouldn't need that many. I personally do not trust automatic register assignment at all! I believe it assigns them from top-to-bottom, but if you are paranoid like me you can set the constant buffer slot like so: cbuffer MatrixBuffer : register(b0) { matrix worldMatrix; matrix viewMatrix; matrix projectionMatrix; }; where MatrixBuffer is now assigned to constant buffer slot/register 0. Otherwise, the mapping to variables in the constant buffer itself is based on the byte data that you map into the constant buffer. I suggest that you read this article about constant buffer packing rules. You have to make sure that byte data you map in matches the appropriate data type in your shader, and that your types meet the 4-byte alignment, 16-byte boundary rules. Feel free to ask more questions about this because it can cause wacky behavior if you aren't aware of it. For instance if you have a constant buffer like this: cbuffer MatrixBuffer { float2 SomeData; float4 SomeOtherData; }; You will need to map in 8 floats of data total. Two for the opening float2, two to garbage-pad the remaining 2 floats in the 16 byte (or 4 float) boundary, and then 4 floats to map to the float4. The two floats are required for padding in order for the data to be where you expect it.
  14. More Template questions

    Yes. Templates create a family of functions, and each instantiation is basically as unique as if you wrote it out by hand. So that static is not shared between every member of that family. Every member of that family gets its own static, which is (part of) what makes that approach entirely unworkable. Functions in C++ do not have state, except what state you can encode in their signature (via type meta programming and non-type arguments). But transporting information back in time from runtime to compile-time is impossible.
  15. More Template questions

    The major problem with your approach is that you are trying to call into the entry point of this API with a runtime value ("LargerThan(30)"). You cannot transport a runtime value (the parameter 30) to a compile-time constant. The value doesn't exist at compile time. You can make LargerThan<33>() work: typedef bool (*Comparison)(int) template<int Constant> bool LargerThanImpl(std::size_t other) { return other > Constant; } template<int Constant> Comparison LargerThan() { return LargerThanImpl<Constant>; } But you cannot deduce a non-type argument from a type argument in a way that would be useful for this until C++17. After C++17, you can use the method detailed in that link, but non-type parameters can only be integers (and a few other things that are irrelevant here), which means you can't work with floats this way. Give up this static-based approach; it's not a sane solution to the problem; if you really want to accept insane solutions that involve contortions that render the solution unusable in modern, real-world practice, that's your business, but it's a huge waste of time.
  16. test walk

    stiffness is always a problem in 3d. you are right I have yet to do anything with the passing pose. right now the passing pose is generic. with no actual pose there. I havent got to it yet but I intend to hold the motion during the contact poses. at the very least the walk will be stronger that was good insight
  17. Look into morph targets, that is how it's normally done.
  18. I've gotten to part in my DirectX 11 project where I need to pass the MVP matrices to my vertex shader. And I'm a little lost when it comes to the use of the constant buffer with the vertex shader I understand I need to set up the constant buffer just like any other buffer: 1. Create a buffer description with the D3D11_BIND_CONSTANT_BUFFER flag 2. Map my matrix data into the constant buffer 3. Use VSSetConstantBuffers to actually use the buffer But I get lost at the VertexShader part, how does my vertex shader know to use this constant buffer when we get to the shader side of things In the example I'm following I see they have this as their vertex shader, but I don't understand how the shader knows to use the MatrixBuffer cbuffer. They just use the members directly. What if there was multiple cbuffer declarations like the Microsoft documentation says you could have? //Inside vertex shader cbuffer MatrixBuffer { matrix worldMatrix; matrix viewMatrix; matrix projectionMatrix; }; struct VertexInputType { float4 position : POSITION; float4 color : COLOR; }; struct PixelInputType { float4 position : SV_POSITION; float4 color : COLOR; }; PixelInputType ColorVertexShader(VertexInputType input) { PixelInputType output; // Change the position vector to be 4 units for proper matrix calculations. input.position.w = 1.0f; // Calculate the position of the vertex against the world, view, and projection matrices. output.position = mul(input.position, worldMatrix); output.position = mul(output.position, viewMatrix); output.position = mul(output.position, projectionMatrix); // Store the input color for the pixel shader to use. output.color = input.color; return output; }
  19. Yesterday
  20. Starting A Game Development Blog

    I think different people experience different things. I would like to give it a try at least.
  21. More Template questions

    Man, I thought this time I had it! >_> There must be a logical error. My plan was to leverage the overload resolution, so that LargerThan() would call LargerThan_helper() with 2 arguments, and when called with 2 argumens the Unpack function overload would set the static variable used for comparison to a new value. All the other time the algorithm would call the LargerThan_helper() which I had passed it trough a pointer, and since the algorithm only passes one value, the other Unpack overload would be called and testCase won't get modified. I know this is still BS because this now rely on an algorithm passing only 1 value, regardless, what is my logic error in this case? Why find_if is returning a pointer to 22 rather than 67? Can anyone see the cause? By the way don't sweat it, I am only fooling around, probably it doesn't matter if this stays an unsolved mistery, though would be interesting to know EDIT: wait... could it be that by calling it with 2 arguments I am getting a different instantiation than when called with one (I was assuming that the <typename...Args> would count as a single thing, but probably doesnt)?! If that was the case, then the TestCase = 66; would be in the other instantiation, and when the algorithm calls it with 1 value, then the static variable would probably be 0, and the first value in the vector is greater than 0 so I get that as a positive... is that the case? Seems possible, since if I set the first value of the vector to -22, now I get returned the second value... x_x Maybe I'll give up #include <iostream> #include <vector> #include <algorithm> using namespace std; //// template<typename Type> auto LargerThan(Type TestCase)-> bool(*)(Type) { //2 argument are passed in order to call the overload that sets TestCase LargerThan_helper(TestCase, TestCase); return LargerThan_helper; } template<typename... Args> bool LargerThan_helper(Args... args) { //set TestCase to the type of the first argument static decltype(Type(args...)) TestCase; //if 3 argument passed, overload resolution calls //the function that set TestCase, if 2 argument are passed then //only the value for the comparison is returned auto value = Unpack(TestCase, args...); return value > TestCase; } template<typename First,typename... Rest> First Type(First f,Rest... r) { return f; } template<typename Type> Type Unpack(Type& testCase, Type first) { return first; } template<typename Type> Type Unpack(Type& testCase, Type first, Type second) { testCase = second; return first; } int main() { vector<int> vec{ 22,11,21,35,67,102 }; auto p = find_if(vec.begin(), vec.end(), LargerThan(66));//WRONG RESULT, returns pointer to 22 if (p != vec.end()) { cout << *p << endl; } return 0; }
  22. Perhaps I'm misunderstanding. I'm using the joystick ID as the map key, obtained as the above link says, by calling SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(myController)), albeit factored out into multiple lines. Is that not correct?
  23. Dialog Writer in Need of Some Feedback

    That certainly doesn't sound like a typical story, lol. Well, I wish you luck on your endeavors, and thanks again for all the help.
  24. Dialog Writer in Need of Some Feedback

    It's a book. A paranormal romance. About a shape shifting dragon that falls in love with a guy with a pure soul. Lol. It's fun to write about gay dragons, lol.
  25. More Template questions

    I found a very useless way to have it work without a functor! Basically the first time it gets instantiated, the TestCase is set and stored inside of it. Problem is, it can be set only once when instantiated, all the future usage will use that TestCase, pretty useless x_x Can we improve on it? #include <iostream> #include <vector> #include <algorithm> using namespace std; //// template<typename Type> auto LargerThan(Type TestCase)-> bool(*)(Type) { bool(*func)(Type) = LargerThan_helper<Type>; func(TestCase); return func; } template<typename Type> bool LargerThan_helper(Type value) { static bool set = false; static Type TestCase; if (!set) { TestCase = value; set = true; } return value > TestCase; } //// int main() { vector<int> vec{ 0,11,21,35,67,102 }; auto p = find_if(vec.begin(), vec.end(), LargerThan(30)); //p points to 35 if (p != vec.end()) { cout << *p << endl; } return 0; }
  26. Dialog Writer in Need of Some Feedback

    Congrats on your contract! Is it for a book? What kind of book/film did you write? Mine's a fantasy with a split narrative bent. Gambit was also my favorite in the 90's cartoon. Cyclops was a close second, though.
  27. Dialog Writer in Need of Some Feedback

    Yeah, Gambit has always been my favorite character in the X-Men. Recently got my first publishing contract with a publisher, and I am working on a sequel to that and another one. Sadly no jobs in the video game industry just yet. Been trying to focus on films, but it's very difficult to get in to. So trying for game jobs again, lol.
  1. Load more activity