Advertisement Jump to content
  • Advertisement
    1. Past hour
    2. Septopus

      Tips for game programmer portfolio

      As far as web builds in Unity go. Turn ALL your graphics and quality and texture and LIGHTING and etc. And etc. Settings all the way down. Way below where you want them to be. Turn all your compression settings up. Build it, test it, slowly bring them back to where they need to be one at a time. 190mb seems pretty big for a demo, perhaps some of your meshes are too large/detailed? Also pay close attention to your number of draw calls and instancing issues. Use the frame debugger to help sort that out. Also web builds are single threaded, so some attempts to optimise with clever coding might backfire and result in slower code. Hope it helps. You could also create a project page(here, see menu above, or elsewhere) where you can write a bit about it, post some screen shots, and make a download available. Then you can just shoot a link to whomever you like.
    3. Today
    4. I suggest making your item class a container for behaviours and then make these behaviours your unique classes. Each behaviour would have verbs (look, take, open, etc) that determine how the player interacts with it. The box would then have a "container" behaviour that lets it be opened/closed and items taken in or out of it.
    5. Maybe talking about the specifics of my program was confusing the question... I may edit the OP. What I am asking is how do you insert unique code into a gameloop that uses generic classes... like at what point do you start using unique classes and how do these get incorporated. I'm just having a hard time working out a way to put unique checks and events into scenes.
    6. Inverse bind pose matrices are come from COLLADA file, so you don't need to re-calculate them. Calculating joint matrices could be: jointMatrix[i] = jointTransformInWorldSpace[i] * skin->invBindPoses[i] * skin->bindShapeMatrix /* JMi = jointTransformInWorldSpace[i], joint transform (not inverse) in scene in world space IBMi = skin->invBindPoses[i], comes from collada file, see INV_BIND_MATRIX input in <joints> element BSM = skin->bindShapeMatrix, comes from collada file, see <bind_shape_matrix> in <skin> element */ According to your shader you are not using model matrix in your shader which is fine. If you were use MVP instead of ProjView then you would need to pre-multiply inverse node transform to joint matrix: /* if MVP is used instead of ProjView in shader or if you only have MVP in shader */ jointMatrix[i] = inverseTransformOfNodeThatMeshIsAttachedToInWorldSpace * jointTransformInWorldSpace[i] * skin->invBindPoses[i] * skin->bindShapeMatrix /* JMi = jointTransformInWorldSpace[i], joint transform (not inverse) in scene in world space IBMi = skin->invBindPoses[i], comes from collada file, see INV_BIND_MATRIX input in <joints> element BSM = skin->bindShapeMatrix, comes from collada file, see <bind_shape_matrix> in <skin> element */ but as you can see this requires extra inverse and extra multiplication... Then jointMatrix array could be used in shader as joint_transforms I guess. I may be wrong, if this is true then I can improve/fix my equations if someone who knows skeletal animation better than me
    7. Hero Fantasy Pack Vol 2 is the sequel orchestral pack expanding on the dark fantasy musical themes. Prepare for even darker and more evil songs to add to your game! As with Hero Fantasy Pack Vol 1 this pack has all its themes split into several parts for an adaptive music approach. By splitting up a theme in multiple parts you can adapt the music’s intensity and dynamics to a scenario where the player goes from a harmless situation and suddenly encounters great danger and music that enhances the intensity. What’s included in the asset:- 4 different themes for easily adapting to the correct mood of the scene.- Each song consists of perfectly cut wav files to transition between the different section of the song with a nice reverb tail to make the transitions as smooth as possible. All songs come with a few stingers/hits if need to make an abrupt ending of the song or for a percussive transition between the different parts. - All parts of each theme consists of seamless loops as well if you want to edit your own version in your audio editor (or just loop in Unity.) - 324 MB in 93 HQ 16 Bit, 44kHz wav files. Buy Hero Fantasy Pack Vol 2 YouTube and Soundcloud previews:
    8. Geonamic

      Battle Victory Quotes

      In my turn-based, RPG game, Forsaken Alchemy, I plan to have voiced character monologues and dialogues play along with some character animations after every battle, and I'd like to hear your thoughts on if wording is presented to be realistic in speech patterns, how all the characters sound in personality, if they sound similar in personality to each other, and any feedback on anything. There are in-battle criteria to trigger certain quotes more often than others, but I won't bore you with them. I just wanted to put that out in case you were curious how the below criteria matters in probability. Every quote in the solo quotes spoiler box is an instance of the character having a monologue. It's not him/her saying every single quote after one battle, so RNG will decide which of the listed solo quotes will play alone after a battle. For example, "Yes! I won!" and "That was easy!" are randomly picked per battle. The person is not saying, "Yes! I won! That was easy!" Solo quotes: When there's an empty line of space between dialogue, that means the next line is the start of a new dialogue. For the example below, after the second quote from Alvis is a different instance of dialogue that plays if RNG picks that to be played instead of the previous instance. Alvis: “I wish I knew even half as much knowledge that you know.” Victoria: “In time, you will.” Alvis: “That’s a pretty optimistic view.” Victoria: “For a scholar, you did well in that fight.” Alvis: “I’m just lucky I got out of it with everything intact.” Victoria: “You should be more confident about your keen strategies.” Group quotes:
    9. Randallflagg

      Looking for Creative Writers for Bestiary

      I do music,sound fx and write. Are position still available?
    10. This would require you expanding the functionality of your parser to perform game-logic tasks not related directly to user-input. Like deciphering what an object is and determining how to describe it to the player, but that might be beneficial to your process, and the development of the parser itself. It could also make it easier to save and load(to/from file) objects using JSON or some other simple serialization method. Again, this is mostly a shot in the dark. Hope it helps somewhat.
    11. I'm no expert in formal methodologies but I like to think about the data itself before I try to think about things as individual objects(classes). So, as I understand it(hopefully correctly) it seems you are having trouble deciding how to organize the item data that you are needing to store and access. Let me throw a dart at the board across the room: You're writing a text/phrase parser are you not? Why not include a small array/list of item attributes in string form into your Item class? You could have one for descriptive info: "type:box", "color:blue" You could have another for actionable attributes: "opens:front","button:top","explodes:30" This would then be a blue box that has a button on top and opens in the front, which explodes 30 seconds after opening... Hope it helps!
    12. Hey guys, I thought it would be helpful to list off some not super well known resources for character animations. I personally like MoCap Online. They have a ton of animation packs and are even having a site-wide 50% off sale this month if you're interested. I like that they have free demos so that you know if you want it before buying. What about you guys?
    13. Geonamic

      DORU an idea i'm brewing up just need opiniouns

      This is so lacking in detail for story that I can't really say anything except anything can happen. It could end up being great or horrible. What you've presented was an idea with what's what and the main protagonist's name without the when, how, why, and some who's. I'm not asking for the whole story, but some more details would be better to grasp this idea further. How did Doru's father get separated from Doru thanks to the slave masters and a god? What should Doru save her people from after learning that she's a demi-goddess? Why tell us there's a shocking betrayal if we have no idea about it? That just makes us expect someone to betray Doru at any moment now.
    14. Hello, everyone. Me and a current team of 4 others are working on a horror-adventure game inspired from "found-footage" and "mockumentary" indie horror films. We are in need of a programmer to help our other develop game-play aspects, create unique enemy AI, and assist in creating other systems such as game data saving. We also are looking for a 3D artist to create 2-3 of our enemy creature characters based on concept art and animators to bring said characters to life. For more information on the project, please check out our GameJolt page here: If you are interested, please send me an email or add me on Discord at anytime. Discord: DickShmiggleTM#1703 Email:
    15. It's been a while since I posted any code.. Here are some handy methods that I've been using frequently in my SlingBots game. Keep in mind, some examples use local variables where it's better to reuse variables with more scope for memory/GC reasons in practical application. If you see something that I could really improve, please let me know. Many of these are "setup" routines so I've not bothered with optimization really at all since they run once, or very infrequently. All of these are designed to work with the standard Unity orientation, with normal terrain objects or terrain meshes. RayCast Position of Ground at any point on terrain: Vector3 GroundPosAt(Vector3 position) { Vector3 result = position; //some altitude above the highest possible ground position. float checkAltitude = 2000.0f; Ray rr = new Ray(new Vector3(position.x, checkAltitude, position.z), -Vector3.up); //I use a fixed allocation ray cast as a general practice to keep GC down. //It will need to be big enough to contain all the possible hits it could catch finding your ground object.. //YMMV with these *NonAlloc methods, but they work wonderfully for me. RaycastHit[] hits = new RaycastHit[20]; if (Physics.RaycastNonAlloc(rr, hits) > 0) { foreach(RaycastHit hit in hits) { //make sure this entry isn't null if (hit.collider != null) { //check for collision with object tagged ground if (hit.collider.CompareTag("ground")) { result = hit.point; } } } } return result; } Get A Vector3 position on a Circle at a specific angle and radius: Vector3 CirclePos(Vector3 center, float radius, float angle) { Vector3 pos; pos.x = center.x + radius * Mathf.Sin(angle * Mathf.Deg2Rad); pos.y = center.y; pos.z = center.z + radius * Mathf.Cos(angle * Mathf.Deg2Rad); return pos; } Object Placement using fixed arrays for object tracking and management: This example shows one of the ways I programmatically instantiate turrets into SlingBot Boarding. public GameObject worldTurretPrefab; GameObject[] worldTurrets = new GameObject[100]; SnowBallTurret[] _worldTurrets = new SnowBallTurret[100]; void PlaceWorldTurret(GameObject parentobject, Vector3 position, int firefrequency, float firepower, float sightdistance) { for (int i = 0; i < worldTurrets.Length; i++) { if (worldTurrets[i] == null) { if (parentobject == null) { worldTurrets[i] = Instantiate(worldTurretPrefab); } else { worldTurrets[i] = Instantiate(worldTurretPrefab, parentobject.transform, false); } _worldTurrets[i] = worldTurrets[i].GetComponentInChildren<SnowBallTurret>(); _worldTurrets[i].playerAvatar = GameController.GControl.Player; _worldTurrets[i].fireFrequency = firefrequency; _worldTurrets[i].id = (i + 1).ToString(); _worldTurrets[i].turretProjectileVelocity = firepower; _worldTurrets[i].turretSightingDistance = sightdistance; worldTurrets[i].transform.localPosition = position; break; } } } I use an array for both the object and a reference to the script it holds to save time on future getcomponent lookups. This will come in handy when I want to upgrade the settings on all of the already instantiated objects due to a player increase in level/etc. I use a fixed array so I can predict(reasonably) what the upper level of memory usage will be(after testing). I iterate through the existing collection and only add a new object if there is an empty slot in the array. This allows me to ensure there will be ZERO runtime exceptions related to object instantiation. It is better for my game to end up being a little easier than it should have been than it would be for an exception to be thrown right at an exciting moment. Note: the above method could be easily modified to return a bool on success/failure if you wanted to adjust the object arrays and try again on failure. Putting this all together, here's instantiating Turrets in a circle around a specific point(on uneven terrain): void PlaceTurretsCircle(Vector3 position, int turretcount, float turretradius) { //place turrets in circle for (int i = 0; i < turretcount; i++) { //Adjust settings based on players level float levelModifier = 1.0f; if (currentGameLevel > 1) { //add 20% to modifier for each level levelModifier += (0.2f * currentGameLevel); } //Calculate angle for object around circle float angl = (360 / turretcount) * i; PlaceWorldTurret(null, GroundPosAt(CirclePos(position, turretradius, (360 / turretcount) * i)), (int)(2000.0f / levelModifier), 50.0f * levelModifier, 500.0f); } } and a bonus, Here's placing turrets on a Grid: This one is presently written to require a parent object as it places the turrets in relative position to that object. void PlaceTurretsGrid(GameObject parentobject, float xstart, float zstart, float xrowdist, float zrowdist, float yoffset, int xrowcount, int count, int firefrequency, float firepower, float sightdistance) { float xoffset = xstart; float zoffset = zstart; if (count > 100) count = 100; int xmaxcount = xrowcount - 1; int xcount = 0; for (int i = 0; i < count; i++) { //Without ground position checking PlaceWorldTurret(parentObject, new Vector3(xoffset, yoffset, zoffset), turretFireFrequency, turretFirePower, turretSightDistance); //With ground position checking(untested) //PlaceWorldTurret(parentObject, GroundPosAt(parentObject.position + new Vector3(xoffset, yoffset, zoffset)), turretFireFrequency, turretFirePower, turretSightDistance); xcount++; xoffset += xrowdist; if (xcount > xmaxcount) { xcount = 0; xoffset = xstart; zoffset += zrowdist; } } } Not a lot of rocket science going on here, but it could be a time-saver or a mental-block fixer for somebody I'm sure. Check out the game if you get a chance: Happy coding out there!!
    16. G'Day.... I have been working on a text adventure game. You can follow my progress on my Blog (link in signature at bottom of post) Anyway, I have been chugging through the, frankly, tedious work of building my word lists and stuff as well as competing the 1st step in the phraser.. which is single command recognition and execution. The problem I am running into is how do I go about implementing area specific code and conditions, in my very generic and general purpose classes. Class Structure As it is Now (Obviously I have striped this list to make my problem clearer) Level Class - Contains a variable List<Area> Level [][]. This is a 2 dimensional array creating a X/Y reference values for any given spot on the array. Player Class - Contains a variable PosX and PosY... these are modified by movement and on .getPosition() returns the value of List<Area>[][]. This is how I am acessing the correct place in my game world based on the player position. Area Class - This contains a given area. These are placed inside the List<Area>[][]. Item Class - This contains individual items sitting in the level to be interacted with. So a Level -> Area -> Items. The Problem The problem I have having is I can not work out how to go about having unique things inside these Areas and Items. Like for example a Ball can not be opened but a box can. So they need a different variable. I can not use the same class for both Box and Sphere. An area might have nothing in it, but it also may have a table that needs a ball put on it and then something is activated. What I am getting at here is that the structure is basically working using these generic classes but I am not sure how I can code exciting and interesting unique things in these areas or on these items with out fundamentally changing things, or adding a mass of variables to the cases that are only used in some cases. Say I have a Box in the scene. I want the players to see it, and then try to pick it up.. but they can't. So the examine it more closely and find that it is actually got a button on it. The press it and something happens. The questions is where are the methods to do these unique things and edit the item parameters going to be put. If I put them in the Item or Area sections I need to basically have a unique class for everyone .. maybe that is what I am supposed to do. Thing is I wrote a really handy data txt file importer for areas and files that I do not want to scrap. That only really works on these generic ideas. To get really interesting events and natural language responses there needs to be a ton of unique things going on ... but I have kinda designed everything to be very generic. Possible Solution I know that a List<type> can contain classes as long as all the classes in the list are inherited form the same base class. So I was thinking of a new class that populates a simular kind of list to Level<area>[][]. This will be something like List<gameLogic>[][]. In here I put a all the methods for the individual areas. The Key values like the other list is pulled form the player positions. So if I need a unique method I could call it from Player.GetPostions().gameLogic.SetOpen();... this then would trigger bools and change description text and stuff in the more generic objects. The problem with this is I still need a series of generic method calls. So far example area.item[9] might be a Hat... if I type GETHAT it trigges a generic get() method on the hat, that ALL items have.. but it then actually dose a unique bit of logic in the logic class for that specific room.. so item.get(prams) triggers gameLogic.get(prams).. and those prams allow me to do specific "gets" per-object.. Is that making any sense? So yeah.. I'm kinda stuck Yeah.. so I am kinda stuck here about what to do. The crux of my issue is that I have a game loop and a series of objects.. level, areas in the level and items in the area. These are all generic so the I can be easily build the level during initiation of the game with out tons of unique code making editing and changes hard. So the exact way to continue these simple loops, but access unique code is confusing me. I mean as long as everything was very simple I could get wawya with it. but as I wanted to add more complex stuff I was finding the need for additional variables and checks. Any thoughts? (sorry if I am not clear) Quick demo of you... this shows the start screen and the first room. (pressing spacebar skips the text printout to finished) So the very first time the game loops and finds you in a area it tests a variable in that area to see if you have ever been there before.. if not it prints a "cinematic".. witch is a long story focused text description, that you only see once. (it is also added to a log for reading latter). Then if you type the look command... it finds the area look description and adds it to the print buffer, then finds all the items (there are only two at the moment) and appends their descriptions and then prints out that look. All pretty cool and I ma happy with it. This is just to show something in the thread.. I seem to have noticed anything with a youtube video in it gets way more comments hahaah
    17. Daniel Ricci

      Money or passion?

      If your passion is money, then follow your passion, else follow your passion.
    18. Daniel Ricci

      MMORPG Brilliant Game Idea.

      Sounds interesting. The hard part is figuring out a base for your game. If you try to make a game that caters to everyone, you're going to run out of money and/or time before it actually ships.
    19. lougv22

      Money or passion?

      Follow your passion. It's going to get really old at some point getting up every morning, going to a job that does not excite you and does not make you happy, while at the same time second guessing yourself and secretly wishing you were making PC games. If your purpose is to make PC games and you are not fulfilling it, there will be this cognitive dissonance, or misalignment with what you are truly supposed to be doing, in you and it will keep gnawing at you and making you feel unfulfilled. Secondly, don't follow trends. Trends don't matter and they change all the time. Mobile gaming may be the trendy thing today and tomorrow it might be something else. Just follow your passion and forget the trends. The caveat to all this, of course, is that you have pay the bills and put food on the table. If you can make money following your passion, go for it. If not, get a day job doing whatever pays the bills and follow your passion nights and weekends. This resonates with me as well and it's also almost verbatim something Hideo Kojima said in an interview a few year ago. He was asked something to the effect of "What was your thinking when you were making the original Metal Gear?" and sis answer was, "I was just making the game I wanted to play." This has been one of the tenets of my game design philosophy, if you will, for years now.
    20. I am currently an indie game developer and I am looking to get a job with a game company as a game programmer. I worked for a game studio 9 years ago, but at the time I decided to get a day job as a software developer (non-game development), while focusing (as an indie developer), during my free time, on a vision for a game I've had for some time. This was then, but i've recently found myself unsatisfied with my day job and I am now thinking of going back to the game industry. The drive to make games is just too strong in me and I can no longer justify spending my days making software I am not excited about. Which leads me to my questions about a game programmer portfolio. Before i first got a job at a game studio i had built a couple of small games, this was way back though, around the year 2006. Would those be too old to showcase on a portfolio? Second question, i'd like to make the indie game i am working on available for potential recruiters to play, but I am not sure how to do that. I tried to put it up on (kind like, but not as popular), but i ran into issues with that. It's a Unity game and the Web build i created for it was about 190 MB and it ran slowly and was very choppy on my machine, at which point i kind of gave up on the idea of putting it up online. The other option is to simply send (through email or Google drive) game companies a regular Unity build and let them play it that way. The question is, should i try to go the Web build route again and if so, any tips on making it work well this time? And also, if the Web build doesn't work again, would it be acceptable to send companies i apply for a regular build?
    21. This topic is actually not that much related to game engine (assuming your engine has some sort of scenegraph, and resource management - which most engines have), you are bumping into the are of actual tools. Tools as software don't have that many resources available at all - and are extremely time consuming to build up (and extremely rewarding - at least for me) ... I do a post from time to time into my blog here regarding my hobby game engine, and most of the time I spend on the project is in tools. In Skye Cuillin(TM) 😁 editor I have managed resources for textures, models, etc. When their file is changed they are hot-loaded and replace original resource, some details are provided here (shameless self promotion): This works for resources that are directly referenced (textures are the best examples), it will also work for meshes (from engine's point of view mesh is a single geometry). Generally this action can't be undone (because resources are changed outside of the actual software)! The actual resource (like obj) is a model (not mesh) resource, which - when instantiated into scene - will create empty entity and then push in whole hierarchy from file. In case you would change geometry data for one of the meshes, your meshes in editor would be hot loaded and changed (this is because mesh data is referenced within MeshComponent on the node - they don't actually contain mesh). If you would change hierarchy itself - then that is a problem! There are few ways how to solve this: Replace EACH node hierarchy that was instantiated from this resource (this will cause issues when you F.e. moved one of the children under different parent, or added different node as child of node instantiated from resource) Replace only those node hierarchies that resemble model exactly before the load (which means you need to mark those that should be replaced - and then do so) - this is what actually Unity seems to be doing Ignoring the problem and doing nothing with old hierarchies is also a way to solve this problem, a perfectly valid one (probably better than doing the 1st solution) I currently apply 3rd solution. It is the most straight forward. I'm still considering supporting the 2nd one (if I would hold resource reference in node that was one used as topmost storage when instantiating resource into scene, along with flag whether it is dirty (not to reload) or not (to reload)), then it would work perfectly. Of course all of this applies only in editor (where actual saved scene is just saved scenegraph, and resource files are around). For compiled scene (for runtime), the scenegraph is still saved .... along with all resources compressed. I'm currently working on this part now.
    22. Brain

      MMORPG Brilliant Game Idea.

      Nah just wait long enough and some AI will develop the game for you, just be careful it doesn't imprison you inside it...
    23. Yesterday
    24. Tara Louise

      MMORPG Brilliant Game Idea.

      Feel you.
    25. I didn't have too much time today, but I managed to sculpt out some fixes to the upper and lower parts of the arms yesterday. I'm not going to make anything look "perfect" or put a lot of time in correctness considering the camera view will be a Diablo style view, and you wont really notice it. I also finished the Helm, Chainmail Chest Armor, Sword, Shield, and even added on some cloth. There will be two goblin skins as well. NOTE: Some color reflections are due to the HDRi map on reflective materials. I was going to make custom eyes, but I'm just going to keep them black as the camera view wouldn't make that much of a difference in putting details into them. Creating assets without a base mesh can be a big pain in the butt... The Goblin itself could still use a lot of work, but my entire approach to these challenges is to create the models from scratch without pre-existing bases as I would normally do in other work. I still need to make a chest, key, health pots, gold coins, GUI, environment textures, and the basic rooms. My next update will have a room concept with a fully textured room, and propped goblins. I still need to Rig and animate these meshes, and I'll do that after my next update. Thanks for reading!
    26. lol - don't u just love it :-D correct, u don't need the animator code to render cowboy at bind pose. U haven't shown how u calculate your joint_transforms array: uniform mat4 joint_transforms[MAX_JOINTS] I suspect incorrect matrices in this array. If by assumption, all matrices are correct then aJointIndices has mixed up or incorrect bones indices.
    27. BitsNPiecesMusic

      Bits & Pieces Music

      Good evening! I started a new track last night, and finished it this evening. Kind of hit me out of nowhere (not complaining!), and it'll be part of my "The Forgotten Legend" OST that I've been working on for some time now. I present to you Fields of Fool's Gold: Thanks for listening and checking it out!
    28. Facuu_28

      Rev shared: Game looking for 2D artist

      hi, I want to help, contact me to my e-mail
    29. Hi everyone Im working along side some friends of mine and we are looking for a 2D artist to work with us we are a team of 2 coders and a 3D artist if you are interested to join our project please message me and we can work something up the ultimate goal of our project its to go into kickstarter and get funding for the game basics from the game twin-stick shooter wit 2.5D for exploration of towns and cities in the world of the dead base in the mexican culture of "El dia de los muertos" ithe project name its Mictlan 2D game art sprites UI elements (inventory and Icons and menu) if anyone its interested please message me so we can chat abour the project I let you some images of the game and some assets we have done (sorry for that we are not artists) feel free to contact me
    30. Hello. I am writing a simple shadowmapping algorithm with one directional light. I understand the basics but I can't make it work. Can you look at my code snippet and tell me what am I doing wrong? Shadowmap is correct (1024x1024, one directional light looking at (0,0,0) from (0,10,0)). float3 PositionFromDepth(in float depth, in float2 pixelCoord, float aspectRatio, float4x4 invView, float4x4 invProj) { float2 cpos = (pixelCoord + 0.5f) * aspectRatio; cpos *= 2.0f; cpos -= 1.0f; cpos.y *= -1.0f; float4 positionWS = mul(float4(cpos, depth, 1.0f), invProj); positionWS /= positionWS.w; positionWS = mul(positionWS, invView); return; } float GetShadow(float3 posWS) { float4 lpos = mul(float4(posWS, 1), gLightViewProj); //re-homogenize position after interpolation /= lpos.w; //if position is not visible to the light - dont illuminate it //results in hard light frustum if (lpos.x < -1.0f || lpos.x > 1.0f || lpos.y < -1.0f || lpos.y > 1.0f || lpos.z < 0.0f || lpos.z > 1.0f) return 0.0f; //transform clip space coords to texture space coords (-1:1 to 0:1) lpos.x = lpos.x / 2.0f + 0.5f; lpos.y = -lpos.y / 2.0f + 0.5f; //sample shadow map - point sampler float shadowMapDepth = ShadowMap.Sample(Sampler, lpos.xy).r; const float bias = 0.001f; if (shadowMapDepth < lpos.z - bias) return 0.0f; return 1.0f; } float4 ps_main(PixelShaderInput pin) : SV_Target { float2 pixelCoord = pin.texcoord.xy; float depth = Depth.SampleLevel(Sampler, pixelCoord, 0).x; // Outgoing light direction (vector from world-space pixel position to the "eye"). float3 posWS = PositionFromDepth(depth, pixelCoord, gScreenDim.w, gInvView, gInvProj); float shadow = GetShadow(posWS); return float4(, 1); } The results I get are on the attached image. To me it looks like world space position extracted from depth is not really world space position but I don't know if that's the case. I'll appreciate any kind of help on this.
    31. Tyier Godette

      New Design Stuffs

      Heere yee heere yee, another project has arrived! Feel free to leave comments so we can DISCUSS :3
    32. datboi That ogl text rendering definitely can be moded for directx. The thing to bear in mind is that the 2D transform is different for dx and gl. I've noticed in yr code that yr UV is always (0, 0). In yr case it should be: 1,0 0,0 1,1 0,1 1,1 0,0 Also i have not seen yr index buffer but again in yr case it should be: 0, 1, 2, 3, 2, 1 So check those. To check if yr output is right. Things u can try: - just try to draw 1 glyph only. That 1 quad. So put a "break;" in yr for loop for now - force sx = 50; for example and sy = 100; - turn off alpha blending so when the quad gets rendered it is fully visible - turn off cull mode - make sure winding order is set for clockwise - in the pixel shader just do something like "return float4(1,1,1,1);" so u force a white colour out These tips are how u can get yr freetype glyph rendering investigated/fixed and then improved on
    33. Sorry to disappoint, that is the one I tried to follow but I haven't gotten the result I expected, now it might be that I haven't implemented the animator yet and I have to transform the inverse matrices with the model pose to get it to render correctly. But I thought It would render correctly even without the animator since I assumed the values I parse from the COLLADA file is the idle pose (pose[0]). so the code is very similar to that one. My shader code is : #version 330 core layout (location = 0) in vec3 aPos; layout (location = 1) in vec3 aNormals; layout (location = 2) in vec2 aTexture; layout (location = 3) in ivec3 aJointIndices; layout (location = 4) in vec3 aWeights; const int MAX_JOINTS = 50; const int MAX_WEIGHTS = 3; out vec3 normals; out vec2 tex_coords; uniform mat4 projection_view_matrix; uniform mat4 joint_transforms[MAX_JOINTS]; void main() { vec4 total_local_position = vec4(0.0); vec4 total_normal = vec4(0.0); for(int i = 0; i < MAX_WEIGHTS; i++) { mat4 joint_transform = joint_transforms[aJointIndices[i]]; vec4 posePosition = joint_transform * vec4(aPos, 1.0); total_local_position += posePosition * aWeights[i]; vec4 world_normal = joint_transform * vec4(aNormals,0.0); total_normal += world_normal * aWeights[i]; } gl_Position = projection_view_matrix * total_local_position; normals =; tex_coords = aTexture; } and again, I am uploading the inverse bind transform matrices for all bones to this shader. It is quite a large code base so not sure what else I can show that would be helpful. this is the code for calculating the inverse bind transform, void calculate_inverse_bind_transform(glm::mat4 parent_bind_transform) { glm::mat4 bind_transform = parent_bind_transform * bind_local_transform; inverse_bind_transform = glm::inverse(bind_transform); for(int i = 0; i < children.size(); i++) children[i].calculate_inverse_bind_transform(bind_transform); } Here is a picture of the monstrosity
    34. Still need testers! I've made a gameplay footage video if you want to check it out!
    35. Natte, r u following an online tutorial? If yes which one ? If no then try searching youtube for opengl character animation. There's one with the cowboy character wearing a hat doing a simple run in blue trousers. Uses collada. Follow that. Can't get it wrong. Otherwise, share your cpp code and vertex shader here
    36. SIr Pep

      MMORPG Brilliant Game Idea.

      On the other hand, you could learn VR Programming and make exactly what your describing with a measly 2 decades of programming and using the technology that will be available in 2029
    37. Thanks for replies, guys! Let me clarify my situation a bit: 1) My resources are modifiable - I can create a save file which uses a resource and then I can modifiy it, and I still want my save be loaded correctly (as much as possible, of course). 2) Resources can be loaded during runtime at any moment 3) Resource instances (nodes with shared graphical data) uses their own nodes (copy of nodes from model) - this gives me ability to animate nodes independently for each instance and still get benefits of instanced rendering. My very first thought was to just save some path to a resource file along with node data. Also create a section of resource references in a save file. Then on load I can load resources first, put them in separate graphs. In the moment when I'm loading a node with a path to resource I can try find node in the loaded resource by its name and restore graphical information from it (basically - meshes which I need to render). But what should I do if hierarchy of nodes in resource was changed? I've seen that Unity engine doing a good job when model's asset changes - it is somehow keeps nodes on scene in sync with nodes in resource, but preserving transforms of nodes which were modified by user. I've tried to search some papers about this, but unfortunately - no luck.
    38. frob

      MMORPG Brilliant Game Idea.

      Sounds great. I'm not aware of anyone with a billion dollars or so just lying around who wants to attempt it. What you describe is far beyond what could be done with an 8-digit budget, and quite likely beyond a 9-digit budget. You describe pieces of games combined where each piece is an 8-digit budget project. Anything that is going to do that much work at an MMO scale would be costly. Scaling that down to be a simpler online game (not MMO) that has concepts based on those comprehensive games could be far cheaper, but much less of a grand experience.
    39. I am trying to understand skeletal animation in 3D. Somehow I am getting a stretched out model when I try to render it. I am unsure what is causing this. I have parsed the local bind transform from the COLLADA file for each bone I then transpose the matrix to shift the columns to rows, then multiply each bone with its parents local bind transform (recursivly starting at the parent bone (where I use identity matrix for the parent). After that I inverse the local bind transform for each bone and I then send it to the shader. I know I haven't applied a pose to it or anything but my understanding is that if I send the list of inverse matrices up to the shader it should render successfully in the initial pose. Do I have to do anything else to each bones matrix before I can send it to the shader?
    40. Let's make some important distinctions: Are your resources loaded statically or dynamically? Are your resources modifiable? Do they move? Example: embedding a statue in world geometry. In this case, try to load it at 'map compile time' and bake it in the geometry. Pre-transform everything if needed. In line of principle this is very hard to do (if at all possible) for arbitrary shaders. Just keep it easy. OFC if you do this, at runtime you just get a big scene graph. Or perhaps save yourself the work and import as a dynamic model. Those kind of meshes are often immutable and non-moving. They can be embedded in the world geometry with ease and leverage the whole content pipeline. Your example however is somewhat more complicated as apparently you want to attach to an imported node. Example: attach rocket launcher to custom player model right hand Real bad: you don't know what model to load in advance, maybe you won't even have it but you only know the right hand is marked with a specific tag e.g. `right_hand`. I'm pretty sure fbx can export skeletal infos or other kind of annotations you can use to extract the information you need. Then you will need a dynamic system to pull out those informations and propagate them correctly. SVG for example does not have this information. Months ago I used specific syntax to identify the required points and reconstruct the information. OFC this was non-portable, non-standard and in general not recommended but you can do it. How you do it is up to you to design. I had things I dubbed 'value synchers' which would connect specific logic (even scripts) to GPU buffers. One syncher in would walk an imported mesh and extract special points to drive particle emitters, another could extract accumulated transforms. Inheritance will most likely be your friend here. Corollaries World geometry very special; it usually takes loads of geometry, covers large parts of the screen, most of the time, it is almost never fully visible. In probably needs its own scene graph to scale and a way to be partially drawn. Dynamic meshes are often instantiated multiple times, be sure to recognize the difference between a mesh and an instance of the mesh itself. An instance is usually small enough you can either draw or not draw it. In my experience, mixing dynamic stuff with static structures is recipe for disaster... but perhaps you might be fully dynamic and still be good enough for you. I would suggest against using fbx or any other content-creation oriented format for that matter. They can get really complicated real fast and you are pretty much guaranteed to be unable to support all their features, which implies you will have to keep a list of what is supported and what isn't. You always have a moment in which you know what is loaded. Be sure to know where to get that information. Most will come from 'level geometry' file. Some might come from network, you likely have been mangling this dynamic data at some point, just don't throw away the information!
    41. Use of std::shared_ptr always makes me suspect the author did not design something correctly or they're not aware of object lifetime/ownership. std::unique_ptr has a .get() function that returns a pointer that can be held and validated before use if needed. It's what I do with systems.
    42. Smart pointers are not about calling new or delete. Policies around using new and delete might have rules regarding smart pointers; the two are related but not as absolutes. It is all about object lifetimes. The flow of objects as they are created, managed through their life, and eventually destroyed is a critical process that must be understood. Smart pointers are often used badly as a bandage for not bothering to understand the object lifetimes. For most functions calls a raw pointer is appropriate because of lifetime flows. You are passing an object that will exist the entire time the function is using it. The function is expected to return immediately, and not capture or otherwise hold on to the pointer. If you must capture or persist a pointer for a time, consider how the lifetime will work. If you have guarantees that a game object will last for a full update cycle, then you might be okay to preserve a raw pointer for the duration of a full update. If something is guaranteed to last for an entire level, then keeping it around for the duration for the level is acceptable. As long as the lifetime is going to exceed the time you use it, raw pointers are just fine. Smart pointers should be passed as parameters when you are explicitly working with object lifetimes. If you accept a smart pointer, that means you are accepting partial or complete ownership over the lifetime of the object, including the possibility that you might destroy, or reseat / replace the object mid-use. If that is not your intent, the function probably should not be using smart pointers. Also, note that using containers is different from using smart pointers. You can use container objects that help manage lifetimes without wrapping them in smart pointers. If the container owns the object and manages the object's lifetime, then it is adequate.
    43. Irusan, son of Arusan

      Dyslexic font for programming

      Also, I should say that what helps dyslexics read is frequently very specific to the individual, so it's quite possible that some dyslexics will benefit from the font (personally, I find it very ugly and hard to read) and so if you are dyslexic and find it benefits you, well, all power to you.
    44. Well that explains that then Never bad to learn and yes a lot of games still work that use D3D9. Yeah, if I recall correctly it's only 0.0 and 1.0 because each letter is rendered individually in that example I gave you. I think I ended up making a texture atlas which had individual UV coordinates, sorry if I find it I will put the code up here.
    45. Irusan, son of Arusan

      Dyslexic font for programming

      If you read down to the results section, you'll see that the reported differences are not actually statistically significant. (0.10 > p > 0.05) and not very large anyway and, as the quote you highlighted says "some specific type of reading errors are decreased, but others are increased". That link is just a Master's thesis, but there's been a few papers on this and the findings are heavily neutral for the font. Here, I found a good summary that's not paywalled in this paper. It also finds that adjusting the spacing of a more normal font (e.g. Arial) produces beneficial effects that are as large as the Dyslexie font.
    46. UPTAPP

      [FREE] Stick Pong

      Stick Pong is a brand new Free Mobile Game by UPTAPP which combines the old pong style in a completely new way. Super simple learning curve, one handed gameplay, yet challenging. Please rate and give feedback, that means a lot! Download from Google Play.
    47. First I would like to say that I had a lot of fun attempting this challenge. I never participated in anything like this before. I voted for the Doom and the Dungeon Crawler choices in the challenge poll and was satisfied to see that they both came out on top. What went wrong I will start with what went wrong when I started this project, which uses the Unreal Engine. Probably the toughest thing I had to code, was the AI. It simply did not do what I wanted it to do at first and it took me several tries just to get it right. I had to turn on and look at the AI debug screen to see what was wrong. Turns out that my AI's cone of vision was completely disoriented due to a badly aligned capsule component. I simply rotated the capsule 90 degrees and the cone of vision was correct afterwards. But later on I got rid of the 45 degrees vision cone and replaced it with one with full circle so that the enemy could sense the player as if it had eyes all around its head. It was more adequate for the kind of AI that this game would require. Another problem that I encountered was that sometimes the AI would stop moving after I had made some changes on the map. It took me several hours to realize that I had to rebuild the map navigation data because the AI simply did not move otherwise. What went right This project uses Blueprints for the most part, with some C++ for the basic player movement, setup and camera orientation. I found that Blueprints are extremely easy to use and let you iterate and prototype your game much much faster than pulling up Visual Studio, write some C++ code and wait a while for the code to compile after you make some changes. This is one of the problems with UE4 in my opinion since it takes much longer to compile your C++ code, than to compile your Blueprints. Unity has the upper hand in this as the C# compiles very quickly. This is probably why Epic Games are considering creating an intermediate scripting language between Blueprints and C++. So, it was a breeze to simply code game logic using these Blueprints and it did not take me long to adopt them. I am considering nativizing them so I can basically learn how they map to C++, and also to optimize the code. If I do, I will publish the source code on GitHub. What I have learned I learned how to use UE4, in my view the most versatile and powerful engine there is to make games right now. You can do so much with it, not just games but all kinds of things from movie content to architectural design. I learned how to use Blueprints, which at first I thought they were kind of bad since the nodes take so much space and to perform common programming things like loops, branching, etc. it is not ideal. I learned how to design an AI using UE4's behavior trees and AI perceptions. It was not easy at first, but it was satisfying to finally make it work. Level design is another thing I had to improve, and this time it was a bit better than the usual basic things I have done in the past, mostly with Quake 3's level editor. Conclusion This challenge helped me learn a lot of things, and I am looking forward to see which challenges will be proposed in the future. I will go back to focus on my own engine, which uses D3D11/12, and will use what I have learned with UE4 to improve my own code.
    48. Oberon_Command

      Dyslexic font for programming

      From the paper link you linked: If we're talking about "ease" of reading (which I would assume to mean how much exertion it takes to read correctly), then comparing reading speeds doesn't seem like the whole story and may only be a proxy for the actual thing we're trying to measure. By analogy, it might take me the same amount to time to lift a 12lb weight as it does for me to lift a 20lb weight, yet one of them is clearly more difficult.
    49. Yeah I guess that is a good comparison. Just doing this mostly for the learning experience and I am actually very interested in general on how high quality/fast rendering works in general.
  • 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!