Jump to content
  • Advertisement

Leaderboard

The search index is currently processing. Leaderboard results may not be complete.

Popular Content

Showing content with the highest reputation on 05/04/19 in all areas

  1. 1 point
    Keeping up with the twitter hashtag of screen shots on Saturday!
  2. 1 point
    Definitely not the way I would simulate a car crash but I would try to decrease the streching stiffness after detecting such a crash in order to make the car more soft for a couple of seconds, then would restore the stiffness value to bring back the car to the undeformed configuration. It seems that the streching stiffness in your code is 0.005, but it could be a relaxation factor, so I don't know. Anyway your position-based solver loop would look something like this: void b3Cloth::Step(float32 h, u32 iterations) { if (h == 0.0f) { return; } // Damping float32 d = exp(-h * m_kd); // Integrate using semi-implicit Euler for (u32 i = 0; i < m_pCount; ++i) { b3Particle* p = m_ps + i; p->v += h * p->im * m_gravity; p->v *= d; p->p0 = p->p; p->p += h * p->v; } // Solve position constraints for (u32 i = 0; i < iterations; ++i) { SolveC1(); } // Estimate current velocity float32 inv_h = 1.0f / h; for (u32 i = 0; i < m_pCount; ++i) { b3Particle* p = m_ps + i; p->v = inv_h * (p->p - p->p0); } // Solve velocity constraints (e.g. friction, etc)... } void b3Cloth::SolveC1() { for (u32 i = 0; i < m_c1Count; ++i) { b3C1* c = m_c1s + i; b3Particle* p1 = m_ps + c->i1; b3Particle* p2 = m_ps + c->i2; float32 m1 = p1->im; float32 m2 = p2->im; float32 mass = m1 + m2; if (mass == 0.0f) { continue; } mass = 1.0f / mass; b3Vec3 J2 = p2->p - p1->p; float32 L = b3Length(J2); if (L > B3_EPSILON) { J2 /= L; } b3Vec3 J1 = -J2; // m_k1 is the streching stiffness in [0, 1] float32 C = L - c->L; float32 impulse = -m_k1 * mass * C; p1->p += (m1 * impulse) * J1; p2->p += (m2 * impulse) * J2; } } Hope it helps.
  3. 1 point
    Any 32 bit hash is going to have a high chance of collision, and should therefore be avoided. With as few as 9300 assets, there is already a 1% probability of a collision, assuming an ideal hash function.
  4. 1 point
    Looks like it's that time of the week again! This is your favourite weekly update blog coming to you right now! Well, I'm gonna be honest here... This week was a bit slower than usual. I tried to take the week to recharge my batteries. I did have time to add (or should I say refine) some things here and there. Let's get right to it then! Malls First, let's talk about malls. There are two new things I want to talk about... Window Items I've previously talked about how the player could break the mall's windows to get items for free. Well, now these items spawn, and like I said before the selection is dependent on the player's luck. The luckier the player is the lesser values are the items and vice versa. These can only be gained by breaking their respective window. The consequence of this is still unclear. I wanted either to spawn aggro policemen or locking the malls for the rest of the run. After discussing it with a friend he suggested that I mix both and add a mini-boss in there too. While I like the idea of mixing both consequences adding a mini-boss won't be really practical due to the limited space of the malls. Anyways the idea is still simmering on the back-burner as of yet... Decorative Props Next, I want to show you the new deco. I'm currently working on it actively, but nevertheless here's what's new. Normal malls now got some empty shelves. I want to display some common decorative props here to give the classical "mall" feel. I've also added some T-shirt racks too. Clothes Mall really got the clothes treatment. Most walls got the same rack seen in normal malls. There are also a pair of round racks and rail racks too. I'm also planning to add a shoe display among many other things. As for the Blood Mall, I didn't have the time to add props but the idea is to display weapons in a manner akin to a typical gunshop. Nothing to show off, sadly... Restroom Redesign Next up I had the time to redesign the restroom. Basically, the floor is now tiled and has proper reflection too. I also used to have a real-time reflective mirror, but due to technical bugs, I needed to remove it, sadly... Perhaps if I have the time I could add it back but I fail to see the need to (especially since the framerate drops by 50% each time the mirror is seen). Minor Updates Added a coffee machine to the travelling agency Added most travelling agency props to the pawnshop Added a window cracking effect on mall windows Fixed some bugs here and there Next Week Now that the "break" is done I can really get back to work fully and really get things done. Right now I really want to improve the juiciness of my game. While most actions aren't really dry I really want to amp up the juices. This means SFX, VFX, bug fix and many many more. I really need to take the time to think about how can I make the game much more appealing and this might take time. Aside from that, there's always the need to add new stuff in, but this a lot less prioritized as of now. Then it's your usual suspect again... So that's about it for this week really!
  5. 1 point
    Lots to do. I feel I have a decent setup ready now and some basic communication going on. For the sound system, I went with a companion module in the series I'm currently following. It was nice after cleaning up the implementation and tweaking it slightly to act as I wanted. Copied and tweaked a couple of instruments, wrote two bars of music that worked well wrapped, turned an instrument concept into a game effect and we were off and running. Still focusing on the challenge requirements because, well my game idea is a little weak but that is not the point. Thank you for the challenge opportunity. I know some decent game play will come out if I stick with the basic ground rules. (and maybe a twist in there somewhere) head scratching over here. But here's what my input strings look like for my music format. // Author : mark kughler (goliath forge) // Lick : Do Diddley |_............_||_............_||_............_||_............_| std::string strKick = "X..X....X.......X..X.....X......X........X......"; std::string strSnare = "......X.......X.......X.......X.......X.......X."; std::string strHiHat = "..X.X............XX.........X......X........X..."; std::string strCymb = ".........................e..X..................X"; std::string strBell = "......c...e...g................................."; std::string strHarmon3 = "b.............c.......b...............b.......e."; std::string strHarmon2 = "e.....................e.....d...........g...c.c."; std::string strHarmon = "............................a.......a.b........."; // lower case notes (c major) - upper case sharp // c = c d e f g a b c // d = d e F g a b C d // e = e F G a b C D e // f = f g a A c d e f // g = g a b c d e F g // a = a b C d e F G a // b = b C D e F G A b Moving Forward...
  6. 1 point
    Not an expert and just self teaching me game programming. I had a similar question a few weeks ago, and following this i implemented that what you called alternative. They call it "Radar Approach". In principle, you can frustum cull in view or in clip space, this is view space. Dragging planes around for complex tested didn't sound very effective to me, but i may be wrong. From the above tutorial, here's the frustum method (OpenGL) to call when fov changes (angle, near/far plane). It intakes angle in y and calculate the x value via the ratio. void ViewFrustum::setFOV( const float angle, const float ratio, const float nearD, const float farD ) { m_ratio = ratio; m_nearD = nearD; m_farD = farD; m_angle = glm::radians( angle ); // compute width and height of the near plane for point intersection test m_tangensAngle = tanf( m_angle * 0.5f ); m_height = m_nearD * m_tangensAngle; m_width = m_height * m_ratio; // compute sphere factors for sphere intersection test m_sphereFactorY = 1.0f / cosf( m_angle ); float anglex{ atanf( m_tangensAngle * ratio ) }; m_sphereFactorX = 1.0f / cosf( anglex ); } The method to call on cam movement (every frame, that is). void ViewFrustum::setCameraVectors( const glm::vec3 &pos, const glm::vec3 &front, const glm::vec3 &up ) { m_cameraPosition = pos; m_z = glm::normalize( front - pos ); m_x = glm::normalize( glm::cross( m_z, up ) ); m_y = glm::cross( m_x, m_z ); } Intersection tests are in the tutorial linked above. It works. But i am curious too if there is a better way :-)
  7. 1 point
    (Image by an artist, who's now deleted their twitter unfortunately) Foreword I am building a game project that includes a massive amount of characters and character writing. Writing is not one of my strong skills (as I'm sure you will see in this article) so I meet with skilled writers. I find their feedback invaluable. These meetings have taken place on rushed streets, swigging pints in pubs, through emails and through arguments. I'm confident I have met with a range of people with different opinions, but out of it all there are a few very consistent points which seem to form the backbone of writing characters. What follows are some notes on character writing that I have collected from these meetings. Complimented by the book Into The Woods by John Yorke (Notes supplemented by Into The Woods will be marked with [ITW]). Hopefully they can be of use of you. Character Versus Characterization The conflict between how we wish to be perceived and what we really feel is at the root of all character [ITW]. To see it another way: The conflict between how we wish to be perceived (characterization, facade) and what we really feel (character) is at the root of all (drama). Thus, for a character to be interesting and three dimensional, a character must be conflicted in some way. They will have a facade, built out of aspects that they think is beneficial (whether they are aware of it or not). But as time goes on, the facade will become detrimental instead. Until the character throws off the characterization, they will not win. In keeping up their facade, characters will speak according to the way they want to be seen [ITW] unless their guard is down. Hence dialogue, which is important. It should, at some level, reveal intent and how they want to be seen. Script for Apocolypse Now (1979), a movie based on Joseph Konrad's Heart of Darkness (1899) Writing the Dialogue When a character says something, and does something completely different, they are engaging, and drama comes alive. If dialogue is just explaining behavior, it is not engaging. Dialogue then, should show us character, not explain characterization. In other words, dialogue should not explain what a character is thinking, it should explain Key to getting natural sounding dialogue is having a character you can mentally draw forth rather than having to think about each individual line. That part comes later. Countless are the writers that sit in front of a page, thinking of something for a character to say. Instead, we create the character and they speak for themselves. For now, creating the character is first. To create a character, you must consider it as much as possible, from as many angles as possible. Here are some questions to consider about a character. They're not exhaustive and they're not the even the best, but they are a starting point: In public, what are they like? Are they kind, short-tempered, rushed? As soon as they lock themselves in a toilet, away from the public, what are their first wandering thoughts? Where do they come from and where are they going? Are they from a poor place or a place of riches? A quiet place or a busy place? Do they bounce between places? What do they like? What don't they like? If they are on a date, and their food is ordered for them and they don't like it, how do they react? Can they drive? Do they like driving? How do they react to traffic? They find a picture of themselves from the past: depending on when the picture was taken, and with/by whom, how do they react? And so on. The more questions about a character you consider, the deeper and more engaging they become. Eventually, the character becomes so concrete that the dialogue writes itself. A woman, between 26 and 29. Through-out school, her social life was mediocre. With little to do, and not many people with things in common, she leaves town the instant she graduates. In a busier city, she plucks up the courage to go out for a drink. After all, there are thousands of people of in this city, the chances of meeting someone is pretty high. She enters a pub. She has to push her way in. Immediately she notices she is the least fashionable in the room. It takes her a minute to find a spot to sit, but she finally settles in. After two hours, she is approached by a man. "How are you?" he asks. After a beat, she replies "Allright. Thank you." "I'm good, too" the man says. "Oh. Of course." she says. The man clears his throat. The man is obviously more experienced, and some what full of himself. He does not wait for her to ask him how he is, instead get its out of the way. "Oh. Of course" the girl replies, in surprise; partly because she considers this an oversight on her part, and partly because the man was slightly rude to her. She is not used to the short-handed, rushed city life that the man experiences. The man is expecting a conversation at the same pace as city-conversation. He realizes his mistake, clears his throat in embarrassment. The subtext here is that they both have much to learn about each other. Their lives run at different speeds and if they are to become good friends, they will have to learn from each other and grow. A better example of this in action is the opening scene of the film The Social Network (2010), where the characters talk past each other. There are a myriad of videos analyzing this scene from a writing perspective, so I wont go through that here. A quick search will enlighten you easily. The opening scene of The Social Network (2010, David Fincher) So, to create dialogue, we must create character. The better the character, the easier the dialogue is to write. In some ways writing character dialogue is acting out the character. Channeling what the character might say if they were here. Gathering Character Reference You need stuff to create stuff from. In all creative output, the input is just as important. People are characters. You are a character. You put a character out instead of yourself, as we have discussed further up. Therefore, you must talk to people to gather material. People hold a hundred stories about themselves and others. Nearly everyone relishes telling you about themselves, so just ask. Then listen carefully. I had a talk with an alcoholic in a pub. He was, in his hay-day, a good property developer and property salesman. We talked for a long time. One of the interesting things he said was his theory about dwindling men. This claim was thus: In the 70s and 80s, men's clubs were shut down en-masse. Because of this there was largely nowhere for men to hang around with other men (that is: without wives and women). Except for betting shops. Therefore the demand for betting shops spiked and many, many, many of them opened. Lots of men dwindled away in betting shops. I asked him if the closing of the mines in the North (and the subsequent massive unemployment) also added to the demand of betting shops. He agreed, satisfied with addition to his theory. But then he tapped his temple with his finger and said "But people like, like us, don't end up- you know, people who are switched on. We don't end up dying slowly in betting shops. Mug's game..." With a triumphant nod he drank his way through what was probably his 25th pint that week. In a dark pub in the afternoon. Conflict personified. Chuck Palahniuk, the author of Fight Club, has hours of talks along this line. Collecting and retelling stories from real people until they take on a life of their own. Looking up any of the talks of Chuck is a must. Along with talking to real people, you must also read stories written by authors. And private blogs released by anonymous writers. And listen to confession podcasts. And character study documentaries. And so on. There is a documentary on a handful of influential flat earth advocates called Behind The Curve. It is it not a very deep slice of the flat earth ideology or belief, but it is great character study of these characters. One of the characters is a woman called Patricia Steere, who runs a Youtube channel centered around discussions and daily chats on flat earth theory, the flat earth community, flat earth news, and so on. She's stand-out in the conspiracy community, and she does not look like a conspiracist at all. She wasn't always a flat-earther either: she arrived there via a path of different conspiracies. Lizard people, global control, etc. As her channel gained in popularity, and more people from the conspiracy community noticed her, conspiracies about her started to circulate. The problem with being in the conspiracy community is that your beliefs are ridiculed constantly, therefore the big, bad world is always against you. So it is natural to feel that if someone does not believe as you believe, they are the enemy. This can even go as far as to other members who's beliefs have changed. They've been compromised. There is a short segment in the documentary where she says something along the lines of (and this is not verbatim, but the jist is there): Then, there is a moment where she is just on the cusp of a realization. As she is speaking you can see the gears in her head clank to a halt as she thinks: What they are saying about me is silly and not true. I have said the same things in the past about other people. It was not true and silly then. And therefore, what if flat earth is not true? Have I been wrong all this time? Then, just as there is about to be a logical explosion somewhere deep in her brain. She brushes it off with some comment and continues to believe what she believes. Instead of dealing with that sudden break in the pattern, she simple ignores it. The conflict within this character just flashed by in a monumental, internal battle and the illogical side won. It's a compelling five seconds. People can be a collection of compelling five second flashes. Summary Are you staring at a page, wondering what a character is going to say? You have not developed the character enough for them to speak yet. You will have to think through your character and build up aspects of them to dislodge dialogue. A quick search for character building questions is a good start. Your character is made. But they are stiff and not very engaging. They will need conflict, a facade. They need friction and difficulty. Characters make characters of themselves. Keep a look out for characters in real life. NOTE: This article is a condensed compilation of a lot of notes from meetings. It is also a mirror to the original article I wrote and posted on Minds
  8. 1 point
    Neither of these are always (or even often) true. Not knowing the hardware is rather common now with multiplatform being the norm. Hardware varies a lot and it is subject to change. Trying to make broad generalisations may have worked maybe 35 years ago but modern CPUs do all kinds of craziness, out of order pipelines etc, which are probably not public info. And what they do depends on what they are trying to optimize - speed, or power use etc. On top of that the best choice of algorithm often depends on the data itself, which is why compression for example might use different techniques depending on the data in a block. Generally the rule of thumb these days with any optimization is to do empirical testing, rather than come up with an a priori method. Computers are now complex systems, and hoping to plug in some values into a formula and come up with how well an algorithm will work on any particular hardware is often less practical than just trying the thing with some test data, and modifying the technique accordingly.
  9. 1 point
    I'm going to skip a blog week and just throw up a video progress. This week was character/animation controller. Nice to start thinking about the action bits. Thanks for playing.
  10. 1 point
    Thank you all for responses! You've been very helpful. Happily, I was given the opportunity to take the almost exact same role, but with C++. I accepted the offer obviously.
  • Advertisement
  • Advertisement
  • Popular Contributors

  • Member Statistics

    • Total Members
      259937
    • Most Online
      6110

    Newest Member
    DederBer
    Joined
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!