-
Posts
1,272 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by VeTaL
-
You're welcome: i have some experience with such algorithms, so i'm glad that i can help
-
Yep, i also think that its because of light, not because rotation This project is really large chest of code snippets, thank you very much
-
Well, okay, i hope this is the fastest solution, thanks.
-
I want to make the simplest trigger, which would be triggered as player moved far from center of the map. Which one would be the simplest? 1) calculate by Pythagoras theorem: if (sqrt( sqr (player.x - center.x) + sqr ( player.y - center.y)) > radius) then ... it is perfect for my needs, but i'm looking for more simple solution as this consist of two sqr's and one sqrt. 2) calculate by squares: if ((((player.x - center.x) * ( player.y - center.y)) / 2) > radius) then ... this is lot faster, but not too precious : (player.x - center.x) can be too large, but if ( player.y - center.y) would be too small, object would be still counted as "inside" the radius even if he would be far away. 3) add a physical sphere and trigger event when player wouldn't be inside a sphere any ideas about this?
-
Niosop, what about this project? Is it still actual for you?
-
Thats pretty good solution: i worked with the same idea in Gamestudio (just additional information): http://www.opserver.de/coni_users/web_users/pirvu/aum/aum27/english/aum27/code.html http://www.opserver.de/coni_users/web_users/pirvu/aum/aum28/english/aum28/code.html http://www.opserver.de/coni_users/web_users/pirvu/aum/aum29/english/aum29/code.html http://www.opserver.de/coni_users/web_users/pirvu/aum/aum30/english/aum30/code.html http://www.opserver.de/coni_users/web_users/pirvu/aum/aum31/english/aum31/code.html
-
Yesterday i found this topic, and i want to say that its always bad news to hear about abandoning projects. And i want to shake your hand, Tyler, for providing that code. Anyway, now i managed to launch your project with standard models with copying and renaming leadwerks assets by meaning of models names. Also, some fine stuff was found (screenshots 2 and 3 ) - texture of main character changes, depending on camera rotation. Idk, if it is because of using crawler instead of kid (nice calambur ), or its planned to work so, but this looking nice .
-
Here i am again I returned to this project some days ago, but for these days i do a lot of interesting (or sometimes not) stuff, like changing icon, adding some functionality, adding xml files with settings and so on (first post is updated). Now user can add cells in runtime and different parts of project are in different folders (for example, all cells in one folder that called TDMaps, temporary maps are in folder that called TDTempMaps ) and even more: user can re-define names of that folders from setting window, so they would be stored in XML file. Even if that XML file would be lost or corrupted, editor would generate new file automatically, you would need just re-define your new folder names. Also, i added possibility to edit only one cell, edit the whole region (4 grouped cells, with is really the most ineresting feature of this editor) and now i'm planing to add a viewer, that would provide fast viewing of cell, without loading whole editor.
-
This must be not a BIG terrain system, its can be just infinity (if random terrain generator would be added)
-
Looking nice.
-
Very-very interesting stuff, good luck.
-
Thanks for answer. About number of memory - i think, some test needed to find perfect balance between loading time and terrain size. High-map of 512 terrain weights 512Kb, High-map of 1024 terrain is 2Mb and 2048 is 8Mb... other variable is size of cells: i can create one 2048 region from 4 * 1024, or 9 * 682 (as cells can be any parts, not only 512/1024/2048), or something like that... tests are needed anyway About physics there may not be a problem: i plan just to freeze the world, load new geometry (better, if in another thread, so i would be needed to change pointer from one to another), then move dynamic objects to new coordinates(as they don't save on geometry, this looking like annoying problem, but i hope that one control function may deal this problem) and unfreeze it. This can be longer than one frame, but... i dont know the better solution. About floating point error: every time the center of the would would be near player. As new map would create, center would move to the center of new landscape. Preparing terrain cells in each frame is a good idea, but i dont think that it would works good for Leadwerks.
-
As Leadwerks doesn't allow dynamically terrain system, i decided to write own editor for that. It consists of DLL with functionality and EXE with form for view. Main idea is simple: global world (it can be very large) is separated to small terrain parts, lets call them "cells" (for now, they are 512*512 and there are only 4 cells). They can group into one "region" (for now, 4 cells with 512*512 size can be grouped into one terrain 1024*1024, that engine can load). How those cells are stored and their size is unnecessary information for all team, except maybe one programmer. So, artist just select needed region (now he may press "Generate" button), and DynTerWerks Editor generate region from 4 cells and loads new terrain in Leadwerks Editor. DynTerWerks editor now minimized and waiting, when artist would finish his work with LE Editor. When he finish editing this region, he just press Save button in Leadwerks Editor and close it, then DynTerWerks editor opens again, it split region into cells and save them, so artist can see them now in DTW Editor. DONE: DLL DLL is written on C++, so this functions can be called from the game without additional problems. v.1 - grouping RAW height-maps 512 to 1024, and 1024 to 2048. - splitting RAW height-maps 1024 to 512 and 2048 to 1024. v.2 - grouping PNG 512 to 1024. - splitting PNG 1024 to 512. /*********************************************************************************************************/ EDITOR Editor is written on C#, this would cause the faster development. v.1 - showing RAW files on the form. - generating new terrain. - loading terrain in Editor. v.2 - add dynamic cells loading: map cells must be stored in format "i@j.raw" for correct parsing. - add dynamic cells drawing (pictures are searched in folder). - add statusStrip with usefull info. - add menuStrip. - add Settings form. - add runtime cell generation. - move map files to directories. - icon changed. - save editor settings (pathes to directories with maps) to xml file. - if xml file with settings dont exist or some settings cant be read, new one is created and set all settings by defult. - user can change editor settings with Settings form. - add possibility of editing just one cell. /*********************************************************************************************************/ TODO: - add possibility to edit one region (4 cells). - fix terrain rotation problems. - add build-in viewer instead of editor (or with editor). - add DDS (or PNG) normal-map support. - add general map image zoom and movings. - add trigger in game, when new terrain may generates. - show this in game. - dynamic selection of regions with mouse in TerraDyne Editor. - add TinyXml and save project configs in XML files. - wait, till Josh would add multithread loading , so i would be able to load new region during gameplay, so player would see a large world without loads.
-
Wow... Okay, first question is solved. Now, what about random?
-
Okay, find that, but where i can change "far" value? The first question is more actual as now i can create high mountains, but i cant see all terrain. I didnt find that value in the settings.
-
As far as i know, in Newton there is a special rigid body model for terrain, so looking like you shouldn't care about form of your terrain.
-
1) when i open arctic terrain, i can see all terrain without culling, but when i open my new generated terrain, i cant see it all (see picture), only very close parts. 2) now i parse *.sbx files and i found a string id=70718968 How may i generate this ID for new terrain: just a simple random, or it depends on other factors? 3) looking like my terrain have some limits in high (i cant create high mountains like in arctic), why?
-
I'd move "threaded resource loading" to the higher priority, then scene loading. I'm working on dynamic terrain editor now, in some days i'll show it. Anyway, they both are important.
-
That would be great.
-
Yep, interesting solution.
-
MG, dont worry For now i'm the only programmer on FPS game, and second programmer on RPG game is working with CEGUI basics. Project leaders watched Leadwerks from my notebook. Josh, thats bad news... Okay, thanks, i'll try to find another project, where i can use Leadwerks.
-
Btw, is anybody need this code snippet void LookForChild( TEntity ent) { int childNum = CountChildren( ent ); TurnEntity(ent, Vec3(45,0,0)); // call here any function you want for all sub-items, but this looks funny. for( int i = 1; i <= childNum; ++i ) LookForChild( GetChild(ent, i) ); }