ACBob / VoxelThingYeah

Voxel Game Engine
1 stars 0 forks source link

Particles! #27

Open ACBob opened 3 years ago

ACBob commented 3 years ago

Somehow I'd completely forgotten I have some stub code for a particle system.\ Always facing the camera, in a mock-modifier setup like Source:tm:.

Particle definitions handled by TOML, the code just knows when to use them;


[block.break]
# for regular particles (see explosion), there'd be a tex variable. It doesn't matter here as it is set by code.
# Also omitted: texatlas, texdiv, texatlasrand
num=125 # 5 * 5 * 5
explode=[-5,-5,-5, 5,5,5] # As a first go, launch immediately from X,Y,Z to X,Y,Z
linear=[0.0,-9.8,0.0]# Apply linearly every frame (multiplied by delta), One set of X,Y,Z means no random
collision=true

[explosion]
tex="explosion.png"
# [ [X,Y, SX, SY] ], If multiple it randomly chooses.
texatlas=[[0,0, 2,2], [0,2, 2,2], [0,2, 2,2], [2,2, 2,2]]
texdiv=8 # How many textures there are in the atlas
texatlasrand=false # If true, the U/V Is then randomised in the atlas chunk
explode=[-2,-2,-2, 2,3,2]
linear=[0.0,3.25,0.0]
collision=false
ACBob commented 3 years ago

Animated textures should be considered. Would you then specify an "animated" attribute where it would treat multiple atlas indices as frames?

ACBob commented 3 years ago

as of 47b3b22aba5ca07e2e2ec21e00d50d16ed21269a particles are implemented but are lacking the toml representation

ACBob commented 3 years ago

As good as it needs to be for alpha 1