Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1396113 Posts in 67341 Topics- by 60479 Members - Latest Member: Indigo

October 24, 2021, 01:56:56 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 277 278 [279]
Print
Author Topic: The happy programmer room  (Read 587130 times)
InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #5560 on: November 02, 2020, 06:52:04 AM »

Interesting! I would love to see the difference on something like a pixel art scene with lots of objects moving around to really see the effect.

How did you come about doing this? Were you looking at some pixel art art and it started bothering you that it was moving like that?
Logged

ThemsAllTook
Global Moderator
Level 10
******



View Profile WWW
« Reply #5561 on: November 03, 2020, 06:29:45 PM »

Unfortunately my use case for this right now isn't especially exciting or showy - I was implementing a color picker in my level editor, and moving the cursor diagonally with keyboard or d-pad controls was showing this effect. I remembered once having helped someone else who was seeing this in their game, so I already had a solution in mind and was eager to put my theory to test in a real situation. Now that I have the code for it in my game framework, I have a solution in my pocket for all future situations where this comes up.



Right now I'm applying this change to the actual coordinate values whenever the cursor is moved, but I realized later that this could be applied just as easily to only the visuals, as long as my display code has access to the direction of movement for the thing it's drawing.
Logged

ThemsAllTook
Global Moderator
Level 10
******



View Profile WWW
« Reply #5562 on: December 01, 2020, 07:16:25 AM »

I posted this earlier on Twitter, but I think it fits here too... I had a fun little weekend project getting my two latest game projects running on a Raspberry Pi. Some things I learned:
  • This little device is surprisingly capable. I was expecting noticeably degraded performance, but nope! Just as good for my use cases as a normal desktop computer.
  • GLSL compilation is buggy. No matter what I did, converting a mat4 to mat3 in one of my shaders caused a crash, so I just had to disable some animation features for now. I'm probably going to switch graphics APIs at some point, so this isn't too big a deal right now.
  • Linux audio APIs are a mess. What works mostly OK on my laptop produces nothing but an intermittent crackle on the raspberry. Not sure what to do about this one yet.
  • char type is unsigned by default. I had to use the "signed" keyword for the first time in 18 years of writing C.
  • Gamepads mostly just work, though my Xbox One controller isn't recognized. I haven't taken the time to see if a driver is available yet.
  • Floating point rounding behavior is different. I had some code typecasting between uint64_t and double, and different values than I expected were representable/unrepresentable.

I'm not sure how realistic it will be to make Raspberry Pi a release platform once these projects are ready, but at least it's an option now!
Logged

mirrorbird
Level 0
*


View Profile
« Reply #5563 on: December 30, 2020, 09:08:02 PM »

 Gomez

I'm moderately happy, but seem to be stuck in poking around in my code without having too much progress. I'm trying to force myself to finish prototypes in a week (or equivalent amount of work). Maybe I'll participate in a new year game jam.
Logged
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5564 on: February 28, 2021, 03:19:03 AM »

My Voxel Cone Tracing is working ok-ish now. The basic idea is that instead of shooting a lot of scattered rays and summing up their result, one could trace a Ray With Volume, a cone, and calculate proportionately how much of the primitive intersects the cone. Which hopefully in the long run allows to trace a single cone for penumbra-correct shadows of volume light sources, a single cone for diffuse reflections or a couple of cones instead of hundreds of rays to collect Global Illumination.

I wanted to try this. And after nailing the analytic coverage in some ShaderToy experiments, I now went for a CPU-only cone tracer inside an old voxel world I have laying around. The concept of Cone Tracing - just like raytracing in general - is wasted on primary rays, Rasterization will always be faster. But it's enough for a first test. And cone tracing the primary rays does at least produce images completely free of aliasing. The image is really stable when moving. Unfortunately. performance is not really suited for RT. Near-FullHD resolution and a somewhat too-early LOD end up at 3 to 4 fps on my 12+12 ryzen3 cores. There's some room for optimisations, but I already vectorized quite a bit for AVX256 and implemented some tricks... this will never be ready for prime time, I worry.

But somewhere later I'll move this to the GPU, and I expect it to run at least 10x faster there. So let's see.

On the topic of "let's see": this is what it looks like.
http://www.splitterwelten.info/privat/voxelcone_stabil.png

Or not, image doesn't show up. I really need to get https going on my server. Until then it's just an URL you need to click.
« Last Edit: February 28, 2021, 03:25:06 AM by Schrompf » Logged

Snake World, multiplayer worm eats stuff and grows DevLog
ThemsAllTook
Global Moderator
Level 10
******



View Profile WWW
« Reply #5565 on: March 13, 2021, 08:18:46 AM »

A fun little problem I'm working on solving today: In my game, characters can equip things that grant bonuses or penalties to stats, and equipment can have minimum stat requirements to be equipped. Due to status effects, stats can change mid-combat, and equipped items whose requirements suddenly aren't met anymore will become inactive for the duration.

After thinking about this for a bit, I realized it actually requires me to solve a series of constraints every time a stat-affecting change is made. A simple example: A character has 1 base focus, and an equipment set which contains an item which requires 1 focus and boosts strength by 1, and an item which requires 1 strength and penalizes focus by 1. Equipping the first item is fine, and grants a stat bonus that allows the second item to be equipped, but equipping the second item would make the first item no longer legal to equip.

I don't have a working implementation yet, but I think what I'll end up doing is an iterative function that starts with base stats, equips items one at a time if their requirements are met, and doesn't allow equipping something if doing so would invalidate a previously equipped item. After each iteration, if a change was made and there's more to equip, it tries again, terminating when a full iteration happens with no changes.

As I write this, I'm realizing that this still has different potential outcomes depending on evaluation order. This squarely straddles the line between programming and game design, so I also have the option of changing my design to avoid ambiguity (for example, only pay attention to base stats when evaluating requirements, and don't allow equipment stat boosts to make equipping other equipment possible). I still wonder if there's an order-independent way of evaluating the problem as stated above, though...

Stuff like this is always a lot of fun to think about.
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5566 on: March 14, 2021, 12:50:17 AM »

And don't forget the potential of deadlocks. Equip an armor which is so tight it reduces Perception. Suddenly MinPerception requirement of some mage hat is not met anymore, so the hat is off. The removes the +strength buff of the hat which in turn renders the armor un-equipible, raising the Perception stat again.

If you can afford it production-wise, I suggest implementing below-minimum items otherwise. Like the armor slowing your movement if the character is not strong enough to wear it.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5567 on: April 03, 2021, 02:20:06 AM »

I'm playing a bit with a grid-based dungeon crawler. Or better: with the gfx of it. I have a tile-based maze, I build a base mesh from it spitting out interconnected 2m squares, and then I want to turn these walls into something cave like. Stoney stuff shouldn't be that complicated, should it? Just drop some octaves of simplex noise and blend materials by normal? No, you need a continuous base mesh first or your extrusions will intersect eachother close to edges. Grmpf

The wisdom of the internet left me at this point. All the methods I could think of failed at points where convex and concave edges collide. So after quite some frustrating experiments this is a technique that drives solely on the contrast between plane normal and vertex normals. Scale and distribution apparently aren't correct, so it overbulges a bit at times, but still I'm very satisfied. Next stop is now putting some noise on the surfaces.


http://www.splitterwelten.info/privat/dungeon_rund.png
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
kason.xiv
Level 0
**


View Profile
« Reply #5568 on: April 08, 2021, 07:28:55 PM »

Anyone here ever compiled an SDL project to WASM to run in the browser? I also use conan in my build process and in trying to get them all to play nice it feels as though there's nothing but hurdles.  Cry
Logged
qMopey
Level 6
*


View Profile WWW
« Reply #5569 on: April 10, 2021, 03:25:05 PM »

Yeah I made an SDL2 game and compiled for browser. I hate package managers and stuff. I just wrote a cmake file and manage stuff myself.
Logged
kingoftheconnors
Level 0
*



View Profile
« Reply #5570 on: April 10, 2021, 08:07:27 PM »

I finally met with the artist for our project and ran the game together. He really loved all the work I got done. Hopefully, we'll be able to release a fantastic, BEAUTIFUL demo and get some support rolling around!

If only artist-friend didn't keep asking for another LITTLE bit of content to make the demo EXTRA good. Ha.
Logged
kason.xiv
Level 0
**


View Profile
« Reply #5571 on: April 20, 2021, 12:47:15 PM »

Yeah I made an SDL2 game and compiled for browser. I hate package managers and stuff. I just wrote a cmake file and manage stuff myself.

Was there a particular walkthrough or tutorial that you found useful? If so would you mind linking it? My project is CMake based as well, does your build use conan?

I finally met with the artist for our project and ran the game together. He really loved all the work I got done. Hopefully, we'll be able to release a fantastic, BEAUTIFUL demo and get some support rolling around!

If only artist-friend didn't keep asking for another LITTLE bit of content to make the demo EXTRA good. Ha.

any teasers? what sort of game is it?
Logged
Pages: 1 ... 277 278 [279]
Print
Jump to:  

Theme orange-lt created by panic