Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
0

Fauxton 3D - a 2.5d Library for Game Maker Studio 2

A topic by Gizmo199 created May 28, 2021 Views: 1,002 Replies: 1
Viewing posts 1 to 2
(4 edits)

Fauxton 3D

HTML5 Demo & Download

About

Fauxton 3D is a powerful and efficient sprite stacking engine that not only makes 3D games possible in Game Maker but also INSANELY easy! There are many hurdles when attempting to do 3D rendering in Game Maker and it can be daunting trying to learn it all, but with Fauxton, I have tried to design it so that it is efficient, quick, and easy. So easy that a complete beginner to 3D can have a scene up and running in no time at all!

Testimonials

You made something super cool and inspiring! I've never been able to render a 3d scene so easily in gamemaker before
it's amazing, much easier to create rooms and objects as you want and add shader
This is simply amazing man, the best asset of this kind for gms anywhere that i can find, and ive looked for a lot of 2.5d and sprite stacking solutions

What is sprite-stacking?

From an article by Avis:

Sprite-stacking is where a voxel model is sliced into many horizontal slices, these slices are then drawn in GameMaker from the bottom to the top, with each one slightly higher. This gives the effect of a sort of 3d model in a purely 2d game

What can it do?

This engine includes plenty of functionality fully compatible with most things you might do with a standard Game Maker 2D game. Some of the things you can do in the demo include Volumetric fog, Object particle effects, Unlimited static buffers, and more! Once you initiate the engine using the function FAUXTON_START(), getting a model into a scene takes only 1 line of code fauxton_model_create() and that's it!! I tried to design this project for beginners and artists, so you can focus on your games, not learning about buffers!

Rologfos

1-bit graveyard

Website | Twitter

What you get with your FREE download:

  • .YYMPS of THIS demo
  • .YYMPS of all of the engine scripts
  • .EXE (windows) version of this demo
  • .YYZ file of this demo

UDPATE v2.2.0

GET IT HERE


v 2.2.0

Nodes

  • [ADDED] World Environment Node
  • [ADDED] Point light node
  • [ADDED] Spot light node

Functions

  • [ADDED] fauxton_buffer_set_uniform_script(buffer_name_or_id, uniform_control_script)
  • [MODIFIED] draw_sprite_3d OPTIONAL parameter 'enable_lighting'
  • [MODIFIED] draw_sprite_3d_ext OPTIONAL parameter 'enable_lighting'

Fixed

  • [FIXED] fauxton_buffer_set (Would return an error)

Lighting is here!! With Fauxton 3D you can easily add lighting to a scene by just adding an instance of WorldEnvironment and either point lights or spotlights! Fauxton supports up to 64 different spot/point lights. This can be changed, however, by going into shd_default and change all numbers in the fragment shader that are 64. Let's look at what each of these nodes contains! 

** NOTE **

If you override buffer shaders with your own you will have to calculate lighting in your new shader! It is suggested that you should duplicate the shd_default shader and its uniform script found in:

RenderPipeline 

    > pipeline_initiate() 

        > default_world_shader_set()

And then proceed to make your changes.

Fig 14

World Environment

First, we have the WorldEnvironment node. This node MUST be added to a room in order to enable lighting. There are a few options in this node under the Variable Definitions button.

Fig 15

AmbientColor

The ambient color of our scene. The ‘Shadow’ color in a sense.

SunColor

The Color of our directional light 

SunIntensity

The intensity of our directional light

SunPosition

The position of our directional light

The AmbientColor will be the color of the ‘shadows’ or rather the color of the scene facing away from the sun. Setting this to white ( $ffffff / c_white ) will make it so that the shadows are completely illuminated. 

The SunColor is the color of our scene lit from the SunPosition. The sun position is an array that contains an X, Y, and Z. These values should be between a value of -1 and 1. So for example:

[ -1, -1, 0 ]

The sun is at the TOP-LEFT corner of the room at a z of 0 (straight on)

[ 1, 1, 1 ]

The sun is at the BOTTOM-RIGHT corner of the point DOWN in z-space

Due to the fact that sprite-stacks are just a series of stacked planes on top of one another it should generally be avoided setting the sun's z-position to -1 (as you will not easily be able to see them illuminated from the bottom).

Point Lights

Point lights are SUPER easy to add-in. Once you have an instance of WorldEnvironment added to your room you can add up to 64 point or spot lights! You can find the attributes for point lights in the Variable Definitions:

z

The z position of the light

color

The Color of the light

range

The radius or ‘range’ of the light

Spot Lights

Spotlights are SUPER easy to add-in. Once you have an instance of WorldEnvironment added to your room you can add up to 64 point or spot lights! You can find the attributes for spotlights in the Variable Definitions:

z

The z position of the light

color

The Color of the light

range

The radius or ‘range’ of the light

cutoff_angle

How many degrees to cut light to (smaller = spike, larger = bowl)

angle

The x/y angle of the light (imagine this like image_angle)

z_angle

The z angle of the light (how much the light points up or down)

NEW FUNCTIONS: fauxton_buffer_set_uniform_script

This function allows you to set a custom shader uniform control script for a buffer created using fauxton_buffer_create.

Syntax:

fauxton_buffer_set_uniform_script( buffer_id_or_name, uniform_control_script);

Argument

Description

buffer_name

The name (string) or ID (index) of the buffer to set

uniform_control_script

The shader uniform control script for the buffer

Returns:

N/A

Example:

var uniform_script = function(){

    var uni = shader_get_uniform(shd_grass_sway, "time");

    shader_set_uniform_f(uni, current_time/250);

}

fauxton_buffer_create("GrassBuffer", shd_grass_sway);

fauxton_buffer_set_uniform_script(“GrassBuffer, uniform_script);

First we create a script to control our grass shader called uniform_script. We then create a buffer, set the shader to shd_grass_sway and set the uniform control script to our uniform_script.