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.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 »
31
Proposals / Re: shadowblitz16's suggestion topic for lgm and enigma
« on: February 04, 2016, 05:53:23 am »
Lets just say your crazy, as we stray off topic here.
32
Proposals / Re: shadowblitz16's suggestion topic for lgm and enigma
« on: February 03, 2016, 06:10:53 pm »
No, it looks weird in my example because the room is small. Normally you would see up to only three views (when you are in a corner) and in that case you wouldn't see the player. But I don't think we need anything special in LGM or ENIGMA for that. Just make an example where that is done.
33
Proposals / Re: shadowblitz16's suggestion topic for lgm and enigma
« on: February 03, 2016, 08:17:50 am »
No, he means seamless (i.e. no "jumping") wrapping of the world. Like so:
So the room is in the middle, but the window size is the whole image. So it is possible to see over the edges and see the world wrap. Then moving into one of those zones you would seamlessly teleport in the room in a way that you wouldn't notice. I have seen this done with views (the sides are separate views) and it can be done with surfaces.
For a space game a different approach is usually used. The Futurama "don't move the ship, but move the universe around the ship" approach. So the room can stay small (size of window) and when moving you offset the objects position instead of players ship. Downside is you cannot really place objects via room editor as the room is small. But you can do it either by random generation or by inputting coordinates. I have done this in an RPG and it worked great.
So the room is in the middle, but the window size is the whole image. So it is possible to see over the edges and see the world wrap. Then moving into one of those zones you would seamlessly teleport in the room in a way that you wouldn't notice. I have seen this done with views (the sides are separate views) and it can be done with surfaces.
For a space game a different approach is usually used. The Futurama "don't move the ship, but move the universe around the ship" approach. So the room can stay small (size of window) and when moving you offset the objects position instead of players ship. Downside is you cannot really place objects via room editor as the room is small. But you can do it either by random generation or by inputting coordinates. I have done this in an RPG and it worked great.
34
Proposals / Re: shadowblitz16's suggestion topic for lgm and enigma
« on: February 02, 2016, 12:50:43 pm »
8. He means the room wrapped seamlessly together with content within it. I have seen some tricks on how it was done in GM that probably work in ENIGMA as well. I think one involved views and tiling that, but I don't remember how easy or hard was it.
35
Proposals / Re: Palette Unlimited Shader doesn't work in LGM(Suggestion)
« on: February 01, 2016, 06:02:26 am »
I ported it, but you will need the newest ENIGMA (which can only be got trough Git). Things that needed to be changed or fixed:
1) We don't have argument_count variable in scripts, and there is no easy way to support it.
2) We don't support argument array (argument[0] instead of normally used argument0) or at least I don't think we do. It didn't trow an error, but it seemed to return wrong values.
3) I added sprite_get_uvs() which we didn't have. (https://github.com/enigma-dev/enigma-dev/commit/1924f0f1a1fb119837cb6bc5dc3d416a3d5d13ed)
4) I fixed texture_get_texel_width and texture_get_texel_height which didn't return texel size but instead texture size in pixels. (https://github.com/enigma-dev/enigma-dev/commit/81980dcf3782bb3e0ee66514ef000ee6f1a52d35)
5) I replaced window_set_title with room_current because of a conflict right now. We try to fix it here: https://github.com/enigma-dev/enigma-dev/issues/163
6) When drawing points and lines in surfaces we have 1 pixel offset compared to GM, so I had to change a few lines in the example.
7) We do texture binding in shaders differently than GM. GM gets "stage" id trough shader_get_sampler_index, but in our case it gets the uniform variable index (it's the same as using shader_get_uniform). Instead we allow any stage to be set to any sampler, so it is possible to have one code work with several shaders. So in GM code is like this:
You can download the EGM file here: https://www.dropbox.com/s/ubsjocf3wzrg33s/Palette%20Swap%20Unlimited.project.egm?dl=0
Every example in there works - basic swapping, gradual swapping (linear interpolation), outline, full fade, desaturate and even tiles. Shaders didn't need to be changed in any way (although I slightly did change one of them to be more like GL3).
Of course this example will only work in GL3 graphics system.
1) We don't have argument_count variable in scripts, and there is no easy way to support it.
2) We don't support argument array (argument[0] instead of normally used argument0) or at least I don't think we do. It didn't trow an error, but it seemed to return wrong values.
3) I added sprite_get_uvs() which we didn't have. (https://github.com/enigma-dev/enigma-dev/commit/1924f0f1a1fb119837cb6bc5dc3d416a3d5d13ed)
4) I fixed texture_get_texel_width and texture_get_texel_height which didn't return texel size but instead texture size in pixels. (https://github.com/enigma-dev/enigma-dev/commit/81980dcf3782bb3e0ee66514ef000ee6f1a52d35)
5) I replaced window_set_title with room_current because of a conflict right now. We try to fix it here: https://github.com/enigma-dev/enigma-dev/issues/163
6) When drawing points and lines in surfaces we have 1 pixel offset compared to GM, so I had to change a few lines in the example.
7) We do texture binding in shaders differently than GM. GM gets "stage" id trough shader_get_sampler_index, but in our case it gets the uniform variable index (it's the same as using shader_get_uniform). Instead we allow any stage to be set to any sampler, so it is possible to have one code work with several shaders. So in GM code is like this:
Code: (edl) [Select]
Pal_Texture = shader_get_sampler_index(shr_shader, "samplerID");
texture_set_stage(Pal_Texture, tex);
But in ENIGMA it must be this:Code: (edl) [Select]
Pal_Texture = shader_get_sampler_index(shr_shader, "samplerID");
texture_set_stage(1, tex); //Bind to stage 1
shader_set_uniform_i(Pal_Texture, 1); //Use stage 1 in shader
You can download the EGM file here: https://www.dropbox.com/s/ubsjocf3wzrg33s/Palette%20Swap%20Unlimited.project.egm?dl=0
Every example in there works - basic swapping, gradual swapping (linear interpolation), outline, full fade, desaturate and even tiles. Shaders didn't need to be changed in any way (although I slightly did change one of them to be more like GL3).
Of course this example will only work in GL3 graphics system.
36
Works in Progress / Re: Croky
« on: January 29, 2016, 07:58:54 pm »
There is a new post about progress here: http://enigma-dev.org/forums/index.php?topic=2635.0
37
General ENIGMA / Re: ENIGMA progress 28.01.2016
« on: January 29, 2016, 07:53:50 pm »Quote
Question though, how much different would things be if EDL was replaced with C++11?EDL, just like GML is quite permissive, so it depends on how you code right now. If you use GML like Pascal, then C++11 will seem foreign. Like this won't work:
Code: (edl) [Select]
t = 5
if t = 4 then
t = 0
else
t = 1
Not sure if this code actually would run as I don't code that way, but I'm sure GM allowed it. So it doesn't require semicols at end of lines, proper scoping with braces and so on. On the other hand if you code very C/C++ style anyway, then it won't be a big change. Like I code in GML and EDL like this:Code: (edl) [Select]
t = 5;
if (t == 4){
t = 0;
} else {
t = 1;
}
And this is valid C++ (except the variable needs to be declared previously). In C++11 you can do things like this:Code: (edl) [Select]
array<int,50> myInts; //Create 50 integers
myInts.fill(3); //Fill with 3's
for (auto &integer : myInts){ //Go trough all integers in array
integer += 1;
} //Now they are all 4
auto sum = 0;
auto myFunction = [&sum](auto myInt){ sum += myInt; }; //Create Lambda function - i.e. a "script" in EDL terms, but right here in the code
for_each( myInts.begin(), myInts.end(), myFunction ); //Apply that function to each of the elements
show_message(string(sum)); //This would print 200, i.e., sum of all 50 elements of integers 4
This might seem more complicated than pure EDL or GML, but it is not low-level pointer ridden C either. Like we don't need to declare variables explicitly and we can instead use "auto" in many places. Then we don't need to keep track of indexes in "for loop" and instead can iterate in a shorter way (and faster too). And in the end it is more useful for the person as well, as he actually learns C++. And if you didn't use any of the C++11 stuff then it would just be regular EDL. Like this would still work just fine, as it is also proper C++:Code: (edl) [Select]
var spr = sprite_add("sprite.png",1,0,0,0,0);
draw_sprite(spr,-1,mouse_x,mouse_y);
Quote
At this point in time, I say just switch over to C++11, enough messing around. We ship the compiler anyway, there's absolutely nothing stopping us from switching.The thing stopping me is that we still have to maintain instancing system, so at least minimal parser is required to deal with "with(){}" and dot access.
Quote
I love CSG. Why isn't this topic in Announcements?I am still trying to make a proper installer and examples. Then I will try make a large post.
Quote
As for replacing EDL: you'd have a much better time of that if you could declare local variables somewhere specific in LGM.You mean instead of the parser trying to figure it out? Previously I posted about my "Pure ENIGMA" idea that would involve the most minimal parser possible. It would allow C++11 to be used without any real restrictions (as the parser wouldn't touch it), but it would find local variables (that would have to be defined as local and there would be no "uninitialized" variables allowed) and would deal with scoping - "with()" and dot access. If we ditch pure integer id's it would be easier to achieve it and I would love to see that too for all resources, as A LOT of functions would be overloadable then.
38
General ENIGMA / ENIGMA progress 28.01.2016
« on: January 28, 2016, 09:56:05 am »Introduction
This is continuation of this topic (this was meant to be a post there, but I now understand it would be confusing). I wanted to make a new one several months ago, but didn't manage to do so. So this will show progress between July 26 2015 and today. Fixed at least 36 bugs (probably more, but depends on how you count) and added 53 functions to main ENIGMA and more than 60 in BGUI extension.Custom vertex attributes
One thing that we lacked in GL3 was custom vertex attribute data for shaders. This meant we couldn't do a lot of custom calculations and effects. GM has vertex_buffer for that and vertex_format. I decided to remove code duplication so for ENIGMA it is done trough the model interface. An example of adding a group attribute to vertex:Code: (edl) [Select]
format = vertex_format_create();
vertex_format_add(format, vertex_type_float3, glsl_get_attribute_location(shr_group_modify_per_pixel, "in_Position"));
vertex_format_add(format, vertex_type_float3, glsl_get_attribute_location(shr_group_modify_per_pixel, "in_Normal"));
vertex_format_add(format, vertex_type_float, glsl_get_attribute_location(shr_group_modify_per_pixel, "in_Group"));
model = d3d_model_create();
d3d_model_format(model , format);
d3d_model_primitive_begin( model, pr_trianglelist );
for (int i=0; i<100; i++){
//Fill with vertices like so
d3d_model_add_float3( model, i*5, 0, 0);
d3d_model_add_float3( model, 0, 0, 1);
d3d_model_add_float( model, i ); //Group
}
d3d_model_primitive_end(model);
And GLSL vertex shader:Code: (edl) [Select]
in vec3 in_Position; // (x,y,z)
in vec3 in_Normal; // (x,y,z)
in vec in_Group;
out vec4 v_Color;
void main()
{
v_Color = vec4(in_Group,0.0,0.0,1.0); //Set red color based on group
}
Now when rendered the shader will have access to in_Group attribute and will be able to use it. This useful in animation (both morph targets and skeleton animation), dynamic terrain, particle systems etc.For example, drawing groups on model and then using custom attributes to use them can be seen here:
If we also send weight (additional float) and another transformation matrix, then we can do this:
I will also try making examples to post here. Ones I have planned are morph target animation and shadowmapping.
More low level stencil buffer control
In previous update I shown stencil functions together with an example. Sadly it was a bad example and didn't show more "powerful" things you can do with it. Here is a CSG example where we do subtraction of two meshes using stencil buffers, depth buffer control and a custom shader to merge depth maps from a surface to screenbuffer.Code example:
Code: (edl) [Select]
//CSG test
d3d_transform_stack_push();
d3d_projection_stack_push();
surface_set_target(csg_buffer);
draw_clear_alpha(0,0);
d3d_transform_set_identity();
d3d_set_projection_ext(x,y,z,x+vector_x,y+vector_y,z+vector_z,0,0,1,60,view_wview[0]/view_hview[0],1,2000);
d3d_set_zwriteenable(true);
d3d_depth_clear_value(1.0);
d3d_clear_depth();
d3d_stencil_enable(true);
d3d_stencil_mask(~0);
d3d_stencil_clear_value(0);
// Draw furthest front face
d3d_set_color_mask(false,false,false,false);
d3d_stencil_enable(false);
//Draw the main object normally
d3d_set_depth_operator(rs_less);
d3d_set_culling(rs_cw);
d3d_draw_block(-1,-1,-1,1,1,1,-1,0,0);
// Count back-facing surfaces behind
d3d_stencil_enable(true);
d3d_stencil_function(rs_always, 0, ~0);
d3d_stencil_operator(rs_keep, rs_keep, rs_incr);
d3d_set_zwriteenable(false);
d3d_set_culling(rs_cw);
d3d_draw_ellipsoid(-0.5,-2,-2,0.5,2,2,-1,0,0,128);
d3d_set_zwriteenable(true);
d3d_set_depth_operator(rs_greater);
d3d_stencil_function(rs_equal, 1, ~0);
d3d_stencil_operator(rs_keep, rs_keep, rs_keep);
d3d_set_culling(rs_ccw);
d3d_draw_ellipsoid(-0.5,-2,-2,0.5,2,2,-1,0,0,128);
// Reset pixels where n != stencil
d3d_set_zwriteenable(false);
d3d_set_depth_operator(rs_less);
d3d_stencil_clear_value(0);
d3d_stencil_function(rs_always, 1, ~0);
d3d_stencil_operator(rs_keep, rs_keep, rs_replace);
d3d_draw_block(-1,-1,-1,1,1,1,-1,0,0);
d3d_stencil_function(rs_equal, 1, ~0);
d3d_stencil_operator(rs_zero, rs_zero, rs_zero);
d3d_set_depth_operator(rs_always);
d3d_set_zwriteenable(true);
d3d_set_culling(rs_none);
d3d_draw_ellipsoid(x+500,y+500,z+500,x-500,y-500,z-500,-1,0,0,32);
// Draw RGB image
d3d_set_color_mask(true,true,true,true);
d3d_stencil_enable(false);
d3d_set_depth_operator(rs_equal);
d3d_set_zwriteenable(false);
d3d_set_culling(rs_ccw);
draw_set_color(c_blue);
d3d_draw_ellipsoid(-0.5,-2,-2,0.5,2,2,-1,0,0,128);
d3d_set_culling(rs_cw);
//d3d_set_culling(rs_cw);
draw_set_color(c_red);
d3d_draw_block(-1,-1,-1,1,1,1,-1,0,0);
//Disable everything
d3d_set_color_mask(true,true,true,true);
d3d_stencil_enable(false);
d3d_set_zwriteenable(true);
d3d_set_depth_operator(rs_less);
d3d_set_culling(true);
d3d_depth_clear_value(1.0);
surface_reset_target();
d3d_transform_stack_pop();
d3d_projection_stack_pop();
And output if using two d3d_models:Textboxes
Added a textbox widget to BGUI extension. Supports unlimited and limited length (both line count and line length), non-monospaced fonts (so you can use any font you like), mouse selection as well as most keyboard functions (copy ctrl+c, paste ctrl+v, move cursor with cursor keys, select with cursor keys while holding shift etc.). It has styles for the marker as well so when you select text you can make it look how you want.Things to do:
1) Add unicode support (will be limited to the font selection you do in LGM of course).
2) More usability and bug fix changes for keyboard (some buttons like alt breaks it now).
3) Pasting multiline string into limited line textbox only partly works.
4) Make it independent of FPS using delta-time. It uses internal counters for key repeating and cursor blink, which needs to be changeable.
Fixes
-Added optimizations in BGUI - if the text of the GUI element is empty, then a lot of code is now skipped. Extra useful with parenting like adding icons to buttons, where buttons could have no title text and the icons (gui_label) wouldn't have any text either. commit-For some reason the texture atlas code threw a compile time error on GCC 4.8. Fixed that. commit
-Removed all warnings from the ENIGMA.exe source. commit
-When a glyph outside of font range was used then some functions would segfault. Now when these characters are used they will be substituted by a blank space. Note that _ext functions will not break lines on this blank space. The fixed functions are: string_width_ext, string_width_ext_line, string_width_ext_line_count, draw_text_ext, draw_text_ext_transformed, draw_text_ext_transformed_color and draw_text_ext_color. commit
-string_height_ext, string_width_ext_line and string_width_ext_line_count now properly uses get_space_width() to determine the width of space character instead of the height/3 backup. This is in case if the font actually defines a space character. commit Fixes 945
-Fixes a few warnings in lang_CPP.cpp. commit
-Added exists() to eYaml parser, so we can check if value exists.
-64bit compile mode on Windows now uses a unique directory name ("Target-platform" in .ey). This means that you can have compiled 32bit and 64bit ENIGMA in parallel. Uses the exists() to implement build-dir. If it doesn't exist the "Target-platform" is used like before, but if it is defined then it is used instead. commit
-Parser uses a lot of unsafe pointers everywhere. And it doesn't check for NULL anywhere, so there are many cases where a NULL pointer is cast to string and a segfault occurs. Here are some basic fixes in one case, but I'm sure this is where most of the problems lie. This fix made crashes somewhat fewer. commit
-Also casting is a lot better (using C++11 functions), so no need to use unsafe functions like sprintf. commit
-Changed compiler makefile so it runs from Win cmd. commit
-font_get_ functions return int instead of unsigned int. This was especially bad because of this humorous line: "unsigned(-1)". commit
-string_ ... _line functions now return 0 if the line selected doesn't actually exist. Previously it returned the length of the last valid line. commit
-Now all returns in the string_width functions are "ceil()'ed", not only the last return. I'm not sure this is correct, but Robert back in June 2014 believed they should be (a81fea0). commit
-clipboard_set_text now replaces all "\n" with "\r\n" which is required for Windows clipboard to pass newlines. commit
-If model_begin(format) is done with format = -2 (which is the default) the format will not be changed. This is useful when use several _begin and _end functions in one model. commit
-Parser now uses std::to_string() to actually implement toString. Should be a lot safer. commit
-Fixed d3d_transform_stack_disGard to be d3d_transform_stack_disCard. Same with d3d_projection_stack_discard. This seems to be a typo done many years ago, but nobody has used that function. commit
-Better errors for shader uniforms (will print its name). commit
-Speed optimizations in gsmath by loop unrolling and other things. This should speed up rendering. commit
-d3d_projection_stack functions now push and pop view_matrix as well. Without it the projection stack didn't actually work. commit
-Fixed a potential SEGFAULT with surface_getpixel_ext. commit
-gui_slider_set_value now properly checks bounds. commit
-d3d_model_get_stride returns pre-calculated stride instead of recalculation. This should be a lot faster in many cases, as this is called every time a texture batch check happens. Basically every time a draw function is used. commit
-Fixed surface error in debug mode. commit
-get_texture in GL3textures is now a macro and shows an error in debug mode. commit
-Fixed a tile bug in GL3 that meant the wrong texture is used. Screwed up rendering with tiles. Thanks to rcobra's example for finding this bug. commit
-Enabled C++11 when compiling on Linux. commit
-Matrix4::init_camera_transform (used in d3d_set_projection_ext) is now slightly faster, because matrix mult was replace with 3 dot products. commit
-Math function lerp() now uses C++11 std::fma function. It is as fast (or faster) than what was done previously, but it returns correct results when t == 1 or when x == y. commit
-Added a GM compatible overload for draw_button that lacks the border size argument and is hardcoded to size 2. commit Fixes 951
-screen_init, screen_save and screen_save_part now properly end the shape batching, so you can actually see in the output image the same things you saw on the screen. commit
-texture_set_repeat_ and texture_set_wrap_ now uses GL_CLAMP_TO_EDGE instead of GL_CLAMP in GL3, as GL_CLAMP is deprecated. commit
-Dr.Memory reports some uninitialized read's and accesses in GLSLshader structs. Fixed by initializing it. The rest of the warnings seem to be in driver. commit
-Removed d3d_depth_clear as we have d3d_clear_depth and it actually didn't clear depth. Yeah, confusing. commit
-GL3ModelStruct Clear() now check if we have anything to clear (aka, stride is not 0). Potentially an optimization, as clear() is called on every batch flush. commit
-Shader functions which change state now call batch flush. This means that if something is drawn, then uniform is changed, then drawn some more. The two drawings will be separate as intended. commit
-texture_reset() now checks if we already don't have reset texture. Doesn't seem to have broken anything and is a potential optimization (as texture_reset is also called on every batch end). commit
Added or implemented
-Added window_set_maximized() and window_get_maximized() on Windows. Not sure why they weren't implemented. Also added them for xlib, but THEY ARE NOT TESTED!!! commit-Added gui_continue_propagation() to BGUI. This allows the event propagation to continue even if it would be stopped. Like if you have a button over a window. Normally the window would not get an event, because the button is pressed. If you want the window to get the event you put "gui_continue_propagation" in the button callback. I use this
for things like double clicks on window titles. If you click once it works like regular window click, but if clicked twice the button does something different. commit
-Added gui_windows_group_update() which allows updating windows in groups. It also has a second "continueProp" argument, which allows the groups to be treated individually or together like gui_windows_update() would. They also return if the event propagation was stopped. That basically means the mouse was over a window or any widget bound to the window. Useful if you want to combine GUI with mouse events that are not tied to GUI, like RTS units shouldn't go to a waypoint if the mouse was actually clicked on a window.
Previously there wasn't an easy way to check this. commit commit
-Added window_update_mouse() which allows calling an update for mouse_x and mouse_y variables. Useful if you depend on them (like the BGUI extension does), and you need to update them in the middle of a step or draw event. For example, you have a view in which you use mouse and GUI (which isn't a view) also uses mouse. Here you must update the mouse two times instead of once like ENIGMA does by default. commit
-Added window_update() which just calls ALL the events for all instances. Note that his can cause infinite loop if called in a place like step event. But useful in alarms, one shot events or places like the resize() event. commit
-Added draw_roundrect, draw_roundrect_color, draw_roundrect_ext and draw_roundrect_ext_color. Thanks Garo for reporting. commit
-Added font_height() that returns height of the maximum character. Previously string_width("M") was required or something similar, but this is O(1) as we already have that number. commit
-Added d3d_model_add_float, d3d_model_add_float2, d3d_model_add_float3, d3d_model_add_float4 and d3d_model_add_ubyte4 for custom attributes. They are like vertex_buffer in GM, but here it is implemented as a part of model class, so there wouldn't be any code duplication. commit
-Added d3d_model_add_color, d3d_model_add_texcoord and d3d_model_add_normal. The only different from _float2 or _float3 is that they can be used without formats. That means the default shader supports them. commit
-Added vertex_format_ functions, but they are totally different from GM:S. Added vertex_format_create, vertex_format_destroy, vertex_format_exists, vertex_format_add. Removed the weird "_end returns the ID" thing because it is totally different from how the other systems work. So now we use ID's instead (with creation and destruction which GM:S doesn't allow). I didn't add vertex_format_add_color, vertex_format_add_position and so on because they don't make sense in a custom shader. vertex_format_add() is different than GM:S because the last argument is attribute to add. This can be found using glsl_get_attribute_location allowing you to use custom attributes (GM:S didn't actually allow that as far as I know). commit
-Added glsl_program_get() which returns the currently bound shader. Most useful to actually get the default shader. commit
-Added glsl_attribute_enable_all() which is used in the modelstruct and not much useful anywhere else. commit
-Added equal() function for floating point math comparisons. commit
-Added ray_sphere_intersect() function which allows raytracing with rays and spheres. Useful for collision, vertex painting and more. commit
-Added d3d_transform_get_array, d3d_transform_set_array, d3d_transform_add_array, d3d_transform_get_array, 3d_projection_set_array, d3d_projection_add_array and d3d_projection_get_array. Much easier to use in external C++ than EDL because of broken pointers in parser. But still useful. commit
-Added d3d_transform_add_rotation/d3d_transform_set_rotation which just takes the three angles. commit
-Added execute_shell and execute_program to Linux (xlib). commit
-Surfaces now have an option to have a stencil buffer, as well as readable depth buffer. For a depth buffer to readable it had to be an FBO, as Renderbuffers cannot be sampled. But then the buffer is slower, so I ended up implementing it as a choice. commit
-New function surface_get_depth_texture() to get surface depth texture if the surface has depth buffer and if its not write only. This can be used for things like shadowmapping. commit
-Added d3d_set_color_mask(r,g,b,a) function to enable/disable writing to a color channel. commit
-Added d3d_stencil_enable, d3d_stencil_clear_value, d3d_stencil_mask,d3d_stencil_clear, d3d_stencil_function and d3d_stencil_operator to have more fine grain control of stencil buffers. commit
-d3d_model_ format can now be changed with d3d_model_format. This allows the same model to be drawn with a different shader which has a different format. commit
-Added d3d_transform_set_look_at and d3d_transform_add_look_at in GL1 and GL3. This rotates an object to face a point. commit
-Added d3d_transformation_get_mv and d3d_transformation_get_mvp that returns model_view_matrix and model_view_projection_matrix respectively. Useful in cases like shadowmapping where we use projection function to set a camera and then we need MVP in a shader later. commit
-Added _duplicate_ functions to BGUI widgets. This returns an exact duplicate of the widget that can then be modified. Very useful for styles and skins. commit
-Added BGUI textbox widget consisting of 57 functions. It is a textbox with unlimited chars and lines (but can be limited in with functions). It supports mouse selection, non-uniform fonts, copy and pasting (ctrl+c and ctrl+v) and much more.
The End
This is just an update so people know that ENIGMA hasn't died. Sadly I haven't been able to compile some of the 3rd party stuff we use so I cannot make an installer now. I use ENIGMA in several of my projects (also at work) so it gets updated quite frequently, but I sadly don't have much time doing community things and uploading new installers.Some of the still long standing problems:
1) LGM is unstable on Windows. Crashes 24/7.
2) We need extracted EGM format. I use Git as version control for my projects and zipped EGM is detected as binary (even though I have tried all the diff tricks with extracted zips).
3) EDL needs to be either fixed or replaced. I want to use pure C++11 for a long time now and I believe it would be a perfect language, as you can do a lot of "auto" things and ranged loops that would make C++11 easier than EDL.
39
Ideas and Design / Re: New saving system idea
« on: January 26, 2016, 02:14:55 pm »
This has been discussed and proposed before. Basically an extracted EGM (called EGX probably) which would be GMX counterpart from GameMaker. There are is basically one issue to fix: Make room data non-binary.
After that it's the ball in LGM territory to make the loading and saving. I have pushed for this for more than a year now, as I have projects that use ENIGMA on GIT and I cannot version properly without an extracted format. I am willing to pay money for this if people actually implement this in LGM. I can make a writer/loader in C++ if needed (the CLI part).
I personally think this shouldn't be that complicated as we already have EGM format - which is a zipped file structure. EGX is the same thing without zipping. It means making EGX would require deleting parts of EGM saving/loading code and virtually no additions.
After that it's the ball in LGM territory to make the loading and saving. I have pushed for this for more than a year now, as I have projects that use ENIGMA on GIT and I cannot version properly without an extracted format. I am willing to pay money for this if people actually implement this in LGM. I can make a writer/loader in C++ if needed (the CLI part).
I personally think this shouldn't be that complicated as we already have EGM format - which is a zipped file structure. EGX is the same thing without zipping. It means making EGX would require deleting parts of EGM saving/loading code and virtually no additions.
40
Developing ENIGMA / Re: Loading Screen like Game Maker
« on: January 21, 2016, 10:57:42 am »
No. ENIGMA games usually load a lot faster than GM, so in most cases it wouldn't be needed anyway. But if you do want it then you will have to create your own - this implies external resources as well though.
I played around with the idea on how to make good and extensible loading screen, but couldn't work out some details. Everything ENIGMA renders is trough the graphics system (like OpenGL usually), this means we must have unpacked and sent to GPU at least some part of the resources (the loading screen texture and font texture) and set up the rendering context. This would mean we need to have an additional flag for resources to be loaded before the loading screen and the rest to be loaded after. And I wanted people to be able to execute their own code during the loading (like checking for updates via http or initialize some slow to startup code) - this would mean we need to execute user code, but in a limited fashion, as we don't have all of the resources loaded and most functions would break.
I played around with the idea on how to make good and extensible loading screen, but couldn't work out some details. Everything ENIGMA renders is trough the graphics system (like OpenGL usually), this means we must have unpacked and sent to GPU at least some part of the resources (the loading screen texture and font texture) and set up the rendering context. This would mean we need to have an additional flag for resources to be loaded before the loading screen and the rest to be loaded after. And I wanted people to be able to execute their own code during the loading (like checking for updates via http or initialize some slow to startup code) - this would mean we need to execute user code, but in a limited fashion, as we don't have all of the resources loaded and most functions would break.
41
General ENIGMA / Re: Is using ENIGMA to decompile an old Game Maker game legal
« on: January 21, 2016, 09:12:52 am »
ENIGMA isn't a decompiler, so it cannot decompile anything (and neither can LGM). Did you mean remaking an existing game? Or compiling from GM source? Zexas on YYG doesn't have source included, so there isn't much ENIGMA or LGM can help with.
42
Programming Help / Re: changing depth of instances.
« on: January 10, 2016, 09:57:39 am »
But are they drawn as sprites? And what draws them? One controller object which has an array to draw or is it one object instance per sprite? Because I think you should just change the depth of that block, not the character. The character must be at the same depth all the time and only change the surrounding world.
43
Programming Help / Re: changing depth of instances.
« on: January 08, 2016, 01:18:51 pm »
What is drawing the sprites? If it is an objects (like obj_wall), then you can set depth for that.
If you use tiles (that would imply backgrounds though) you could change depth for them too. Background tiles can be drawn at any depth just like when using instances so they would render correctly.
I don't know how your sprites look like (or how large they are) so it is harder for me to tell what would be messing up. I think you should just put foreground and ground in front of the player and background and walls (left and right) behind it.
If you use tiles (that would imply backgrounds though) you could change depth for them too. Background tiles can be drawn at any depth just like when using instances so they would render correctly.
I don't know how your sprites look like (or how large they are) so it is harder for me to tell what would be messing up. I think you should just put foreground and ground in front of the player and background and walls (left and right) behind it.
44
Programming Help / Re: Getting min and max of variables without min and max.
« on: December 29, 2015, 07:26:37 pm »
Yes, argument0,1,2 etc. are local script variables, so they don't have any problem.
45
Programming Help / Re: Getting min and max of variables without min and max.
« on: December 25, 2015, 05:39:53 pm »
If that is the parser bug, then you cannot use instance local variables. You can create temporary variables (like "var thsp" or "double thsp") and use that, or you can just use fmin() and fmax() which will work (and be even faster) with two variables. The problem why max and min is broken is because they use something called "varargs" or "variable number of arguments". This means that you can have almost unlimited number of variables in these functions (like "min(a,b,c,d,e,f,g,i,j and son)" but they are not working with instance variables because the parser has a bug. Sadly I cannot fix it without rewriting the parser and that is something I cannot realistically do.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 »