Jump to content

  • Log In with Google      Sign In   
  • Create Account

JTippetts

Member Since 04 Jul 2003
Offline Last Active Today, 05:22 PM

#5299914 Linux for game development

Posted by JTippetts on 09 July 2016 - 04:54 PM

I recommend you grab a Live CD or USB boot of some different distros to find one you like. I'm currently using Linux Mint with the Cinnamon desktop, but in the past I've used many other different distros. Although it's easy to get confused, given the number of different distros available, it's helpful to remember that many of them work the same way. Anything based on Debian, for example (Ubuntu, Mint, etc...) is going to be centered around the same basic tools for package management, as is anything based on Red Hat. You've got a few different choices for the actual presentation of the desktop, such as Gnome, KDE, Cinnamon, etc... But ultimately, they all basically work the same.

I'd second Bregma's advice for Fedora, Ubuntu or Mint, with a slight personal preferential lean toward Ubuntu and Mint rather than Fedora. You can read about creating a live bootable USB for Ubuntu at http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu and a live USB for Mint at https://community.linuxmint.com/tutorial/view/744


#5298493 Help me (learn to) develop open environments

Posted by JTippetts on 28 June 2016 - 11:34 PM

This is where having the proper tools can help immensely. Creating a natural environment purely by hand can be somewhat difficult. You can ease your task immensely by incorporating procedural methods into your pipeline. Procedural methods can provide a way to quickly fill in natural detail, giving you a base to work from, after which you use other editing tools to tweak the environment.

You didn't say what your development environment and/or engine was going to be. Typically, the engine will provide some sort of Terrain component to be used in-game, and that component will typically make use of a heightmap texture, or an image that represents elevation to be applied to the subdivided plane of the world. For example, if you are using Unity, the Unity engine provides a Terrain object that uses a heightmap, and an editor to create a heightmap.

If your terrain editing tool provides access to fractal noise methods, you can use those to create a terrain base. Then you can use brushes for height editing, smoothing, terrain painting, etc... in order to further refine the heightmap. The finished heightmap can be saved as an image file, and imported by the engine for use in the game world.

As far as adding things like forests, paths, rivers and so forth, then again you can be helped immensely by having the right tools. Forests can be added using procedural methods such as fractal scattering. A noise fractal is created that delineates continuous areas, and when combined with a slope or steepness map of the terrain (ie, a layer that indicates how steep the corresponding terrain is, in order to exclude trees from spawning on steep slopes) can be used to determine the probability of a tree spawning in a given location, and populate the map correspondingly.

For rivers and paths, it can be helpful to have access to some sort of spline tool. For an example of this, here are some shots of my own work-in-progress terrain editor:

http://i.imgur.com/KsEH8DB.png
http://i.imgur.com/gZDYo7J.jpg
http://i.imgur.com/xnjGP4t.jpg

The spline tool operates by allowing the user to set a series of waypoints, which are connected together using a spline curve. Then a filter is applied to the spline to perform a function such as, in this case, smoothing a road and painting the road with a different terrain. A similar filter is used to create river beds that carve through the terrain.


#5296154 Isometric hack and slash, from scratch

Posted by JTippetts on 11 June 2016 - 07:16 PM

What is your previous experience? Those kinds of games aren't as easy as you suggest, and your success will be highly dependent on your skill level.

Given your statement about being a beginner, you've got your work cut out for you. It's likely that some people will advise you to start simpler, with Pong or something. To that I say, "pshaw." Go ahead and work on your isometric h&s.

In this day and age, there isn't much to differentiate between an isometric and other types of games. Even assuming a true orthographic projection, you still will likely use many of the same tools as you would for any number of other styles. Inity, unreal, cryengine, etc are all suitable, as are open source engines such as urho3d.

There are many questions to ask yourself. Orthographic projection (such as original diablo) or perspective third person (diablo 3, path of exile)? Tile based or freeform? Randomly generated levels or static prebuilt? Traditionally animated 2d sprite character or fully rigged 3d character models? (from personal experience, rigged 3d models are significantly preferable if you plan to do paper-doling of equipment.)

Your answers to these questions will inform your decision making. If you go a full traditional 2d route, you will want to choose an engine or a set of libraries to facilitate that. Even in 2d, you will want a framework with strong shader support, since you're probably going to want to do things that shader make simple, such as elemental halo effects.

I have written a bit about various aspects of isometric game creation in my journal (link in my sig) if you are interested in reading some stuff. As well, feel free to pm me directly if you wish. I'm always happy to help.


#5293719 Do you usually prefix your classes with the letter 'C' or something e...

Posted by JTippetts on 26 May 2016 - 10:46 PM

I still use the C prefix. Did it for many years, and I have other things to worry about than trying to change harmless old habits like that.


#5293150 How do I create tileable 3D Perlin/Simplex noise?

Posted by JTippetts on 23 May 2016 - 11:37 PM

Think I may have found a quick (not 100% correct) fix for the lines in the simplex noise. If you are using the latest code from the repo at Github (link in signature), then the fix has been pushed. If you are using older code (and your earlier link to sourceforge leads me to believe that such is the case) then you'll have to make the fix yourself. The fix is: open the noise_gen.cpp file. Find the function simplex_noise6D. Scroll through the function until you find the line that reads n+=gr*t*t*t*t; (it'll be around line 1224) and change it to n+=gr*t*t*t*t*t; Rebuild, and it should be a bit better. It seems to be better in my personal tests at least:

http://imgur.com/a/tIviS

If you still get lines, add another *t to the expression.

The lines occur because the weights for the simplex corners are being overscaled. While adding a couple points to the exponent of gr*t^4 scales the weight smaller to help correct that, it also alters the overall character of the result. It'll look a lot less sharp the higher you go.


#5293110 How do I create tileable 3D Perlin/Simplex noise?

Posted by JTippetts on 23 May 2016 - 02:41 PM

The issue with the lines is a problem inherent to the calculation of the weighting factors in the 6d implementation of simplex noise. It's been several years now, so I can no longer remember the exact details of why I was unable to find weight factors that would work correctly, but the ultimate conclusion I came to was that using standard perlin noise gave much better results than simplex at higher dimensions.

Standard noise is, for me at least, easier to extend. Simplex noise is simple enough conceptually, but the implementation gets very weird in a hurry as you add dimensions. I based my simplex generator on a python n_dimensional generator I found somewhere. The python generator exhibited the same anomalous behavior.

I would say to give standard noise a try to see if results work better for you. Meantime, I might dig back into things to see if I can work out the underlying problem this time around.


#5291721 Scripting

Posted by JTippetts on 15 May 2016 - 01:31 PM

...mostly for learning purposes

...I'm looking for a way to make it easy for the end-user to create and manipulate entities.


The second one can be quite complicated. In light of the first, it might be a better idea for you to start learning the basics of integrating a scripting language, as well as all the other things you need to learn. With experience, you might gain some useful insight into the latter one.

The actual integration of a scripting language can be complex. The highest level is a straight-across, 1 for 1 binding of your API. Somebody (I think it was Hodgman) once linked a colorful article about why that might not be the best idea, but I didn't save the link. The gist of it, though, is that languages like Lua are different beasts than C++, and if all you're going to do is a 1 for 1 API binding, you're probably better off just using C++.

To go beyond 1 for 1 binding, though, takes a little bit of engine-specific ingenuity. One engine, I use, Urho3D, implements Lua and AngelScript binding using the 1 for 1 API exposure, but they also integrate a ScriptObject component that can be added to an object. This component acts as a glue layer, passing events across the Lua/C++ or AS/C++ boundary.

Still, I suggest you spend some time playing with things, rather than trying to design something easy to use by end-users right out of the gate.


#5291651 really slow software rendering on android with SDL2

Posted by JTippetts on 14 May 2016 - 09:15 PM

I just want to know the reason why on my desktop the game runs at 50fps and the same exact code runs at 18fps on the S4.


Because comparing a desktop processor side-by-side with a mobile processor using clock frequency alone is pointless. There are a lot more complicated features of a given processor that go into its overall performance. Mobile processors are very much designed with power efficiency and low heat generation in mind. They have to be, in order for the battery to last more than 30 seconds and in order for the heat output to not burn a hole in your hand.

The desktop processor cares MUCH less about power efficiency and heat dissipation, given its mains power source and the presence of on-board heatsink and cooling fans.

The way I heard it once is that clock frequency is a lot like engine RPM. Even if a 2-cycle weed eater and a turbo-charged Chevy big block 454 are pulling the same number of RPMs, that doesn't mean they're putting out the same amount of horsepower.


#5290979 Distributing a variable [0-1] logarithmically

Posted by JTippetts on 10 May 2016 - 09:50 AM

In the book Texturing and Modeling: A Procedural Approach, one of the authors (I believe it was Perlin) provided two functions he uses to re-distribute values in the unit range:

function bias(t, b) return math.pow(t, math.log(b)/math.log(0.5)) end
function gain(t, g) if t<0.5 then return bias(1.0-g, 2.0*t)/2.0 else return 1.0-bias(1.0-g, 2.0-2.0*t)/2.0 end end
The bias function is used to push values toward one end or the other; values of b less than 0.5 push values of t nearer to 0, while a bias greater than 0.5 push the values toward 1. gain uses bias, and has the effect that if g is less than 0.5, the values are pushed toward the ends, while greater than 0.5 values are pushed toward the middle. In both these functions, 0.5 for the bias or gain factor results in the linear curve. For example:

If the linear curve looks like this:

yPwMxMI.png

then the same curve with bias(0.2) applies looks like this:

ggSo82N.png

bias(0.8) looks like:

5mMhzhR.png

gain(0.2) looks like:

GYu25Pl.png

and gain(0.8) looks like:

EFPJXyv.png

In all cases, if t is in the range 0,1 then the output will also be in the range 0,1.


#5290196 How do I create tileable 3D Perlin/Simplex noise?

Posted by JTippetts on 04 May 2016 - 09:49 PM

Some years back, when I was implementing my own higher orders of simplex, I found an implementation of N-dimensional simplex noise in Python: https://github.com/Craig-Macomber/N-dimensional-simplex-noise/blob/master/simplex.py Converting it from Python would take a little bit of work, but you could probably work it out in time.

You might be able to find more by googling for "n dimensional simplex noise". The simplest variant to convert to higher dimensions is the original Perlin noise, as it simply deals with interpolating the corners of an N-dimensional hypercube. Conceptually it's simple, but algorithmically it gets complex in an exponential fashion. You can decompose the recursive structure of standard Perlin noise into polynomial form, but the higher orders get pretty sticky. I talk about my efforts to write polynomial versions of 6D noise at http://www.gamedev.net/blog/33/entry-2254250-derivative-noise/

The code posted by vinterberg demonstrates the blending method which is the simplest method, mathematically. For basic cloud noise, it's probably suitable. However, for high-contrast functions, or functions with strongly defined patterns, it might result in blending artifacts, as this image shows:

cellular_seamless.jpg

The variant on the left uses the blending scheme. 4 areas of 2D cellular noise are generated, then blended together to create the seamless pattern. At the edges, the pattern achieves a clarity that the center lacks, due to the center being a near-equal blend of 4 different noise sets, while the edges are more strongly weighted toward one of the 4 areas. Expanded out across a grid, the pattern becomes unmistakeable:

1wJ3lJw.png

The one on the right uses 4 dimensional noise and the clifford torus mapping to generate the seamless pattern, and while the curvature of the domain space is apparent in the curvy distortion of the shapes (in standard 2D cellular noise, these shapes are convex polygons with straight edges) the overall contrast of the pattern is preserved throughout the image, as is apparent when the image is tiled:

KcbQyP4.png


#5289965 How do I create tileable 3D Perlin/Simplex noise?

Posted by JTippetts on 03 May 2016 - 04:38 PM

If you don't need it to tile in 3 dimensions, then 5-D noise can do it. If you need it to tile in 3 dimensions, then 6 D will work.

I wrote a journal entry on this topic some time back: http://www.gamedev.net/blog/33/entry-2138456-seamless-noise/

If you don't want to use higher orders of noise, then you can use the blending method, or you can use lattice wrapping, such as one of the answers in that stackexchange thred suggest. Assuming your noise is a simple, vanilla Perlin or simplex fractal, and not anything more complex than that or including domain rotations.

The Accidental Noise Library ( https://github.com/JTippetts/accidental-noise-library ) uses the 6d method, if you care to check it out. The implementation of 3D noise mapping of various seamless modes is at https://github.com/JTippetts/accidental-noise-library

Note that the seamless method using higher orders of noise operates using some interesting domain transformation (a later poster to my journal called it a Clifford torus ( https://en.wikipedia.org/wiki/Clifford_torus ); you learn something new every day ) and so it can have consequences if you are, for example, using repeating patterns as part of your pipeline. For cloud noise it works well, but the domain transformation will skew any pattern functions beyond recognition.


#5289798 Creating the game world.

Posted by JTippetts on 02 May 2016 - 05:45 PM

Okay thanx for telling me how. But for real. Im only 14 so I have time, i dont see why we shouldn't shoot for perfect. We have time. I want to figure out how to join the process to make this a more real goa because i think once we can replicate every speck of dust i most certainly think we will be able to hack into the brain at that point. Let me pitch one more way and tell me if it is at all different from what i have been saying. I want a machine that can copy evolution of everything from the beggining of that universe. Now of course it would neeed too much processing power but by computer magic i meant the concept of magic. Instead of each cell going through every process magic can replace stuff to make stuff faster. Then a magical game would be able to use that world.


a) You don't have as much time as you think you do.
b) It's difficult to perfectly simulate something that you have an imperfect understanding of. The reason scientists are still digging in the dirt and smashing particles together underground is because they still do not yet fully understand the universe, the evolution of things, or the essence of the most basic processes that drive everything we see. All that stuff you want to simulate, you have to have the math for it, and right now our models are imperfect at best.
c) If you want to simulate all the atoms in the universe, you would need enough storage to store information about all the atoms in the universe. Technically, that's impossible. You would need more atoms than are in existence to provide the computational framework.
d) If dust simulations are your thing, you could certainly model a fairly realistic simulation on a smaller scale. Can't say how interesting it would be, but you could definitely do it.
e) They're already hacking the brain.
f) Magic is not a magical answer to magically doing anything.
g) There is a philosophical theory that posits that we ARE a simulation. Theoretically, if you could simulate the behavior of each and every particle and sub-atomic particle, using a consistent set of math, you could do it one instruction at a time and though a single "frame" of universe time, for you subjectively, might take a thousand thousand thousand years, for the entities being modeled, it would be the tiniest increment of time. It's a fairly windy theory, suitable mostly for alcohol- or drug-fueled navelgazing at best, imo, and to the people outside of the simulation (assuming they live long enough to see any significant chunk of it) it's probably not all that interesting most of the time.


#5288989 directx volume terrain

Posted by JTippetts on 27 April 2016 - 02:45 PM

Wow, nice idea.  Maybe i dont have to recalculate all triangles but I still have to create dynamic buffer for each chunk :/


Probably, yes.
 

And I need to store a lot of volume data. What is the best way to increse speed? Binary files?


Well, binary files are usually more quickly loaded than text files, yes. Other than that, you'll need to profile to find where your bottlenecks are, and try to apply optimizations as needed.


#5288958 directx volume terrain

Posted by JTippetts on 27 April 2016 - 12:45 PM

You will need to recalculate triangles only when a value is changed. You can also reduce the amount of recalculation that is performed by splitting your volume up into 'chunks', where each chunk is some arbitrary dimension of cells, and running marching cubes on a per-chunk basis. Then you only need to regenerate the chunks that are actually affected by the edit, rather than the entire landscape mesh.


#5288917 directx volume terrain

Posted by JTippetts on 27 April 2016 - 08:54 AM

If you store your terrain as a 3D grid of values, then you can edit the terrain by changing the value stored at a particular location. You can generate your mesh using marching cubes, using the 3D grid as the density function. Each cell of the 3D grid would be interpreted as a corner point for a set of cubes. Editing operations could be either binary (set a particular array location to either 1 or 0) or smooth (add or subtract a small increment). Smooth editing would result in smoother mesh generation.

As for isolevel, you just pretty much determine what you want that to be when you start. Set it at, say, 0.5 and then you don't usually change that again. That's simply the arbitrarily-chosen value of where you locate your iso surface.




PARTNERS