Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - impo

Pages: 1
1
Tips, Tutorials, Examples / Vertex buffer primitives
« on: March 04, 2019, 09:14:14 pm »
here's the example https://enigma-dev.org/edc/games.php?game=80

there's scripts to generate cones, walls, blocks,importing d3d/obj models etc via vertex functions which work much faster comparing to default d3d_ ones.

there's also benchmark to compare how fast they are comparing to d3d_draw_primitive and d3d_model_draw functions. the benchmark shows that vertex_submit function works on exactly same speed if all vertices are close to camera. however, if we'll zoom out, vertex_submit becomes much faster, while d3d_functions remain distance-independent and lag just as if they were close to camera. the culling doesn't work and is reversed on all of the 3d primitives and models. matrix functions don't work as well

 the example is a bit unpolished but i don't want to spend any more time on this one

2
Tips, Tutorials, Examples / Isometric projection in 3D
« on: February 23, 2019, 07:52:05 pm »
Enigma has  few d3d functions unfamiliar to GM users, so I thought it would be useful to make an example of using undocumented EDL's d3d stuff and learn them out on the way

I started with d3d_set_projection_ortho_lookat, and  made an isometric camera projection with it (attachment1). there were few problems though. while using this function, the game still assumes that the actual coordinates of the camera remain at zero, so camera-position-dependent things like culling and fog are broken. are there ways to fix this?


for sure there are more optimal ways to render 3d scenes in isometrical projection in Enigma, however i couldn't get functions like d3d_set_perspective to work, perhaps projection matrix would work faster? what's actually the most computationally effective way in enigma to make isometric (or any other orthographic) projection in 3d?

3
Issues Help Desk / bug with data structures?
« on: February 13, 2019, 11:36:21 am »
create an object and add to Draw Event:
Code: [Select]
if (ds_list_exists(any_variable_here))
draw_text(200,200,"mylist exists")

put object on the room and try to run it. no text should be displayed

now create another object or use this one (doesn't really matter), and put this code on Create Event:
Code: [Select]
any_list_name=ds_list_create()
try to run the game again. in my case ds_list_exists returns 1 with any existing ds list in the room, regardless of whether this is the ds list I checked for existence or not. 

is this program behavior common to everyone, or is it just me? and if its common, did i use the function wrong, or is there actually a bug?

4
in game maker there's project import function that allows you to import a part of another project.

imagine we have 10 objects in project A. we then add project B with 10 objects on it.

let's say after this we created a new object, it's 21st in our A+B project.
LateralGM has no import function, however, we can still open our A+B project merged in game maker.
now, if we try to create a new object in LateralGM, it'll be 11th (LGM doesn't count new objects that we imported in GM) , and when compiled, it will accordingly refer to it as 11th, although there is already such an object in the project, so we'll get an error like this



C:/Users/enigma/AppData/Local/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h: In function 'std::__cxx11::string enigma_user::object_get_name(int)':
C:/Users/enigma/AppData/Local/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:113:7: error: duplicate case value
       case 11: return "obj11_project_b";
       ^~~~
C:/Users/enigma/AppData/Local/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:112:7: note: previously used here
       case 11: return "obj21_enigma";


so basically you won't be able to add objects. the workaround is to make 10 new objects and just delete them, so that the index of new objects is shifted. unfortunately there's no 'duplicate folder' function in LGM, and even if you select multiple objects, and duplicate them, it will only duplicate 1 object, so your best bet is to hold alt and spam insert to copy the objects, which can be pretty frustrating when you merge huge projects

5
Tips, Tutorials, Examples / looking for shaders
« on: February 11, 2019, 06:14:40 am »
it seems all of the examples on using shaders on the forum is lost now. do shaders work in enigma currently? if so, can anybody share an example of how to actually use the shaders in enigma?

Pages: 1