• Advertisement

Search the Community

Showing results for tags 'Optimization'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • News

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • GameDev Unboxed

Categories

  • Game Dev Loadout

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Topical
    • Virtual and Augmented Reality
    • News
  • Community
    • GameDev Challenges
    • For Beginners
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams

Blogs

There are no results to display.

There are no results to display.

Marker Groups

  • Members

Developers

Developers


Group


About Me


Website


Industry Role


Twitter


Github


Twitch


Steam

Found 37 results

  1. Hi, I am new to Game Development and am currently making my first game in Unity using c#. I am a second year uni student studying computer science (internet security specialization). I am new to unity and have had trouble understanding how the game engine actually functions and how I should use the engine to my advantage when programming. Currently I am making a RPG and want to implement an efficient and scalable item database. My plan is to store all items in the game in an xml database using the built in unity xml serializer. I have an abstract class item -> weapon, armour, potion, ring etc. Each of these classes have respective values (damage, cost etc.). For a relatively generic and straightforward item system: How would you organize your code? What interfaces/classes/other would you implement; why? In your experience what kinds of issues have you run into and how did you work around them? Is there any other advice with regards to rpg design in general?
  2. I need to program a game, in task manager. How do i do it?
  3. (Posted this in graphics forum too, which was perhaps the wrong forum for it) Hey, I was wondering if on mobile development (Android mainly but iOS as well if you know of it), if there is a GPUView equivalent for whole system debugging so we can figure out if the CPU/GPU are being pipelined efficiently, if there are bubbles, etc. Also slightly tangent question, but do mobile GPU's have a DMA engine exposed as a dedicated Transfer Queue for Vulkan? Thanks!
  4. I am coding the rasterization of triangles by the baricentric coordinate method. Look a lot of code and tutorials that are on the web about the optimization of this algorithm. I found a way to optimize it that I did not see it anywhere. I Only code the painting of triangles without Zbuffer and without textures. I am not comparing speeds and I am not interested in doing them, I am simply reducing the amount of instructions that are executed in the internal loop. The idea is simple, someone must have done it before but he did not publish the code or maybe in hardware it is already that way too. It should be noted that for each horizontal line drawn, of the three segments, you only need to look at one when going from negative to positive to start drawing and you only need to look at one when it goes from positive to negative when you stop drawing. I try it and it works well, now I am implementing a regular version with texture and zbuffer to realize how to add it to this optimization. Does anyone know if this optimization is already done? The code is in https://github.com/phreda4/reda4/blob/master/r4/Dev/graficos/rasterize2.txt From line 92 to 155
  5. Hi. It's been a while since I posted here, and my last posts are almost about this exact same subject. Just saying to demonstrate how annoying this is to me. Here is the problem : I'm trying to make a decent raycaster in C#. The main issue is that for this to happen, I need pixel by pixel drawing. My previous raycaster used VS GDI+, and trough several tricks involving pointers and filling a bitmap byte by byte, I was able to obtain half decent results, and make an online server-client style 3d engine complete with a map builder and several really cool features. I unfortunately wasn't able to expand the project further due to poorly written code (I am an hobbyist, I study Business Administration at Uni) and the fact that my quick hack for performance was barely able to carry the bare minimum of what I needed to make a very bare bone raycaster possible. This came with very real sadness, the realization that the project I spent almost 2 years on was essentially useless, bloated and impossible to expand on. Enough background. Now, starting anew, my main concern is to find a way to gain fast pixel by pixel control over the screen. I'm using SFML and C#. My current testbench is pretty simple, I'm using a method I found on the internet written for C++. I Adapted it for C#. I'm filling a Color[,] array (each color is a pixel) and then I copy the RGB values inside a byte[] array before moving them inside the texture buffer. I then display the texture on the screen. I'm not sure what the bottleneck is, the application is faster than my previous one, but it's still too slow for my liking. Raycasters work by redrawing stuff ontop of other stuff, and I fear that adding more stuff would creep it to an halt. I'm posting what I have as a testbench right now, any help would be greatly appreciated. Keep in mind I am not a professional programmer by any mean, I am pretty uncomfortable with pointers and true 3d stuff, but I will use them if I must. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using SFML.Audio; using SFML.Graphics; using SFML.System; using SFML.Window; namespace RayCastFF { class Program { public static int TestCounter = 0; public static Color[,] ScreenBuffer = new Color[640, 360]; //an array containing the color of all the pixel, this is intended to be the main target of all manipulation and draw call public static Texture MainViewPort = new Texture(640, 360);//main screen texture unsafe static void Main(string[] args) { //MAINWINDOW SETUP RenderWindow window = new RenderWindow(new VideoMode(640, 360), "RayCaster"); while (window.IsOpen)//MAIN GAME LOOP { //CALL FOR UPDATE Update(); //DRAW window.Clear(); window.DispatchEvents(); Sprite mainviewport = new Sprite(MainViewPort); window.Draw(mainviewport);//draw the texture over the screen window.Display(); //TAKE INPUT } } static void Update() { TestCounter++; if (TestCounter > 639) { TestCounter = 0; } //RESET THE BUFFER (COULD BE REMOVED LATER I GUESS) for (int x = 0; x < 640; x++) { for (int y = 0; y < 360; y++) { ScreenBuffer[x, y] = Color.Black; } } //DO STUFF DrawLine(Color.Red, TestCounter, 200, 100); //(for this test, i simply draw a moving line) //WRITING THE BUFFER INTO THE IMAGE //THIS SHOULD ALWAYS BE THE LAST STEP OF THE UPDATE METHOD byte[] pixels = new byte[640 * 360 * 4]; //640 x 360 pixels x 4 bytes per pixel Color[] cpixels = new Color[640 * 360];//intermediary step to keep everything clear for (int x = 0; x < 640; x++) { for (int y = 0; y < 360; y++) { cpixels[x+(640*y)] = ScreenBuffer[x, y];//make an intermediary array the correct dimention and arrange the pixels in the correct position to be drawn (separate step to keep everything clean, I find this operation incredibly confusing mainly because I had no idea how the pixels are supposed to be arrenged in the first place(still kind of dont)) } } for (int i = 0; i < 640 * 360 * 4; i += 4)//fill the byte array { pixels[i + 0] = cpixels[i / 4].R; pixels[i + 1] = cpixels[i / 4].G; pixels[i + 2] = cpixels[i / 4].B; pixels[i + 3] = cpixels[i / 4].A; } MainViewPort.Update(pixels);//update the texture with the array } //[X , Y] static void DrawLine(Color color, int Wpos, int Ytop, int Ybottom)//simple draw method making a vertical line { for (int y = Ybottom; y < Ytop; y++) { ScreenBuffer[Wpos, y] = color; } } } } What I'd like to end up with is a very fast way to draw the pixels on the window by the abstraction of a single 2d array of 640x360 unit that I could easily and simply manipulate. However, while being simple, it's also somewhat slow. It's also using 30% GPU load for some reason on a 1070GTX 8GB. Again, any help would be greatly appreciated. Thanks in advance.
  6. Hello all, My question is a bit hard to describe but hopefully it will do... I just wonder what you guys think is the 'best' way of getting info about the model in your view(s).. To clearify (i hope ;-) ) If the model is updating itself every game-cycle and the (deep) nested objects all do there jobs how do you get info where only the view is interested in? So my question is not how to do it but more what do you people think is the best way to do it ? Regards, Alex
  7. How I halved apk size

    Originally posted on Medium You coded your game so hard for several months (or even years), your artist made a lot of high-quality assets, and the game is finally ready to be launched. Congratulation! You did a great job. Now take a look at the apk size and be prepared to be scared. What is the size — 60, 70 or even 80 megabytes? As it might be sounds strange to hear (in the era of 128GB smartphones) but I have some bad news — the size it too big. That’s exactly what happened to me after I’ve finished the game Totem Spirits. In this article I want to share several advises about how to reduce the size of a release apk file and yet not lose the quality. Please, note, that for development I used quite popular game development engine Libgdx, but tips below should be applicable for other frameworks as well. Moreover, my case is about rather simple 2D game with a lot of sprites (i.e. images), so it might be not that useful for large 3D products. To keep you motivated to read this article further I want to share the final result: I managed to halve the apk size — from 64MB to 32.36MB. Memory management The very first thing that needs to be done properly is a memory management. You should always have only necessary objects loaded into the memory and release resources once they are not in use. This topic requires a lot of details, so I’d rather cover it in a separate article. Next, I want to analyze the size of current apk file. As for my game I have four different types of game resources: 1. Intro — the resources for intro screen. Intro background Loaded before the game starts, disposed immediately after the loading is done. (~0.5MB) 2. In menu resources — used in menu only (location backgrounds, buttons, etc). Loaded during the intro stage and when a player exits a game level. Disposed during “in game resources” loading. (~7.5MB images + ~5.4MB music) 3. In game resources — used on game levels only (objects, game backgrounds, etc.). Loaded during a game level loading, disposed when a player exits the game level. Note, that those resources are not disposed when a player navigates between levels (~4.5MB images + ~10MB music) 4. Common — used in all three above. Loaded during the intro stage, disposed only once the game is closed. This one also includes fonts. (~1.5MB). The summed size of all resources is ~30MB, so we can conclude that the size of apk is basically the size of all its assets. The code base is only ~3MB. That’s why I want to focus on the assets in the first place (still, the code will be discussed too). Images optimization The first thing to do is to make the size of images smaller while not harming the quality. Fortunately, there are plenty services that offer exactly this. I used this one. This resulted in 18MB reduction already! Compare the two images below: Not optimized Optimized the sizes are 312KB and 76KB respectively, so the optimized image is 4 times smaller! But a human eye can’t notice the difference. Images combination You should combine the same images programmatically rather than having almost the same images (especially if they are quite big). Consider the following example: Before After God of Fire God of Water Rather than having four full-size images with different Gods but same background I have only one big background image and four smaller images of Gods that are then combined programmatically into one image. Although, the reduction is not so big (~2MB) for some cases it can make a difference. Images format I consider this as my biggest mistake so far. I had several images without transparency saved in PNG format. The JPG version of those images is 6 times more lightweight! Once I transformed all images without transparency into JPG the apk size became 5MB smaller. Music optimization At first the music quality was 256 kbps. Then I reduced it to 128 kbps and saved 5MB more. Still think that tracks can be compressed even more. Please, share in comments if you ever used 64 kbps in your games. Texture Packs This item might be a bit Libgdx-specific, although I think similar functionality should exist in other engines as well. Texture pack is a way to organize a bunch of images into one big pack. Then, in code you treat each pack as one unit, so it’s quite handy for memory management. But you should combine images wisely. As for my game, at first I had resources packed quite badly. Then, I separated all transparent and non-transparent images and gained about 5MB more. Dependencies and Optimal code base Now let’s see the other side of development process — coding. I will not dive into too many details about the code-writing here (since it deserves separate article as well). But still want to share some general rules that I believe could be applied to any project. The most important thing is to reduce the quantity of 3d party dependencies in the project. Do you really need to add Apache Commons if you use only one method from StringUtils? Or gson if you just don’t like the built-in json functionality? Well, you do not. I used Libgdx as a game development engine and quite happy with it. Quite sure that for the next game I’ll use this engine again. Oh, do I need to say that you should have the code to be written the most optimal way? :) Well, I mentioned it. Although, the most of the tips I’ve shared here can be applied at the late development stage, some of them (especially, optimization of memory management) should be designed right from the very beginning of a project. Stay tuned for more programming articles!
  8. Sorry for making a new thread about this, but I have a specific question which I couldn't find an answer to in any of the other threads I've looked at. I've been trying to get the method shown here to work several days now and I've run out of things to try. I've more or less resorted to using the barebones example shown there (with some very minor modifications as it wouldn't run otherwise), but I still can't get it to work. Either I have misunderstood something completely, or there's a mistake somewhere. My shader code looks like this: Vertex shader: #version 330 core //Vertex shader //Half the size of the near plane {tan(fovy/2.0) * aspect, tan(fovy/2.0) } uniform vec2 halfSizeNearPlane; layout (location = 0) in vec3 clipPos; //UV for the depth buffer/screen access. //(0,0) in bottom left corner (1, 1) in top right corner layout (location = 1) in vec2 texCoord; out vec3 eyeDirection; out vec2 uv; void main() { uv = texCoord; eyeDirection = vec3((2.0 * halfSizeNearPlane * texCoord) - halfSizeNearPlane , -1.0); gl_Position = vec4(clipPos.xy, 0, 1); } Fragment shader: #version 330 core //Fragment shader layout (location = 0) out vec3 fragColor; in vec3 eyeDirection; in vec2 uv; uniform mat4 persMatrix; uniform vec2 depthrange; uniform sampler2D depth; vec4 CalcEyeFromWindow(in float windowZ, in vec3 eyeDirection, in vec2 depthrange) { float ndcZ = (2.0 * windowZ - depthrange.x - depthrange.y) / (depthrange.y - depthrange.x); float eyeZ = persMatrix[3][2] / ((persMatrix[2][3] * ndcZ) - persMatrix[2][2]); return vec4(eyeDirection * eyeZ, 1); } void main() { vec4 eyeSpace = CalcEyeFromWindow(texture(depth, uv).x, eyeDirection, depthrange); fragColor = eyeSpace.rbg; } Where my camera settings are: float fov = glm::radians(60.0f); float aspect = 800.0f / 600.0f; And my uniforms equal: uniform mat4 persMatrix = glm::perspective(fov, aspect, 0.1f, 100.0f) uniform vec2 halfSizeNearPlane = glm::vec2(glm::tan(fov/2.0) * aspect, glm::tan(fov/2.0)) uniform vec2 depthrange = glm::vec2(0.0f, 1.0f) uniform sampler2D depth is a GL_DEPTH24_STENCIL8 texture which has depth values from an earlier pass (if I linearize it and set fragColor = vec3(linearizedZ), it shows up like it should, so nothing seems wrong there). I can confirm that it's wrong because it doesn't give me similar results to what saving position in the G-buffer or reconstructing using inverse matrices does. Is there something obvious I'm missing? To me the logic seems sound, and from the description on the Khronos wiki I can't see where I go wrong. Thanks!
  9. Hello everyone! Right now I am writing my own physics engine in java for LWJGL3 3D game and I would like to consult my ideas with you guys. It's not about writing the actual code, but asking if my solution is good, and/or can it be better. And I would like to make it easy to refactor to much others render engine and "game-loop engine". So lets get started! The base game architecture looks like this: The Core holds just the information about the game itself, so whenever I decided to write some new game I would just have to edit this module. The render engine holds just the information about rendering the models, however it only gets the material and mesh data from the model. The Model module holds 4 basic information about model: Models - basic Model that holds only information about ModelView, position, rotation and scale. Other types of models inherits it and add unique params (AnimatedModel adds Animation mesh data). ModelView is build of ModelPart which are build from TexturedMeshes (will be explained later). Loaders - classes to load specific model type (i.e. Assimp loader for *.obj files) and process classes - to create necessary data to render model (ie. create Mesh which holds vboID, vertices/textures/normals arrays etc). Components - every model can have some component, ie. moveable - which allows to move the object arround the world. Materials - used together with Mesh to create TexturedMesh. Material holds information about diffuse, ambient, etc colors, diffuse, normal textures. PhysicsEngine module has the core (initiation of physics world), collision detection, CollidableComponent (inherit from BaseComponent) and Shapes (i.e AABB, Sphere, Cylinder, MeshCollider). This is the part I would like to discuss with you guys (however if you have something to say about other parts - please go for it!). Core: PhysicState - initiation of physics world, update methods, holds default data (i.e. Default narrow collision shape) Collision: Broad Phase Collision Detection (BPCD) and Narrow Phase Collision Detection (NPCD) CollidableComponent - component that can be added to model to make it collidable (in future I was planning to add other components such as: WindComponent for grass model - adds reaction to wind). Only models with CollidableComponent are checked in BPCD and NPCD, the rest are ignored. CollidableComponent has also a boolean isMoveable - i.e. Rock - it is collidable, but its never, ever gonna move. so it doesn't have to be checked with other non-moveable components at BPCD and NPCD. Shapes - basic shapes and info about them (AABB - points min/max, Sphere - center, radius, etc.) More info are shown below on diagram: Right now it works like this: I create a model and add a CollidableComponent to it like this: public CollidableComponent(Model model, TypeOfShape typeOfShape, boolean isMoveable) TypeOfShape declares the basic Broad Phase Collision Shape (AABB, Sphere, Cylinder, Mesh). The Shape is created from the raw data of the model and transformed to actual data (position, rotation*, scale).If I want to I can add the Narrow Phase Collision Shape MAP - which declares the CollisionShape for each Model Part inside the ModelView. In most cases for me it's going to be MeshCollider (since the game I'm planning to create is in Low Poly Style). IDEA 1: When the CollidableComponent is created it is automatically added to BPCD map to check its collision. Of course it's just temporary, later on I would have to set limit to the map size (i.e. to 500) or split the world to smaller parts and add just the entities which are in this world's part to BPCD. So this is the part where you guys could give me some advice IDEA 2: Collision Detection update: Right now the update works like this: public void update() { narrowPhase.narrowPhaseCollisionMap.clear(); if (!broadPhaseCollisionMap.isEmpty()) { for (Model model : broadPhaseCollisionMap.keySet()) { if ((model.getComponent(CollidableComponent.class)).isMoveable()) { for (Model model2 : broadPhaseCollisionMap.keySet()) { if (!model.equals(model2)) { CollisionShape cs1 = getCollisionShape(model); CollisionShape cs2 = getCollisionShape(model2); if (checkCollision(cs1, cs2)) { narrowPhase.narrowPhaseCollisionMap.add(model); narrowPhase.narrowPhaseCollisionMap.add(model2); } } } } } } if (!narrowPhase.narrowPhaseCollisionMap.isEmpty()) { narrowPhase.update(); } } so: 1. It checks if the BPC Map is not empty, and if its not it proceed, else nothing happens. 2. It loops through all the models inside the map and check if it's isMoveable - as I said, I ignore collision detection with objects that doesn't move 3. 2nd loop throught models and check the model from 1st loop isn't the model from the 2nd loop. If they are - lets ignore it. 4. If they are 2 different models it retrieve the BPC shapes from the models and if it is the moveable model it updates its CollisionShape data (by the current the position, rotation,* scale*) 5. Check the intersection between these 2 shapes, and if it true it's added to NPC List 6. After the BPCD loops if the NPC List is not empty it runs its update The NPCD update is pretty similar to BPCD with just 2 exceptions: 1. It used the List<Models> instead of Map<Model,CollidableComponents> (from models I can retrieve the info about the CollidableComponent, so I might use the List in BPCD aswell instand of Map **) 2. It checks the collision intersection same as for BPCD but for each ModelPart of Model_1 with each ModelPart of Model_2, returns true and/or excact collision point, etc, and breaks this model-model loop check (so it doesn't check if other parts of the models collide with each other). With my calculations for 50 objects - 27 is static and 23are movable with random position (but some collides): the NP Took: 0.0ms for: 1224 collision checks and: 24 positive collisions for BPCD Took: 10. ms for: 55776 collision checks and: 576 positive collisions for NPCD Took: 11.0ms in total for BPCD and NPCD I can see a huge space to improve the Collision Detection update methods, but I can't find them, so I hope you guys can help me out Maybe not all models has to be checked in NPCD, i.e. check how far from camera they are, and after some point just ignore NP since it won't be anyhow visible? Well, that's all! Sorry for a bit long post, but I hope you at least enjoyed reading it *Actually just forgot about adding it to calculation **Just came to my head when I was writing this topic
  10. Hey everyone! Currently I am making my engine and I got one thing I am worried about. I am using text data format to store my assets (e.g. JSON objects or kinda "human-readable" formats), it requires to register every field I want to serialize and read it manually from file data: void Resource::Save(IFile* file) { file->Serialize("myField", myFieldValue); } void Resource::Load(IFile* file) { file->Deserialize("myField", &myFieldValue) .. and so on, manually, nothing else! } But I can't breathe calmly since I saw UE4 serialization/asset storage system, it uses rtti, it's MUCH easier to serialize objects and now I am unsure which method I should use: should I give all responsibility to rtti system(with lots of code hidden) or load everything I need manually just like first code example? I know I can code rtti that way so it will output "human-readable" files, but is it good thing to use?
  11. Hey devs! Want to get rid of all the bugs in your game? I co-own a video game QA company called Level_0 Studios, we perform professional QA testing for game developers. Our goal is to help you create bug free games your players will enjoy. Partnering with Level_0 allows you to focus more time towards game development while we find those pesky bugs. If you’re interested and in need of professional game testers contact us at contact@level0studios.com and check out our website at https://level0studios.com for more information.
  12. Hi all, More than a decade ago, a problem came up on this forum for computing a fast transpose of a 3x3 matrix using SSE. The most sensible implementation stores the matrix internally as a 3x4 matrix (so, one row stores 4 elements, aligned in a vector). A version, which I believe to be the fastest currently known, was presented: I am pleased to report that I have been able to come up with a version which should be faster: inline void transpose(__m128& A, __m128& B, __m128& C) { //Input rows in __m128& A, B, and C. Output in same. __m128 T0 = _mm_unpacklo_ps(A,B); __m128 T1 = _mm_unpackhi_ps(A,B); A = _mm_movelh_ps(T0,C); B = _mm_shuffle_ps( T0,C, _MM_SHUFFLE(3,1,3,2) ); C = _mm_shuffle_ps( T1,C, _MM_SHUFFLE(3,2,1,0) ); } This should be 5 instructions instead of ajas95's 8 instructions. Of course, to get that level of performance with either version, you need to inline everything, or else you spend tons of time on moving floating point arguments to/from input registers. The other thing that is crucial is that the instruction set be VEX encoded. This allows generating instructions that take three arguments, like `vunpcklps`, instead of instructions like `unpcklps` that take only two. VEX is only available in AVX and higher (usually passing e.g. `-mavx` is sufficient to get the compiler to generate VEX instructions). -G
  13. After a feeled million hours of coding in the past 16 years there have been many ways to write code in many different languages. Some seemed correct to the time they were used, some seemed to be too strict or too chaotic and I also evolved my coding style with each new line written. Now considering the results of over 5 years in professionall game development, tools and engine code as hobbyist and on small and large commercial projects up to AAA titles, there are still many ways one could write code in different languages but also in the same language on different projects in one and the same but also different companies. I mostly agree with; see some trends in C#, C++ coding guidelines that are fully worth to go for but the major difference is on the naming conventions. Because I have currently to write my own coding guidelines (not for a special project but primary as a personal convention to refer to when coding) and seek for a way I'm happy with, I did some research on different guidelines and came up with following references: When Epic Games write about Unreal This seems a bit confusing when seeking for some type like Animation or Skin (that are both different prefixed with A and F) but prevents various naming conflicts to types and variables when writing a function that accepts FSkin Skin as parameter for example. Googles c++ guidelines point into a completely different direction when they write So they heavily make use of typos, underscores and also lower case prefixes to identify different kinds of member, static, nonstatic and function names and in the same breath except there rules for various special cases. Some other examples from different projexts I was invovled to also use and do not use prefixing types or use underscores class Class { const <type> cConstant; const <type> Constant; const <type> __Constant; <type> _myClassMember; <type> _MyClassMember; <type> myClassmember; <type> mMyClassMember; <type> function(<type> parameter); <type> Function(<type> parameter); <type> Function(<type> aParameter); } class NAClass //avoid using namespaces, instead prefix anything with a 2 letter namespace like identifier { ... } Dont need to mention that Visual Studio will raise a Warning/Exception that a type is named as same as a function parameter when using a class class Container { private int size; //current size public Resize(int size) //will cause compiler telling that type matches a member type { //do resize here } } So in the end anyone does he or she thinks that it is worth to be done and so me do too. I would like to hear your opinions to why and what codings style do you prefer or are involved to in whatever way. What do you think makes a good standard especially for the most common point, Naming Convetions? Will be corious to read your opinions
  14. Hi, I am releasing my 2d game on Steam, so sent it to review and they said it has some black and white rectangles covering parts of the screen. I don't have this issue on my old pc of course (amd 6670 vga), and I tested on a laptop too (amd gpu), without any problem. The game uses Direct3d11 with c++, nothing fancy, 2 layer of tiles, and some sprites for decorations and some postprocess effects. I have no idea what to do. Released it a while ago on Itch.io, had some 20+ downloads, nobody said anything about not working - or anything at all, sadly. So anyone does have any tips, how to figure out a graphical bug that is not reproductable on your end, and you doesn't even have a screenshot?
  15. I've been starting to optimize my code in anyway possible. I saw that some cpu's actually have 256-bit SIMD, but I was wondering if there is a way to detect this and fallback to the 128-bit on an unsupported cpu, or how else to deal with this.
  16. Hi guys, I'm writing my math library and implemented some matrix inverse function I would like to share. The SIMD version I got is more than twice as fast as non-SIMD version (which is what Unreal is using). It is also faster than some other math libraries like Eigen or DirectX Math. (result from my test, the first 3 columns are my methods) If you are interested in either theory or implementation, I put together my math derivation and source code in this post: https://lxjk.github.io/2017/09/03/Fast-4x4-Matrix-Inverse-with-SSE-SIMD-Explained.html I would appreciate any feedback
  17. When Apple announced a redesign for its decade old App Store just a few months ago, app makers for the platform all over the world felt expectant and apprehensive about the kind of impact it's going to have to their apps. Apps with a star-studded presence in App Store were most apprehensive, quite naturally. For a vast majority of mobile app development companies, it was rather a good one as it could make their app rating and positioning better if not worse. In all considerations, such a big update received a lot of buzzfrom the developer community. Apart from the general awe, apprehension and expectations, what does an update of such nature mean for the apps and their prospects? That is precisely what we would like to explain here. Finding apps would be easier than ever If you take a deeper look at how the apps generate revenue and get discovered, you are bound to recognise that apps that deserve most buzz for their long-term usefulness often remain undiscovered while apps that become popular for shorter span get the most limelight. Many users simply cannot know of certain useful apps just because they remain unknown and undiscovered. The latest update of the App Store will help us deal with this issue of discoverability. From now on the editorial team of the Apple will choose apps for featured list and various chosen categories as per the quality of the app. With the new focus on quality, the App Store now through a card based system of a display will showcase best apps of each category. The various featured cards that will help to showcase best apps include Sneak Peak, Apple of the Day, Major Update, Now Trending, etc. Obviously, this new system will make finding apps easier than ever before. Optimised product page One of the best things with the new update is the optimised product page which will allow offering more detailed information about the apps. Having a good preview of the app is always impressive and boosting for users to download an app. The new App Store update will have value-added previews, localization details of the app, and new text fields. The app previews in the new App Store only got better and detailed with an array of attributes. The product page also allows showcasing in-app purchases, and users can make purchases way before downloading the app. Far better search function Another impressive way new App Store can add value to the user experience and app discoverability is the new and better search function. Users can find apps and related contents about the apps more quickly with enhanced search. Search results now will consist of detailed layers of information including in-app purchases, app developers, ratings, a collection of apps from the same publisher, categories, editorial remarks and stories, tips, etc. A search function allowing users having so many information about an app right from the App Store will obviously render positive impacts on download. Editors have a lot to say and for the better If you look at the new and updated App Store, you are bound to recognise that instead of depending on so-called machine algorithms, Apple this time is bent on improving quality through its editorial team. App Store this time is all set to deliver an editorial experience to the users just for the sake of making the user experience better. Based on the quality of the apps in each category Apple introduced a card based selection system to feature quality apps across categories. From introducing users it's the regularly updated contents through selection like Meet the Developer and Behind the Scenes or What’s on My iPhone to more need focused contents through selections like Pro Tip, Life Hack, The Basics, the curated and edited contents of the new App Store will help us access apps better as per preference and needs. Ratings revamped for the better The new App Store helped apps coming with their app updates without needing to be concerned about messing with the app rating. Unlike earlier times when ratings were meant separately for each different update, app ratings are now considered with all subsequent updates together. This will help developers coming with a freshly updated app to come out clean and get a rating based on the latest update. This will obviously help developers to come with more frequent updates as this is not likely to bring down the rating of an app. The focus is on user experience and nothing else The focus of the new App Store primarily rests on user experience. Apple is head bent to help users find apps they need while allowing quality app producers more exposure to the users their apps are meant for. Apple has realised that the App Store has come of age and is a densely crowded place with a multitude of apps. To give more exposure to quality apps for specific user contexts and needs, Apple had to devise a redesign to clear the clutter with a consistent focus on quality. For mobile app developers, the new App Store unleashed a bounty of never before opportunity to reach their target audience more easily and garner more traction and downloads from the users. In the long run, the new App Store will only push the qualitative focus and make a better place for the users as well as developers of the iOS platform.
  18. In DirectX 11 we have a 24 bit integer depth + 8bit stencil format for depth-stencil resources ( DXGI_FORMAT_D24_UNORM_S8_UINT ). However, in an AMD GPU documentation for consoles I have seen they mentioned, that internally this format is implemented as a 64 bit resource with 32 bits for depth (but just truncated for 24 bits) and 32 bits for stencil (truncated to 8 bits). AMD recommends using a 32 bit floating point depth buffer instead with 8 bit stencil which is this format: DXGI_FORMAT_D32_FLOAT_S8X24_UINT. Does anyone know why this is? What is the usual way of doing this, just follow the recommendation and use a 64 bit depthstencil? Are there performance considerations or is it just recommended to not waste memory? What about Nvidia and Intel, is using a 24 bit depthbuffer relevant on their hardware? Cheers!
  19. Multipacker is an Unreal Engine 4 Plugin editor for manipulate AtlasTextures & Channels(and experimental various Masks inside the same Channel) inside Unreal Engine. Its greatlly helpfull for Mobile Projects, allowing a great save of texture memory. The plugin is intended to be simple and the same time powerfull. The Plugin is on Gumroad now: And have a CodeOffer discount 7.50: initialfeedback https://gumroad.com/l/cYyEo Will be updated ASAP adding new features. More Info: https://drive.google.com/drive/folders/0B63pISMLaAAgcHc2Y1BBcXV1c0k?usp=sharing Daily information of the progress on my Twitter https://twitter.com/turbocheke Whats done now: Version 0.2: -Get from a TextureAtlas a number of opacity Masks: -Set 1 Opacity Mask on a Channel RGB/RGBA. -Set 3 Opacity Masks on a Channel RGB/RGBA (allowing 9 opacity Masks on RGB, and 12 on RGBA). -One or more Texture Inputs -Input by Specific Channel (RGB, Red, Green, Blue, Alpha, RGBA) What will be on future releases: 0.25: -Save TextureAtlas 0.3: -Save a Texture Database for a faster icon management -Blueprint functions to manipulate the texture with the Database -Base Blueprint to generate buttons icons(press, normal); and a differrent types of procedural ussage of the icons. 0.4: -SDF from texture mask -Can save SDF on Atlas and Channels RGBA 0.5: -Hot reload Textures based on the AutoImport functionality of the Unreal Engine Editor.
  20. For example I have 6000 entities on a 2D map and I want to get about 180 which are on my player's screen. When my player is moving new entities may appear on the map, at the same time some entities or enemies die so they disappear. I used to clear the entire spatial hash and insert everything again a few times a second. But I am thinking maybe it is better to only update those entities that change on the map, the number of changes may be huge though, but still, compared to the number of entities on the map it is still small. I am just not sure if this is worthy or not.
  21. Hi I have finished my multiplayer game interpolation code. It works fine. But I am looking for ways to optimize it and what could be done to improve performance. As for now I have too many temporary variables and objects inside the interpolation function which is running at 60 times per second on client side. I've read some articles that creating those temp variables and objects too many times may slow my game. To make things simple, I create a object literal like this in the class that defines the interpolation function { timestamp:0, allStates: {}, allOtherStuff: {} } In each interpolation I will clear the object, which means I am just creating a new empty object. Then in the interpolation function I use a for loop to push the interpolated value and other unchanged properties from previous state into object.allStates and object.allOtherStuff. Although this works perfectly but the interpolation function looks bloated. Is there anything I can do to improve this?
  22. I'm a college game design major, but I have also picked up on some basic programming. I've done some stuff in Javascript, AS3, Visual Basic, Stencyl, and I'm now moving into using C# in Unity. Just as a general programming question, what are some tricks/techniques that any programmer can do, regardless of coding language, to make sure that their game runs as smoothly as it possibly can, in terms of frame rate?
  23. Hello everyone! Im using mvc framework for wrapper. So i have UIController, UIView for this problem. The object of type UIView is display object and works as container(like in ActionScript). So it holds some static buttons wich control sound,fullscreen and etc. and another dynamic controls wich control the state and current rules of the game. When the game is in different states the buttons can be active or inactive for pressing, can be with different texts over them, wich can cause different functionallity to be performed in the controller. So i have around 10-13 states of the game in wich the ui buttons are in different state so: Control state of the buttons in the controller. It is not ok cuz the controller is more than 300 rows and its ugly for reading and understanding. It shouldnt be. To create custom object in the controller and to pass to it the ui buttons and with some function called changeState to set the appropriate appearance to the buttons. How to structure and name that custom object to be enough descriptive. Or is there some well known pattern ? Or do u have better idea ?
  24. Didn't do much today mainly messed with the player hub and Optimized the game code to where I can hold so far 60 AIs at once! I will be working on the Ai's code more tomorrow and will show a video seeing how much AI's I can fit in one battlefield! Also for those of yall who are interested in keeping up-to-date more consistently I have a new twitter account follow me here: https://twitter.com/ACTNS_Ent
  25. Hi, probably a very stupid question but anyway: My lecturer told me that this "++i" is faster than "i++" when incrementing a for loop. Can anybody argue this point? And if it's true, could you possibly explain why it's faster?  Cheers
  • Advertisement