Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
gonadic io
Feb 16, 2011

>>=
A bit out of the blue, but what amount of raytracing is feasible in realtime? I'm making a voxel engine using voxel-octrees (i.e. 8 identical 1-width voxels get combined into a 2-width cube and so on) and have my heart set on rendering by casting a bunch of rays, marking the voxels as visible to be rendered traditionally. The idea is that it combines occlusion culling, frustum culling, and makes draw-distances more natural - things big enough will be rendered from far away and then detail smoothly increases as you go closer.

At the moment I'm rendering them all in the scene graph (JMonkeyEngine3 w/ Scala) and it's not even a bottleneck but I kind of just want to try the algorithm out.

Obviously octrees lose a lot compared to traditional chunks-of-3D-arrays if the world is inhomogeneous enough but in my experience minecraft-likes have huge swathes of open air and flatish group so I'm hoping it works.

Any suggestions/comments? My code so far is https://github.com/djmcgill/CPU

The octree is implemented, and most of a job system where workers place and remove blocks as directed is implemented too. I'm honestly considering starting again in Unity/F# though so I can rewrite the octree code from scratch.

Adbot
ADBOT LOVES YOU

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

So I challenged myself to remake this painting in Unity because I really like it.

Inspiration / Goal


The scene - video
https://www.youtube.com/watch?v=7A8Nubfsqk8

Still


Still sans post processing camera scripts


Scene set up


I realize that the painting looks like a painting and my scene looks like a lovely unity scene. But I can't figure out why or what steps i could take to make it closer other than adding more junk (I could add a bunch of soldiers and more houses but it visually feels very far off).

Any ideas would be much appreciated!

Obsurveyor
Jan 10, 2003

Well one thing right off the bat is that in your real painting photo, the texture of the canvas isn't uniformly coming through in the final result, which is something just about everyone(including you) fucks up.

Spend some more time thinking about the physics of how a painting is painted and how the paint looks when it's dry. Go study it in person. Your picture really doesn't do it justice. Paint in a painting has texture. There are thicker and thinner paints as well as thickness in the application. There are large and small details the brush leaves behind, as well as actual fibers getting deposited in the paint. The way the paint curves or is straight based on the motion the brush made while applying it.

What I'm getting at is that it's a lot deeper than just blurring the output and blending in a uniform canvas texture. By having a greater understanding of what it actually looks like, you'll be able to better create it.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Obsurveyor posted:

Well one thing right off the bat is that in your real painting photo, the texture of the canvas isn't uniformly coming through in the final result, which is something just about everyone(including you) fucks up.

Spend some more time thinking about the physics of how a painting is painted and how the paint looks when it's dry. Go study it in person. Your picture really doesn't do it justice. Paint in a painting has texture. There are thicker and thinner paints as well as thickness in the application. There are large and small details the brush leaves behind, as well as actual fibers getting deposited in the paint. The way the paint curves or is straight based on the motion the brush made while applying it.

What I'm getting at is that it's a lot deeper than just blurring the output and blending in a uniform canvas texture. By having a greater understanding of what it actually looks like, you'll be able to better create it.

Wow good points and thanks for the feedback Obsurveyor. What you're saying makes a lot of sense. Looking at other examples of games with painting-like art styles, they feel to me much more like crafty / cutout / mixed media. Like Okami


Then there's this approach of blurring and smudging


But with your idea of actually thinking through and mimicking the physics and process of painting I wonder if I could use a different (non-shader) approach for a more compelling outcome. My shaky understanding of shaders is that they do manipulation by each pixel value or vertex. But I think a more macro, smudge groups of pixels around a bit approach would suit painting more.

Sistergodiva
Jan 3, 2006

I'm like you,
I have no shame.

So trying to make my enemies take their turn in a nice and orderly fashion. I can't really figure out for to delay them. Right now they just both instantly walk as far as their action points let them. I'm guessing I should put a delay after each MoveToAction, but I can't figure out a good way to do it. I can't seem to get the Timer.schedule (new Task) to even compile.

This is java with libgdx btw.

code:
    private void enemyTurn() {

        turnAnnounce.setText("Enemy turn: " + turnNumber);
        for (int i = 0; i < enemies.size(); i++) {
            enemyDoStuff(enemies.get(i));
            if(enemies.get(i).getCurrentAP() == 0) {
                doneEnemies++;
            }

        }
        if(doneEnemies == enemies.size()){
            turnNumber++;
            playerTurn = true;
        }

    }
code:
    private void enemyDoStuff(Enemy enemy) {
        // always set the target to the closest player
        enemy.getAiCore().setTarget(findClosestTarget(enemy, gamePlayers));
        // make a path to target
        List<GridCell> aPath = findPath((int) enemy.getX() / TILE_SIZE, (int) enemy.getY() / TILE_SIZE, (int) enemy.getAiCore().getTarget().getX() / TILE_SIZE, (int) enemy.getAiCore().getTarget().getY() / TILE_SIZE);
        // if there is a path to the target, and distance is 1, attack, else walk one step towards target
        for (int i = 0; i < enemy.getCurrentAP(); i++) {
            if (enemy.getCurrentAP() > 0) {
                if (aPath != null) {
                    if (getTileDistanceBetween(enemy, enemy.getAiCore().getTarget()) == 1) {
                        enemyAttack(enemy, enemy.getAiCore().getTarget());
                    } else {

                        moveEnemy(aPath, enemy);
                    }
                }
            }
        }

    }

code:
    private void enemyAttack(Enemy enemy, Character target) {
        showBlood(new Vector2(target.getX(), target.getY()));
        target.setCurrentHP(target.getCurrentHP() - 1);
        enemy.setCurrentAP(enemy.getCurrentAP() - 1);

        //hit.play();
    }
code:
    private void moveEnemy(List<GridCell> enemyPath, Enemy enemy) {
        MoveToAction mta = new MoveToAction();
        mta.setPosition(enemyPath.get(0).getX() * TILE_SIZE, enemyPath.get(0).getY() * TILE_SIZE);
        mta.setDuration(0.2f);
        mta.setInterpolation(Interpolation.swingOut);
        enemy.addAction(sequence(mta, delay(0.2f), run(new Runnable() {
            public void run() {
                System.out.println(enemy.getName() + " moved.");
            }
        })));
        enemyPath.remove(0);
        enemy.setCurrentAP(enemy.getCurrentAP() - 1);

    }

Nition
Feb 25, 2006

You really want to know?

OneEightHundred posted:

I disagree, what makes game development awesome is all of the things that serious computer scientists don't do, like deal with the fact that everything in the game capable of moving will, at some point in development, be launched into the stratosphere by a physics bug.

Haha that would never happen in my ga...

https://www.youtube.com/watch?v=gUujEe3uqns


Edit: Also re the above discussion on a painterly look in videogames, this is by far the coolest example I've ever seen:



https://www.youtube.com/watch?v=GZRGE_CutyY&t=178s

He's got an explanation of how he did it and a downloadable demo here: https://ndotl.wordpress.com/2016/02/02/rendering-painted-world-in-jg

Nition fucked around with this message at 21:40 on Feb 14, 2016

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."
Been trying to figure out how to make a save/load menu for my game in Unity... and I'm maybe suspecting that I'm doing it too early, cause there's barely any game to speak of, so there's little space to get a feel for what style I need. And also I've recently only been playing games either only using quicksaves or not using saves at all because the game is quick mission based... Is there's some kind of consensus on the best save/load system or something? Obviously, the style of game matters, so mine is day based - that is, you have to "end the day" for the level to refresh/respawn, and also for you to buy upgrades and stuff. The "night" is also when I'm planning to allow to save the game, unless I go with a profile system instead... Which means that's when the game is going to save automatically, I guess.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Nition posted:

Edit: Also re the above discussion on a painterly look in videogames, this is by far the coolest example I've ever seen:
My God, it's wonderful, but it also makes me want to puke.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Rocko Bonaparte posted:

My God, it's wonderful, but it also makes me want to puke.
That would be because what he's doing drastically alters depth perception, by visually flattening the scene. I kinda wonder if a game like this would actually be viable. I love it, and it doesn't make me motion sick at all, but I would presume the subset of gamers that could handle this looks a lot like the subset of gamers with minimal to no VR motion sickness problems.

EDIT: Oh, and that would be doubly so because he's specifically loving with it in post. BUT. His basic method... is actually viable, with a compute shader, I think. It would just take a crap ton of rendering horsepower. HMMMMMM.

Shalinor fucked around with this message at 00:00 on Feb 15, 2016

OtspIII
Sep 22, 2002

Shalinor posted:

That would be because what he's doing drastically alters depth perception, by visually flattening the scene. I kinda wonder if a game like this would actually be viable. I love it, and it doesn't make me motion sick at all, but I would presume the subset of gamers that could handle this looks a lot like the subset of gamers with minimal to no VR motion sickness problems.

I don't get motion sick, exactly, but all the perspective-warping does make it super hard to have a relationship to the space within the game. I could see it working extremely well for a game with fixed cameras or maybe a third person game where precision of controls doesn't matter, but for anything action or first person it does seem like it'd be extremely hard to get anything resembling good game feel.

Which isn't to say it's impossible. I just have no clue how I'd do it.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

awesomeolion posted:

So I challenged myself to remake this painting in Unity because I really like it.

Inspiration / Goal


The scene - video
https://www.youtube.com/watch?v=7A8Nubfsqk8

Still


Still sans post processing camera scripts


Scene set up


I realize that the painting looks like a painting and my scene looks like a lovely unity scene. But I can't figure out why or what steps i could take to make it closer other than adding more junk (I could add a bunch of soldiers and more houses but it visually feels very far off).

Any ideas would be much appreciated!

Not to be an annoying (nonpracticing) art graduate here, but there's more to being "painterly" than making a shader to add a canvas texture and makes it look like paint strokes -- paint strokes are almost by definition unalgorithmic. The battle here is going to be won and lost in everybody's favorite things: textures and geometry. I think you're still is actually on a pretty good path (just get rid of the canvas texture). My texture artist skills are next to zero, but the path to go is probably to paint into the textures, to help the lighting out and add some variations. Look around your inspiration for all of the little variations in shading and contrast and stuff.

Not to mention, the inspiration image is an etching hand-colored with watercolors.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

dupersaurus posted:

Not to be an annoying (nonpracticing) art graduate here, but there's more to being "painterly" than making a shader to add a canvas texture and makes it look like paint strokes -- paint strokes are almost by definition unalgorithmic. The battle here is going to be won and lost in everybody's favorite things: textures and geometry. I think you're still is actually on a pretty good path (just get rid of the canvas texture). My texture artist skills are next to zero, but the path to go is probably to paint into the textures, to help the lighting out and add some variations. Look around your inspiration for all of the little variations in shading and contrast and stuff.

Not to mention, the inspiration image is an etching hand-colored with watercolors.

http://myscienceacademy.org/2015/09/03/new-neural-algorithm-can-paint-photos-in-style-of-any-artist/

About that.. If the goal is a still, it's apparently a solved problem. Doing all of that in real time could be interesting though.

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

leper khan posted:

http://myscienceacademy.org/2015/09/03/new-neural-algorithm-can-paint-photos-in-style-of-any-artist/

About that.. If the goal is a still, it's apparently a solved problem. Doing all of that in real time could be interesting though.

Well, if you're idea of painterly is some combination of tacky photoshop filter and bad clone brush.

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today

gonadic io posted:

A bit out of the blue, but what amount of raytracing is feasible in realtime? I'm making a voxel engine using voxel-octrees (i.e. 8 identical 1-width voxels get combined into a 2-width cube and so on) and have my heart set on rendering by casting a bunch of rays, marking the voxels as visible to be rendered traditionally. The idea is that it combines occlusion culling, frustum culling, and makes draw-distances more natural - things big enough will be rendered from far away and then detail smoothly increases as you go closer.

At the moment I'm rendering them all in the scene graph (JMonkeyEngine3 w/ Scala) and it's not even a bottleneck but I kind of just want to try the algorithm out.

Obviously octrees lose a lot compared to traditional chunks-of-3D-arrays if the world is inhomogeneous enough but in my experience minecraft-likes have huge swathes of open air and flatish group so I'm hoping it works.

Any suggestions/comments? My code so far is https://github.com/djmcgill/CPU

The octree is implemented, and most of a job system where workers place and remove blocks as directed is implemented too. I'm honestly considering starting again in Unity/F# though so I can rewrite the octree code from scratch.
It depends entirely on how efficient your octree is to traverse. Octrees are pretty well suited to ray tests, but for realtime rendering you need a lot, so let's rough out some conservative numbers:
1280*720 pixels = 921600 rays
30fps * 921600 rays = 27648000 rays per second
1/27648000 = 3.616*10-6 seconds per ray = 36.18 nanoseconds per ray
If your CPU is 4GHz, that's about 144 cycles per ray.

You should be able to do some tests on a sample scene to see how fast your raytracing is. You might be able to do much better on the GPU with sufficiently clever algorithms, though you'll need to take care to keep world state consistent with main memory. You might be able to cheat with clever sampling algorithms, but no matter what you do you're going to have really bad aliasing of distant geometry.

supermikhail
Nov 17, 2012


"It's video games, Scully."
Video games?"
"He enlists the help of strangers to make his perfect video game. When he gets bored of an idea, he murders them and moves on to the next, learning nothing in the process."
"Hmm... interesting."

dupersaurus posted:

Well, if you're idea of painterly is some combination of tacky photoshop filter and bad clone brush.

Yeah... it's not actually using the style of an artist, but more like the particular technique and palette of a drawing. Or more like the gimmick of a particular drawing. It's a fun thing, but, I'd say, of limited usefulness. Like the examples there show, why would you want a portrait executed in the same technique and palette as a landscape? Or, applied to games, everything painted like a bright sunset?

I guess you could paint a sample drawing for a particular scene, and hope the player doesn't look at it in a way that'll make the algorithm draw a particular blue shadow in bright pink.

Xerophyte
Mar 17, 2008

This space intentionally left blank
There are a lot of ways to do painterly or sketch-based NPR. Most of the painterly approaches are based on taking the regular rendering and translating it to a number of single-colored brush strokes: a simple (and also not very good) approach might be to create regularly spaced voronoi cells in screen-space and translate each sell to a single-colored stroke. Each such stroke is then in turn rendered (as quads, for instance) with a shader that does all the math to simulate a particular type of paint on a particular canvas or whatever. There's a lot of ongoing research in how to mimic a particular style and material and so on, but the basic framework has been around for 30 years or so. If you want to look at the research (and who doesn't?) then "Painterly Rendering for Animation" and "Painterly Rendering with Curved Brush Strokes of Multiple Sizes" are the seminal-ish ones from the 90s, the latter is probably what your typical photoshop filter is based on. "Customizing Painterly Rendering Styles Using Stroke Processes" was a nice newer one from a few years back. Anyhow, the problem is solved in the sense of getting an output that looks like it was painted; less solved in the sense of getting an output that looks like the painter was any good.

The problem you have in games (and also in cad, which is my field) is that you need this to work in real time and the strokes to be temporally coherent, which are two ideas that don't always play well together. What you can do for coherency is splat brush strokes spatially: convert your meshes or solid geometry to a LOD hierarchy of stroke quads in space, which in turn get shaded using some appropriately modified 3d lighting math. There are a lot of things that can go wrong in this process, especially when it comes to keeping the stroke LOD consistent and adapting appropriately to changes in lighting, specular highlights etc as the user shifts perspective, but without losing overall stroke coherency. This gets very iffy, very fast. I've linked the Dreams presentation before: they do an absolutely fantastic job of real time painterly rendering, but even they don't consider lighting and they still have detail issues with close zooms and the like.

For the specific problem of an etching with watercolors on top I believe the typical algorithmic approach would be to run some sort of edge-detection filter on the scene, rendering the edges + dark regions as a greyscale etching in an initial pass, then render the watercolors using a stroke-based method in a second pass.

Jewel
May 2, 2009

Jeeeeez.

https://twitter.com/delacian/status/698922063675969537/video/1

TheresaJayne
Jul 1, 2011

gonadic io posted:

A bit out of the blue, but what amount of raytracing is feasible in realtime? I'm making a voxel engine using voxel-octrees (i.e. 8 identical 1-width voxels get combined into a 2-width cube and so on) and have my heart set on rendering by casting a bunch of rays, marking the voxels as visible to be rendered traditionally. The idea is that it combines occlusion culling, frustum culling, and makes draw-distances more natural - things big enough will be rendered from far away and then detail smoothly increases as you go closer.

At the moment I'm rendering them all in the scene graph (JMonkeyEngine3 w/ Scala) and it's not even a bottleneck but I kind of just want to try the algorithm out.

Obviously octrees lose a lot compared to traditional chunks-of-3D-arrays if the world is inhomogeneous enough but in my experience minecraft-likes have huge swathes of open air and flatish group so I'm hoping it works.

Any suggestions/comments? My code so far is https://github.com/djmcgill/CPU

The octree is implemented, and most of a job system where workers place and remove blocks as directed is implemented too. I'm honestly considering starting again in Unity/F# though so I can rewrite the octree code from scratch.

i dont know about ray tracing, but take a look at opensubdiv, Pixar released it 4years ago but i still havent seen it in use in a Game - The concept is that you can use GPU to increase the surface details in real time..

3D design packages are using it but no one has yet thought to use it in a game to speed up and increase the in world detail with subdivs.

It uses Catmull Clark subdivision,

https://www.youtube.com/watch?v=Y-3L9BOTEtw

Sininu
Jan 8, 2014

TheresaJayne posted:

i dont know about ray tracing, but take a look at opensubdiv, Pixar released it 4years ago but i still havent seen it in use in a Game - The concept is that you can use GPU to increase the surface details in real time..

3D design packages are using it but no one has yet thought to use it in a game to speed up and increase the in world detail with subdivs.

It uses Catmull Clark subdivision,

https://www.youtube.com/watch?v=Y-3L9BOTEtw

Didn't COD Ghosts use it? At least it was in marketing videos.

TheresaJayne
Jul 1, 2011

SinineSiil posted:

Didn't COD Ghosts use it? At least it was in marketing videos.

I prefer Splintercell rather than COD

Sistergodiva
Jan 3, 2006

I'm like you,
I have no shame.

https://www.youtube.com/watch?v=tfaWAELkzsI

Making particle-stuff is so much fun. It's amazing how easy it is to actually make something decent-looking with libgdx particle editor.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

dupersaurus posted:

Not to be an annoying (nonpracticing) art graduate here, but there's more to being "painterly" than making a shader to add a canvas texture and makes it look like paint strokes -- paint strokes are almost by definition unalgorithmic. The battle here is going to be won and lost in everybody's favorite things: textures and geometry. I think you're still is actually on a pretty good path (just get rid of the canvas texture). My texture artist skills are next to zero, but the path to go is probably to paint into the textures, to help the lighting out and add some variations. Look around your inspiration for all of the little variations in shading and contrast and stuff.

Not to mention, the inspiration image is an etching hand-colored with watercolors.

Not annoying at all, thanks for the ideas.

Xerophyte posted:

There are a lot of ways to do painterly or sketch-based NPR. Most of the painterly approaches are based on taking the regular rendering and translating it to a number of single-colored brush strokes: a simple (and also not very good) approach might be to create regularly spaced voronoi cells in screen-space and translate each sell to a single-colored stroke. Each such stroke is then in turn rendered (as quads, for instance) with a shader that does all the math to simulate a particular type of paint on a particular canvas or whatever. There's a lot of ongoing research in how to mimic a particular style and material and so on, but the basic framework has been around for 30 years or so. If you want to look at the research (and who doesn't?) then "Painterly Rendering for Animation" and "Painterly Rendering with Curved Brush Strokes of Multiple Sizes" are the seminal-ish ones from the 90s, the latter is probably what your typical photoshop filter is based on. "Customizing Painterly Rendering Styles Using Stroke Processes" was a nice newer one from a few years back. Anyhow, the problem is solved in the sense of getting an output that looks like it was painted; less solved in the sense of getting an output that looks like the painter was any good.

The problem you have in games (and also in cad, which is my field) is that you need this to work in real time and the strokes to be temporally coherent, which are two ideas that don't always play well together. What you can do for coherency is splat brush strokes spatially: convert your meshes or solid geometry to a LOD hierarchy of stroke quads in space, which in turn get shaded using some appropriately modified 3d lighting math. There are a lot of things that can go wrong in this process, especially when it comes to keeping the stroke LOD consistent and adapting appropriately to changes in lighting, specular highlights etc as the user shifts perspective, but without losing overall stroke coherency. This gets very iffy, very fast. I've linked the Dreams presentation before: they do an absolutely fantastic job of real time painterly rendering, but even they don't consider lighting and they still have detail issues with close zooms and the like.

For the specific problem of an etching with watercolors on top I believe the typical algorithmic approach would be to run some sort of edge-detection filter on the scene, rendering the edges + dark regions as a greyscale etching in an initial pass, then render the watercolors using a stroke-based method in a second pass.

Wow. I watched the Dreams presentation and that's super intense. Thanks a lot for the info and the suggestion at the bottom. I will post here again if I end up getting a nice step closer. Thanks again!

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Sweet Jeebus :eyepop:

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Zaphod42 posted:

Sweet Jeebus :eyepop:
She's been working on that tech for... a year? Two years? JUST on proc gen cities. It shows. :love:

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Shalinor posted:

She's been working on that tech for... a year? Two years? JUST on proc gen cities. It shows. :love:

Reminds me of the city generator that Introversion made for Subversion which got indefinitely shelved

https://www.youtube.com/watch?v=yI5YOFR1Wus

I remember that completely blowing my mind a few years ago. This one looks like it runs much faster and smoother though, and the lighting in the final version is much improved.

The buildings have much more detail too.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Zaphod42 posted:

Reminds me of the city generator that Introversion made for Subversion which got indefinitely shelved

https://www.youtube.com/watch?v=yI5YOFR1Wus

I remember that completely blowing my mind a few years ago. This one looks like it runs much faster and smoother though, and the lighting in the final version is much improved.

The buildings have much more detail too.
I'm worried the same thing is going to happen here. Her city gen tech is cool, and I gather she has a plan. Something about a top-down view, and sending runners in to buildings to do Shadowrun-esque jobs, etc, very neo-noir, I think? But she's been on JUST the buildings for so long, and this is, frankly, the least important part of that gameplay equation. So we'll see.

When you've been working on just the tech for a game so long, that you find yourself doing whole engine ports before the game proper even exists... that's a big red flag, for me.

xzzy
Mar 5, 2009

She might not even need to make a game, bundle it up into some kind of API with some sliders to dick around with and slap it on the Unity store for a few hundred bucks.

People go bonkers for procedural stuff because it translates into "I don't need to hire an artist or learn level design!" in their head. She has the most mature city generator I've come across and that should be worth some eyeballs.

DStecks
Feb 6, 2012

xzzy posted:

She might not even need to make a game, bundle it up into some kind of API with some sliders to dick around with and slap it on the Unity store for a few hundred bucks.

People go bonkers for procedural stuff because it translates into "I don't need to hire an artist or learn level design!" in their head. She has the most mature city generator I've come across and that should be worth some eyeballs.

I was thinking the exact same.

A procedural city seems like something of kinda dubious value for a game with a scale of just that city; for a GTA game it can't generate enough unique detaill, and for using the city as an overworld map you don't gain very much over just having a single city map. Unless you're making a game like a Saints Row or something where block-by-block control of the city matters, and even then you'd probably still be better off with a single well-designed city map. Unless it is some unusual thing that plays out like a board game on a city level, then it could be interesting. I could also see it having potential for a game on the scale of Civilization; you could leverage the generation system to have cities visually evolve as they develop.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

DStecks posted:

I was thinking the exact same.

A procedural city seems like something of kinda dubious value for a game with a scale of just that city; for a GTA game it can't generate enough unique detaill, and for using the city as an overworld map you don't gain very much over just having a single city map. Unless you're making a game like a Saints Row or something where block-by-block control of the city matters, and even then you'd probably still be better off with a single well-designed city map. Unless it is some unusual thing that plays out like a board game on a city level, then it could be interesting. I could also see it having potential for a game on the scale of Civilization; you could leverage the generation system to have cities visually evolve as they develop.
Imagine something like Shadowrun or Syndicate, but as a rogue-like (and possibly stripped of the actual inside-the-building tactical part), and I think you're close to what she had in mind. The city being procedural makes a ton of sense for that.

... but, as you say: for most games, it doesn't make a ton of sense. Hence, why I'm skeptical it would be of much use in an asset store. Yes, it would look cool and probably sell a handful, but no, it wouldn't be a phenomenon like "FPS Toolkit" or "NGUI". Seems like her best bet's to angle for a buyout, I just have no idea who she'd target for that.

Explosive Tampons
Jul 9, 2014

Your days are gone!!!
Dumb goon asks: how to do half decent sprite art?

I have zero art skills but it would be nice to have good sprite/bg art in my demos.

Triarii
Jun 14, 2003

DStecks posted:

I was thinking the exact same.

A procedural city seems like something of kinda dubious value for a game with a scale of just that city; for a GTA game it can't generate enough unique detaill, and for using the city as an overworld map you don't gain very much over just having a single city map. Unless you're making a game like a Saints Row or something where block-by-block control of the city matters, and even then you'd probably still be better off with a single well-designed city map. Unless it is some unusual thing that plays out like a board game on a city level, then it could be interesting. I could also see it having potential for a game on the scale of Civilization; you could leverage the generation system to have cities visually evolve as they develop.

I had a thought for a COD-style multiplayer FPS set in a procedurally generated city. It would require generating things down to the floorplans and contents of buildings (and the overall layout of the city wouldn't actually matter that much), but you'd have the game objectives constantly pushing the players to move forwards through the world. Since memorizing maps is such a big part of the skillset for most online shooters, it would pretty dramatically shake up how it plays.

DStecks
Feb 6, 2012

Triarii posted:

I had a thought for a COD-style multiplayer FPS set in a procedurally generated city. It would require generating things down to the floorplans and contents of buildings (and the overall layout of the city wouldn't actually matter that much), but you'd have the game objectives constantly pushing the players to move forwards through the world. Since memorizing maps is such a big part of the skillset for most online shooters, it would pretty dramatically shake up how it plays.

I don't want to get mean here, since this is just a random idea you're putting out there, but I have a few issues with this concept.

Number one: the debacle surrounding TF2's Hydro map basically settled that map predictability is something that online shooter players like. (If you don't play every Valve game's developer commentary you're missing out on a hugely valuable source of information. If you ask me, the TF2 developer commentary is the holy bible of multiplayer FPS design.) Number two: city scale and CoD-like are two of the most conflicting design ideas you could come up with, as I understand them, so I'm not totally sure what you mean by CoD-style. CoD only works on a small scale; unless what you're trying to do is replicate the experience of a CoD single-player campaign; that would be an interesting (but extraordinarily difficult) concept. Number three: generating a literal city for CoD-scale gameplay, with any kind of quality, is probably technologically impossible. Assassin's Creed still has the huge majority of its buildings be solid blocks for the player to climb on. Procedurally generating the world gets around simple design time being an obstacle to that, but designing a competitive FPS that involves multiple loading zones sounds like a nightmare.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I'm moving some objects around on an integer-based grid. I want to implement some 'speeds' like so:
code:
// this is init code somewhere else
speed = 0.75;
n = 0; prev = 0;

// this happens each frame
// add the speed variable and if it's the next integer value, move the character
//
// 1.5 --> 2.3 move since 2 > 1
// 3.1 --> 3.9 don't move since 3 is not > 3

	n = prev + speed;
	
	if (Math.floor(prev) < Math.floor(n)) {
		MoveCharacterOnePixel();
	}
	
	prev = n;

So if I am running 25fps, speed values of .75, .85, and then .95 give me 18.75, 21.25, 23.75 pixels moved per second (think of 100 being 100% or moving 'full speed' at 25fps)

The downside is now I need to add a 'previous' and 'next' variable to each character (which there are a whopping 4 of). Am I missing a simpler way to do this? What's a better name for the variables? I want to call them frame counter or something. Gah.

Yak Shaves Dot Com
Jan 5, 2009

Japanese Phone Box posted:

Dumb goon asks: how to do half decent sprite art?

I have zero art skills but it would be nice to have good sprite/bg art in my demos.

Pixel art?
I don't know if I should be advising, since I'm still learning myself, but Udemy has this: https://www.udemy.com/learn-to-create-pixel-art-for-your-game/
I'm not far, but it looks like the course covers things like color theory, instead of just THIS HOW YOU CLICK TOOL LIKE SUBSCRIBE

Triarii
Jun 14, 2003

DStecks posted:

I don't want to get mean here, since this is just a random idea you're putting out there, but I have a few issues with this concept.

Number one: the debacle surrounding TF2's Hydro map basically settled that map predictability is something that online shooter players like. (If you don't play every Valve game's developer commentary you're missing out on a hugely valuable source of information. If you ask me, the TF2 developer commentary is the holy bible of multiplayer FPS design.) Number two: city scale and CoD-like are two of the most conflicting design ideas you could come up with, as I understand them, so I'm not totally sure what you mean by CoD-style. CoD only works on a small scale; unless what you're trying to do is replicate the experience of a CoD single-player campaign; that would be an interesting (but extraordinarily difficult) concept. Number three: generating a literal city for CoD-scale gameplay, with any kind of quality, is probably technologically impossible. Assassin's Creed still has the huge majority of its buildings be solid blocks for the player to climb on. Procedurally generating the world gets around simple design time being an obstacle to that, but designing a competitive FPS that involves multiple loading zones sounds like a nightmare.

Putting an unpredictable map in an otherwise predictable game isn't such a hot idea, but if the game is designed around it then I think it could work much better - for example, scouting and information gathering would be important components of your success, and there would be game systems geared towards letting you do those better. Also, with the TF2 Hydro style of map, you quickly become familiar with the possible combinations of layouts, so it devolves to recognizing which configuration you're in rather than actually exploring a new space.

Regarding scale, the objectives would force the players into a small (CoD-map-sized) space at any given time, but that space would be constantly moving across the cityscape as objectives are completed, so you're always forced to figure out new areas. That's also what makes it technologically possible - the entire city doesn't need to exist in full detail at once, just the area around the players were they can actually fight. Everything outside that could just be solid block buildings, with the details to be procedurally filled in when or if the combat moves to that area.

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Japanese Phone Box posted:

Dumb goon asks: how to do half decent sprite art?

I have zero art skills but it would be nice to have good sprite/bg art in my demos.

http://forums.somethingawful.com/showthread.php?threadid=3480211

Nude
Nov 16, 2014

I have no idea what I'm doing.
So with much shame I'm crossposting this question from the other game thread. Does any one have a basic blueprint/outline on how to do a rpg esq inventory system?

The part I keep getting stuck on is this, right now all my weapons have a method called ability. Since each weapon has a unique ability I have it activate from there. The problem is I'm using unity and the abilities need access to Monobehavior. Stupidly I coded it so I could equip one weapon at a time thinking I can just make an inventory using a list.

Anyways I don't mind rewriting my system, but I need a clear cut idea/blueprint of some way of handling this data.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
What I did for inventory:

Items are their own class independent of MonoBehaviour shenanigans. They implement an interface that has callbacks for handling things like when are equipped or unequipped by a GameObject. They also have a method for turning them into GameObjects that can be dropped into the world. However, so long as I'm just monkeying around with them in storage, they are just implementations of this interface only.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Triarii posted:

Regarding scale, the objectives would force the players into a small (CoD-map-sized) space at any given time, but that space would be constantly moving across the cityscape as objectives are completed, so you're always forced to figure out new areas. That's also what makes it technologically possible - the entire city doesn't need to exist in full detail at once, just the area around the players were they can actually fight. Everything outside that could just be solid block buildings, with the details to be procedurally filled in when or if the combat moves to that area.
I was thinking about this a little more. I remember playing a bunch of Capture The Island with goons awhile ago, and the 10x10km island stuff was already pretty overwhelming. We needed vehicles to engage each other, and it was still usually small encounters that were inflated by everybody having control of squads. I'm not sure you'll get what you want even with corralling, because you have to figure out what to do if the game hits a stasis where the two teams just butt heads back and forth. If the game was balanced, which it probably should be for multiplayer fun, then you can expect this gridlock to be the norm.

Adbot
ADBOT LOVES YOU

TheresaJayne
Jul 1, 2011

Rocko Bonaparte posted:

I was thinking about this a little more. I remember playing a bunch of Capture The Island with goons awhile ago, and the 10x10km island stuff was already pretty overwhelming. We needed vehicles to engage each other, and it was still usually small encounters that were inflated by everybody having control of squads. I'm not sure you'll get what you want even with corralling, because you have to figure out what to do if the game hits a stasis where the two teams just butt heads back and forth. If the game was balanced, which it probably should be for multiplayer fun, then you can expect this gridlock to be the norm.

and that is why in most games the AI cheats

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply