Questions tagged [procedural]

Procedural programming is a term used to denote the way in which a computer programmer writes a program. This method of developing software, which also is called an application, revolves around keeping code as concise as possible. It also focuses on a very specific end result to be achieved. When it is mandatory that a program complete certain steps to achieve specific results, the code is said to have been written according to procedural programming.

Procedural programming is not always the preferred method of coding applications. Software that is highly complex can require literally thousands of lines of code, making it somewhat more difficult for a team of people to work with it. Some programmers hold the opinion that extremely large applications can become difficult to maintain even by one developer.

Some people wrongly believe that it is impossible to write very large or complex software in a procedural programming language. Certain programs might be more easily written using Object Oriented Programming (OOP), but this does not mean that they cannot be developed procedurally. The Linux kernel, which is the core of an open-source operating system, is written using procedural programming. Other major applications such as the Apache server, the Drupal content management system and Samba, are all written in this manner. These applications are large and are considered to be complex by the overwhelming majority of programmers.

Among the procedural programming languages in existence are C, Fortran and Python. Many important applications and utilities have been coded in such languages. For example, Anaconda, the installer for Fedora Linux, is written in Python, as are various software managements tools.

Imperative programming is another term used to signify this type of development.

187 questions
2
votes
1 answer

How to render a building using Three.js extrusion method?

I'm trying to render a 3D building procedurally using Three.js. One of the ways this is done is by extruding a square/rectangle. See Fig. 19 here: http://www.gamesitb.com/SurveyProcedural.pdf I've looked at the Three.js documentation for the…
Webgldev
  • 23
  • 1
  • 3
2
votes
1 answer

How to improve performance while generating (extruding) mesh in unity3d on iOS?

I'm going to make a game similar to AudioSurf for iOS, and implement in it "generate of route to certain parameters". I used the example of Extrude Mesh from Unity Procedural Example and this answer on question - link But in iOS there is…
Jeronima
  • 29
  • 4
1
vote
1 answer

Proper density functions for Voxel-based terrains?

I've managed to implement the Marching Cubes algorithm in C#. Up to now I've tried the algorithm to render a sphere. That's an easy one because the density function is not very complex to code. But now I want to get the algorithm to go further and…
user32004
  • 2,203
  • 3
  • 17
  • 17
1
vote
3 answers

Generating rolling hills of different height and width like Tiny Wings?

How can I generate rolling hills of different height and width like Tiny Wings? Right now I'm using sin() but it obviously generates uniform hills repeating forever and ever. What's the secret? Thanks!
Bruce
  • 13
  • 3
1
vote
1 answer

Procedural instantiation of a class - how to?

Let's assume I have a class Object with one method which simply reports the ID number of the instance. Normally, I would hardcode the instantiation of the Object class like "Object obj_1" and the calling of the method like "obj_1.report" My…
dtech
  • 47,916
  • 17
  • 112
  • 190
1
vote
2 answers

How to pivot in bigQuery using PIVOT?

I am trying to pull rows as columns in bigquery. This is how my data looks like now: This is how I want my data to look like: PS: While I have shown only 3 values in column SUB_CLASS_DESC actual count is in 100s. Hence, I am looking to use…
Scott Grammilo
  • 1,229
  • 4
  • 16
  • 37
1
vote
2 answers

AS3 3D terrain texture generation: Looking for intermediate/advanced ideas

I have been bashing away at Away3D for AS3, and have made a little terrain generator, using Perlin Noise to create a heightmap, and then for texturing, to splice together 5 images (very generic noise based water, beach, grass, rock & snow) depending…
Assembler
  • 794
  • 1
  • 8
  • 24
1
vote
1 answer

Apply mesh color or mesh color32 and render it for procedural generation

I am here cause I have a problem with my project. Actually I want to create an unicolor cube named voxel. I have created 6 quads for building a cube and there's the result: My fabulous cube with no texture or color During this creation, I give to my…
Norime
  • 13
  • 4
1
vote
1 answer

How do I reference the width of a sprite in C#?

I'm currently working in Unity for the first time. I'm trying to create platformer levels procedurally. I found some resources that helped me put together a pretty simple algorithm to accomplish this, but visually, it's a bit lacking. I'm using a…
user2669412
  • 35
  • 1
  • 6
1
vote
0 answers

How to create procedural array map (using arrays for tile maps)

I have a game, (published BTW its here at https://juniorcpc.itch.io/dungeon-game and the download file for the code is there too), and it uses arrays to create tile maps. (0-4 numbers represent different tiles) The problem is i can only create maps…
Kyl Bar
  • 29
  • 3
1
vote
0 answers

Ideas of procedural algorithms for generating a grid-based town

Hope you're alright. For the last two weeks, I'm trying to find one algorithm for generating procedural cities/towns on a grid system. I'm more focused on the road network than buildings, nature etc. I've tried L-System (following this tutorial…
1
vote
1 answer

How to procedurally generate pixel art from pre draw assets?

I want to design a load of pixel art crabs (crabs are just an example) in different colours with different backgrounds, claws, gloves, eyes etc. The way I envision it is that I would draw multiple assets that a program will stick together randomly…
1
vote
1 answer

Issue in procedural tree generator. C# Unity

I am currently working on a procedural terrain generator and I have come to an issue when procedurally spawning trees in my scene. Unity gives me one error but I don't really know how to go about fixing this issue. Here is the code for my world…
1
vote
1 answer

Best way to create a 2d top down race track procedurally

I am attempting to create a 2d top-down car racing game. This game will have a random road map each time the player plays the game. I have thought about doing this in two different ways: A tilemap, or just generate the roads by placing different…
Wp3Dev
  • 2,001
  • 7
  • 38
  • 54
1
vote
0 answers

C# My maze generator can't seem to handle blocks with three open sides

I'm trying to make a maze generator in C#. None of the cells are ever set to CLOSED_TOP, CLOSED_BOTTOM, CLOSED_LEFT, CLOSED_RIGHT, or OPEN even when they do go down that new path. I'm implementing a DFS algorithm for generating the maze: Pick any…