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

      Back-projection soft shadows

      CryEngine has this feature running IIRC (voxelization but no SDF), but their manual pages seem to be down at the moment.
    3. Developer Dre Reid

      As a game dev, what are you most afraid of?

      I guess it would be pirates and not making enough money.
    4. Today
    5. VS_OUTPUT VSMAIN(VS_IN Input) { VS_OUTPUT Output = (VS_OUTPUT)0; Output.PSPosition = mul(float4(Input.LSPosition, 1.0f), mWorld); Output.PSPosition = mul(Output.PSPosition, mView); Output.PSPosition = mul(Output.PSPosition, mProjection); Output.TextureCoords = Input.TextureCoords; Output.LSNormal = mul(float4(Input.LSNormal, 0.0f), mWorld); Output.LSNormal = normalize(Output.LSNormal); Output.LightVP = mul(float4(Input.LSPosition, 1.0f), mWorld); Output.LightVP = mul(Output.LightVP, mLightView); Output.LightVP = mul(Output.LightVP, mLightProjection); //Orthographic Projection .......
    6. Zakwayda

      Assertion failed in pathfind (c++)?

      Can you step through using the debugger and see what value for totalCost is causing the problem? It doesn't seem like there'd be many values of type float for which x < FLT_MAX would return false. FLT_MAX of course, maybe NaN. So it seems totalCost has become corrupted somehow or otherwise has an unexpected value. Presumably you're providing the G and H costs, in which case you could also add checks in your own code (if you don't have them already) to make sure those are sane.
    7. That would be a very bad idea for a serious game engine. In fact it can be said that the reason Blitz3D didn't make it as a game engine is because it kept omitting data types and never provided necessary libraries to provide the data type functions. Some data types are similar but have very different jobs. Take Color VS Vector3 both look like this: Red = Color(1,0,0) and Right = Vector3(1,0,0). A Vector3 has a length that we use like this: Vector3(1,0,0).length( ) this will return 1. Color doesn't have any concept of length, it in turn has handy color functions like Color(1, 0, 0).contrasted() that tells us the contrast level of the color. There is also differences in how these lerp and other mathematical expressions. That is why Godot doesn't omit these data types, so that you can use them as intended. Blitz3D isn't using a natural programming engine. It is a full code based engine, using BlitzMax that is derived from Basic speed = (0,0,0) If Keydown(up_key) = true Then speed.y = speed.y +1; MoveEntity Object speed This code works in Blitz3D because it understands programming. It was just a simpler engine, intended as a stepping stone for moving to more advanced engines like Godot. If we look at the Godot example it can be made the same way: var Speed = Vector3(0,0,0) if Input.is_action_pressed("ui_up") == true : Speed.y += 1 move_and_slide(Speed) Yes it does look a little different but that is because it can do more things. Once you notice that the : symbol just means Then it is easy to understand why : is used instead. Because in Godot a Then function can do a list of things, like this: if Input.is_action_pressed("ui_up") == true : Speed.y += 1 Speed.y = 1 / 2 Speed.y = Speed.y +1 All three those calculations will now run when the up key is pressed. Think of the : symbol as it is used when writing and you will see it is the same concept. Once you have learned how to use Godot, you will see that if you go back to Blitz3D you will be able to do a lot of things you didn't know Blitz3D could do. But "Is_action_pressed" doesn't only refer to keyboard keys. It could be a finger pressing a touchpad, or a game controller joystick that can be pressed down and even a lever like the ones found on controllers. "Key_down" would have been confusing; as it is only a key on a computer keyboard. This doesn't surprise me, I have seen professional C++ programmer's struggle with Python. It's like a mountaineer coming fully dressed in climbing gear, only to find a hill. In Unity the variables also need declaring, yet again this is because it has a lot of extras for each data type: public float Speed = 100f; void MoveObject(float XAxis, float YAxis){ TempVec = new vector3(0,0,0); TempVec.x += XAxis * Speed * Time.DeltaTime; TempVec.y += YAxis * Speed * Time.DeltaTime; this.transform.position() += TempVec; } void Update(){ MoveObject(Input.GetAxis("Horizontal"),Input.GetAxis("Vertical")); } As you can see there is a lot more to C# scripting than there is to GDScript or Blitz. The advantage of the Unity one is that you get pressure sensitivity; the harder the button is pressed the more the object moves.
    8. Hi! Im using a a-star pathfinder from the web ("micropather") and I've run into a problem in one of my projects using it and i'm stuck. Maybe you can give me a hint on where to look for the error? This is the problem I get: It happens every time after one agent pathfinds and another one tries to do it again. The first agent can always pathfind without problems, the second one always spawns this message. I happens when the pather tries to push a new node to the open open list if that says anything. The failed assertion comes from: // Add sorted. Lowest to highest cost path. Note that the sentinel has // a value of FLT_MAX, so it should always be sorted in. assert( pNode->totalCost < FLT_MAX ); The pathfinder works fine in other projects so I guess I made something wrong in this project but I've looked alot for possible errors... Thank yo for any help you may provide! Erik
    9. ethancodes

      ball isn't spawning where desired

      So if I take that line of code out, it seems to help, but of course the player is still moving the paddle, so it seems to spawn where the paddle was, but not where it is now. From what I can tell, it's kind of hard to say for sure though. I don't want to save the original ball's location when it hit the paddle because if the paddle moves, it's going to spawn where the ball was and not where the paddle is. That line of code should be spawning it right above the paddle I thought, unless I have a mistake somewhere there.
    10. CoronaRob

      From the Forum – Issue #185

      Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics. Life Bars Many games allow the main hero (or the enemy spawn) to take incremental damage and as a game developer you need to communicate the current health of the character to the player. There are many ways to do this and there are many stylistic choices for the developer to make. But how do you go about updating the life bar and show damage taken? Several community developers jumped into this thread to show the way. Corona on Linux? No doubt, many developers want to use Corona on Linux. It’s been on the wish list for a long time. While our engineering team looks for time to work on this platform, an enterprising developer figured out how to get Corona working with WINE on Linux. This thread documents his process for opening up our awesome engine to the Linux world Using Tiled Tiled (https://www.mapeditor.org) is a great tool to layout many styles of games that can be made with Corona. There are several third-party, community-made libraries for using Tiled content, one of the most popular being PonyTiled from @ponywolf. This thread helps users figure out why they’re having issues with Tiled and gets them on the right path to building games with this really great tool. Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum. View the full article
    11. Yesterday
    12. sprotz

      Need library/engine/whatever

      Cocos2D is one of them. http://www.cocos2d-x.org
    13. I am a natural programmer, I simply prefer simplicity. and neatness. Many Unity users have found Godot difficult too. See, in Godot the script would be simpler if "Input" was omitted in "input.event", or Vector3 is omitted like in Blitz3d, or the function name should be clearer "Is_action_pressed" sounds confusing compared to "Keydown", ahh clear. But a Godot veteran might not mind. Then as the code becomes longer and bigger, more confusion erupts when it comes to debugging. Perhaps it is just my style as every programmer has a distinct style of coding. But don't worry, Ogre3D's code is much worse.
    14. Hi, I'm looking for some artists for a top-down medieval pixel art game. It's a little hack and slash game with a pretty generic storyline. I'm currently designing the game and getting the basic mechanics programmed, and I have a friend that is willing to do some level design. Right now I would like an animated character and some environment tiles to get started with art. You will be following flavor text and a pretty rigid set of needed assets with descriptions. You then are free to add what you like and I will try to incorporate it into the game. Right now I have 17 levels (I am trying to reduce it to about 10 though) of varied sizes, but the game will be linear (there are 2 villages that will have a more open map though). Each of these levels have some new enemies and have their own environmental taste, so we might be looking at 20-30 creatures all together, mostly redundant environment tiles, and then several animated props and items. This is mostly meant to be a fun project, where you and I can meet developers and make a game or two together. I don't plan on selling this game, it is open source and written in Lua using Defold. If you'd like to see code I've written I can PM you my github, you can PM me here for more details! Thanks
    15. FreneticPonE

      Back-projection soft shadows

      If you're going for that big of an area lightsource then you're basically doing global illumination, so I'd skip looking at direct shadowing and try out voxel cone tracing/Signed distance field tracing. Actually SDF tracing is probably what you're looking for. Unlike cone tracing you can check the sign to see if your inside a mesh, so your empty voxel problem is solved. http://advances.realtimerendering.com/s2015/DynamicOcclusionWithSignedDistanceFields.pdf Epic did an experiment with using this to shadow VPLs. It worked out pretty well, until they abruptly cancelled all experiments as such: https://forums.unrealengine.com/development-discussion/rendering/40411-the-state-of-distance-field-gi-in-4-8
    16. Promit

      Closed

      This classified is now closed.
    17. Yeah, I figured the hats would be safe. If people aren't bothered by that, it certainly makes my life easier. Thanks a lot! The GameController API is actually built on top of the Joystick API in SDL; it just has a database of recognized controllers whose axes and buttons it recognizes as "Left Analog X", "A Button", etc. So I could just access the mapping and treat it as a GameController with nothing lost. So using both or switching in the end would amount to the same thing, I think. Upon further thought, I think individual mappings per controller, rather than a generic mapping would probably be easier to handle and allow for more options. So with that I think all of my questions have been answered! Thanks to everyone for the help!
    18. FreneticPonE

      Distance Fields

      Yeah in order to save a lot of computation Epic currently generates distance fields offline. There's a runtime generated global distance field as well, though lower res. I don't know how many mip levels they use however, though it has to be bounded. Neither am I sure how they loop through overlapping pre-computed volumes, which one do you test first? Anyway, here's a great talk on using all this distance field stuff for both geometry and lighting done in realtime in a shipping game:
    19. dpadam450

      Distance Fields

      I guess if you generate them per instance and pre-compute the distances offline it would make sense. Each instance would have a unique 3d volume.
    20. Scouting Ninja

      Advice for Creating a Hand Drawn 2D RPG

      Like @Rutin pointed out, ground is often made with tiling textures; because one large ground image will eat into your performance. I would look for the biggest patch to create a tiling texture, then using Gimp's heal brush and tiling effect would make a very simple texture that can tile: Then I would make my lowest layer from this tile. Find the most defining details of the sidewalks and make sprites using them: Each color shows a unique part that would need a sprite of it's own. For the red and green I would make into small tiles that can be repeated like this: I rushed it a bit, sorry if it doesn't look right. Then I just keep stitching them together to form the long sidewalk. There is a little tiling artefact here, you will want to spend some time on these small parts to see that each tiles perfectly. Then from here you layer the sprites like this: The floor tile first, sidewalks second and last building layers. This will make each object render above each other. In Unity you can use the Z depth, because 2D just uses X and Y. The unity 2D collisions will still work perfectly even if the object have different Z depth. Should look something like this in the end: So you will be building the whole image again, using little computer friendly part. The good news is that as you make more and more sprites this will be very easy for you to do.
    21. Could you simply describe project? Not detail but an outline.
    22. It looks like you didn't understand the code you where using in Blitz3D I will explain it so that you can see Godot is exactly the same: If Keydown(up_key) Then MoveEntity Object 0,1,0 If Keydown is your input. You use this to tell what input to check. The MoveEntity Object is the target this gode has to move and 0,1,0 and this last part is your vector. Godot works exactly the same: if Input.is_action_pressed("ui_up"): move_and_slide (Vector3(0,1,0)) if Input.is_action_pressed("ui_up") this is you input check. move_and_slide() by default move and slide will execute on the target object. Last is the vector Vector3(0,1,0) Godot uses long names that clearly define what each thing does, to make it easy as you don't have to remember abbreviations. So the simplest movement in Blitz3D looks like this: If Keydown(up_key) = true Then MoveEntity Object 0,1,0 If Keydown(down_key) = true Then MoveEntity Object 0,-1,0 If Keydown(right_key) = true Then MoveEntity Object 1,0,0 If Keydown(left_key) = true Then MoveEntity Object -1,0,0 The simplest Godot version is like this: if Input.is_action_pressed("ui_up"): move_and_slide (Vector3(0,1,0)) if Input.is_action_pressed("ui_down"): move_and_slide (Vector3(0,-1,0)) if Input.is_action_pressed("ui_right"): move_and_slide (Vector3(1,0,0)) if Input.is_action_pressed("ui_left"): move_and_slide (Vector3(-1,0,0)) The nice thing about Godot is that you can visually see what part is the IF part and what part is the Execute part. Both these methods are considered bad practice when working with games. Because code runs from the top line to the lower line. Meaning that if you move like this and pressed both the up and down key, the object will always move down. So to fix this the Godot tutorial uses math, to provide better input like this: #The vector is made above all the other code, so that the other code can change it var velocity = Vector3(0,0,0) if Input.is_action_pressed("ui_up"): velocity.y += 1 #this now makes velocity Vector3(0,1,0) if Input.is_action_pressed("ui_down"): velocity.y += -1 #this now makes velocity Vector3(0,-1,0) if Input.is_action_pressed("ui_right"): velocity.x += 1 #this now makes velocity Vector3(1,0,0) if Input.is_action_pressed("ui_left"): velocity.x += -1 #this now makes velocity Vector3(-1,0,0) velocity = move_and_slide(velocity) #this now calculates the smooth movment using the combined So the reason Godot teaches it like this, is that velocity increases or decreases as you hold the button. The += means Velocity.x = Velocity.x+1 in other words it's own value plus one. If you used just = then it would be 1 and this would mean that down would cancel up, instead of slowing down. Of course you could have done the same thing in Blitz3D, to get more realistic input. No, Unity doesn't have simple collisions. You would have needed to grab the rigidbody component and add force to it. Or if you really wanted the simple collision style you would have to emulate it using rays, here is a 2D example: https://answers.unity.com/questions/972878/simple-top-down-2d-collision.html Godot is much closer to Blitz3D than Unity. It looks like you are having a hard time because you don't know programming. I recommend you do a few python tutorials. Python is easy and is very-very similar to GDScript.
    23. Zombie Commander is now available on Google Play Store : https://play.google.com/store/apps/details?id=com.pokandco.Zombies
    24. Zakwayda

      Keep object in camera view

      Here's a couple more questions (some more information about the desired behavior might make it easier to help). It seems clear from the video you posted that you want tracking to be restricted so that the target object remains visible. What about yaw and pitch? If the camera rotates so that the object goes out of view, is that ok? Or do you want to disallow that? Also, does the camera actually orbit, or does it just rotate in place? (I see reference to orbiting in the code, but the code looks like it just rotates in place.)
    25. Wyrframe

      Creating A Grid of Images

      You don't need to load a separate Image for every Sprite. You can load your two brick images once each, and then create any number of Sprites which all use one or the other of those Images. That's the difference between an Image and a Sprite; the first is just simple bitmap data, and the other is a scene graph element which describes what to draw and where. For that sharp of a drop, I bed there's something odd about how you're creating and using Brick. I'm guessing you're instantiating a Brick once per frame, instead of once per scene reset? class BrickGrid(): def __init__(self, space): self.batch = pyglet.graphics.Batch() self.sprite_list= [] # I really don't know Python, there must be a better way to do this: # Create a list of brick images, and load each file in turn. brick_images = ['brick1.png', 'brick2.png'] for index in range(len(self.brick_images)): brick_images[index] = pyglet.image.load(brick_images[index]) for x in range(7): for y in range(7): body = pymunk.Body(body_type=pymunk.Body.KINEMATIC) body.position = x * 100 + 75, y * 30 + 340 image = brick_images[random.randint(0, len(brick_images) - 1)] sprite = pyglet.sprite.Sprite(image, x=body.position.x, y=body.position.y, batch=self.batch) self.sprite_list.append(sprite) shape = pymunk.Segment(body, (0, 0), (50, 0), 6) shape.elasticity = 0.80 shape.collision_type = collision_types['brick'] space.add(body, shape)
    26. Stevens R. Miller

      C# variable name creates error

      C# will also let you start an identifier with just the underscore. So, if you want the first alphanumeric character to be a digit, you can use this: bool _3D_pressed; You'll probably have to listen to some howling from your colleagues if you do this, though. Using the underscore as the first character in an identifier is typically reserved for special purposes (like storing the "backing" value of a property). So, mostly, I mention this for the purpose of advising against doing it. Rutin's suggestion is really the better alternative. Also, you might pick up a copy of "The Elements of C# Style." It's an easy to use reference on the conventions most commonly used to guide your choices in writing C# code.
    27. phantaminum

      phantaminum's tunes (new track every Friday!)

      An orchestral piece that I've been working on for a bit, hope you all like it!
    28. Wyrframe

      Need library/engine/whatever

      http://love2d.org ? Built-in Box2D, OpenGL, Lua, has thread and socket libraries built in, pretty good performance thanks to LuaJIT but you can also build and load C/++ DLLs if you need something closer to metal.
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!