2 registered members (AndrewAMD, juanex),
1,247
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: What are you working on?
[Re: mk_1]
#391506
01/13/12 14:07
01/13/12 14:07
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
WIP dude... Fan exploding (on ground) just a placeholder-animation sprite. Aiming angle WAS a known trigonometry issue, that is now resolved. A bit more of the games 'fake' physics is in place, but still no enemy. UPDATEDTM abuse?!? Nahhh.. Its just a demo. To hone my skills on...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: What are you working on?
[Re: ratchet]
#391551
01/13/12 19:58
01/13/12 19:58
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Finished today the loading of hmp's, (re-)saving for terrain entities and other functions for dealing with (modified) terrain entities. For accomplish the following screenshot, I do the following: - create terrain from bitmap (height values on red channel are encoding the height)
- create a lod version, in which the mesh is reduced by 95%
- load some common terrain from .hmp file
- create the same again and modify the terrain by the heightfield which I got after reducing the first terrain. Since the target terrain has more cells than the (reduced) source terrain, I bicubically interpolate the height data
- then I save the modified terrain to file and load the newly created file from hard disc as a brand new entity
(click the image to enlarge)Please note that all procedurally created / modified terrains have correct normals. And the code it is simple:
function terrainPerlin ()
{
my->scale_x = my->scale_y = my->scale_z = 0.07;
}
int main ()
{
video_mode = 11;
level_load("");
vec_set(sky_color, vector(100, 50, 25));
vec_set(camera->x, vector(0, -663, 349));
vec_set(camera->pan, vector(90, -26, 0));
// create terrain from bitmap
BMAP* bmapDonut = bmap_create("donut.bmp");
float minZ = -32, maxZ = 32; // min and max height for 0..255 grey values
float width = 140, height = 140; // x- and y-size
Hmp* hmpDonut = hmp_createfrombmap(bmapDonut, width, height, minZ, maxZ);
hmp_addskin(hmpDonut, hmp_createskin(bmapDonut, NULL, NULL, NULL));
// create entity from hmp representation
ENTITY* entDonut = hmp_entcreate(hmpDonut, vector(-300,0,0));
// create 5% lod version
float lod = 0.05; // 5% (mesh reduced by 95%)
ENTITY* entDonutReduced = hmp_entcreatelod(hmpDonut, vector(-150,0,0), lod);
// derive hmp from entity
Hmp* hmpDonutReduced = hmp_createfroment(entDonutReduced);
// load some common terrain from .hmp file
ENTITY* entPerlin = ent_create("perlin.hmp", vector(0,0,0), terrainPerlin);
// create the same again and modify terrain by
// reduced heightfield, bicubically interpolated
ENTITY* entPerlinModified = ent_create("perlin.hmp", vector(150,0,0), terrainPerlin);
hmp_entpaste(hmpDonutReduced, entPerlinModified);
// save modified terrain to file and load as new entity
hmp_entsaveto(entPerlinModified, "perlin_modified.hmp", false);
ENTITY* entPerlinModifiedLoaded = ent_create("perlin_modified.hmp", vector(300,0,0), terrainPerlin);
}
|
|
|
Re: What are you working on?
[Re: HeelX]
#391676
01/14/12 19:45
01/14/12 19:45
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
Yesterday, i started to do a commandline version of my GenesisPrecomipler, so integrating it into other IDEs should work fine. Here is it running from CodeBlocks: My Precompiler starts the LiteC compiler when no errors occured. I save the LiteC errors into the usual ackerr.txt. For some reason it only says: Error in line xy But never shows the filename where it occured o.O
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: What are you working on?
[Re: memoli]
#391777
01/15/12 20:43
01/15/12 20:43
|
Joined: Oct 2008
Posts: 15
memoli
Newbie
|
Newbie
Joined: Oct 2008
Posts: 15
|
|
|
|
|