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 »
961
General ENIGMA / Re: All EGM's Broke
« on: December 14, 2013, 02:12:12 pm »
So that stuff like this doesn't break anything in the future we should probably just assign default values when loading. So in the LGM you just see if the EGM has the certain parameter and if not, then set it to some value (in this case I guess it's False).
962
General ENIGMA / Re: Studio vs Legacy Alpha and Color
« on: December 11, 2013, 11:39:53 am »
Simple 4 sentences and 7 swear words. Must be a bad day.
963
General ENIGMA / Re: Studio vs Legacy Alpha and Color
« on: December 10, 2013, 04:17:23 am »
We will never support several GM versions, because they are not compatible even within GM versions. So I don't think we need to replicate EVERYTHING. I might even been fine with bound color and alpha changing sprite/background functions. But I guess overloads will work fine as well.
964
Issues Help Desk / Re: Merging unfinished changes
« on: December 10, 2013, 04:13:50 am »Quote
Anyway, Harri, please tell me what happened.
Quote
Right now I can compile fine, but the exe is empty (white windows) even when I add a room (blue background by default) and objects. Someone can replicate this?Basically it almost seemed that the data from the project was not written to IDE_EDIT. But I checked and it did. So whatever the project I open and compile I still get the white window which is usually open when not even a room is present. I guess this is because of the changes done for compile directory (move from enigma-dev to appdata?)? Dunno. Maybe I just need new jar's. I used the newest ones available in the wiki links.
If anyone can upgrade to newest from scratch and not replicate my problem, then I will try something else.
965
Issues Help Desk / Re: Merging unfinished changes
« on: December 09, 2013, 11:52:06 am »
But make the test cases easy to make and add and others will make them. I am willing to write some myself. Originally there were even some special functions in EDL for them I think. But if it requires bash scripting for each case, then of course no one will write them.
So originally I think the idea was this:
1) Make ENIGMA project which has some code in it and functions to output whether a test was successful or not.
2) Make that project be compiled via CLI whenever a new git commit or pull request is made. Also run that project.
3) Watch program output and whether the project compiled - write Jenkins (or other) compatible output for web interface.
If that would of been set up it would of slowly been made. You don't need 5000 tests cases at once. Even 1 would in most cases tell you if something broke.
So originally I think the idea was this:
1) Make ENIGMA project which has some code in it and functions to output whether a test was successful or not.
2) Make that project be compiled via CLI whenever a new git commit or pull request is made. Also run that project.
3) Watch program output and whether the project compiled - write Jenkins (or other) compatible output for web interface.
If that would of been set up it would of slowly been made. You don't need 5000 tests cases at once. Even 1 would in most cases tell you if something broke.
966
Issues Help Desk / Merging unfinished changes
« on: December 09, 2013, 07:18:19 am »
It seems that all the changes now being made to object system and whatnot have broken ENIGMA. While it's something that usually happens, I don't think we should keep doing that. The guy making the changes could of just finished the whole thing and then it could be merged. Same with many other pull requests.
Although it's possible my current problem is not connected to these particular changes, but who knows. Right now I can compile fine, but the exe is empty (white windows) even when I add a room (blue background by default) and objects. Someone can replicate this?
But this bug aside, we should merge only when functional. That is why I am still waiting for those integration tests from fortevin.
Although it's possible my current problem is not connected to these particular changes, but who knows. Right now I can compile fine, but the exe is empty (white windows) even when I add a room (blue background by default) and objects. Someone can replicate this?
But this bug aside, we should merge only when functional. That is why I am still waiting for those integration tests from fortevin.
967
Issues Help Desk / Re: Raspberry Pi Compiled On....
« on: December 08, 2013, 08:35:29 am »
It doesn't work because RPI uses GLES, not GL. We don't support that for now. We moved a lot of code in our GL3 implementation to get rid of FFP (fixed function pipeline) as well as by generalizing drawing functions and that means porting to GLES should be A LOT easier. And there is no Java for ARM available for RPi as far as I know, so it uses software stuff and that means it is a lot slower.
968
Issues Help Desk / Re: Issues with scrolling logos and transitioning from rooms.
« on: December 06, 2013, 11:26:11 am »
Some major commits (especially related to Linux) have been made. Maybe try upgrading, but beware that I am not sure if the newest version is functional. I will try upgrading on my Windows machine and see if everything runs.
969
Issues Help Desk / Re: Issues with scrolling logos and transitioning from rooms.
« on: December 06, 2013, 08:51:48 am »Quote
Yet it all does, weird.It doesn't for me on Windows. As the variable is not set, then it defaults to 0, and if (0){} should not execute that sound playing. You seem to have all bunch of weird stuff going on.
Quote
Are global variables defined in the same way in ENIGMA (i.e. using "globalvar" or initializing a "global.<name>" variable with a value)?You can either use global.<name> or "global var name", globalvar is not supported as far as I know. This is because we have variables types as well (unlike GM) and so "global var" could technically be also "global int" and so on.
970
Issues Help Desk / Re: Issues with scrolling logos and transitioning from rooms.
« on: December 06, 2013, 02:41:43 am »
It seems to work for me. At the start there is the Sslaxxworks logo, then after about 2 seconds it goes to The Last Alpha room where the logo slowly goes from top to middle, while a sound is being played. I think that is what you wanted. Are you sure you end up in rm_TitleScreen in your case? Because the only explanation I would have why it's not working for you is because alarm gets broken and you don't even go to rm_TitleScreen and stay in rm_SslaxxWorks.
Also, in rm_Initer's creation code you have "obj_Logo.TitleInCenter = false" which is invalid. Obj_logo isn't created at that point and so you are assigning an unexisting variable. "Obj_logo." doesn't change the whole object, but only an instance. It usually is the last (or the first, can't remember) instance of that object created, but in rm_Initer you don't have that instance at all. It should technically scream about uninitialized variables in Debug mode, but our debugger sadly doesn't catch this right now. It just doesn't really do anything. Also in obj_Logo mouse enter you have "global.TitleInCenter" which is not actually global. So this variable is also uninitialized. If you run Debug, then this will error.
Also, in rm_Initer's creation code you have "obj_Logo.TitleInCenter = false" which is invalid. Obj_logo isn't created at that point and so you are assigning an unexisting variable. "Obj_logo." doesn't change the whole object, but only an instance. It usually is the last (or the first, can't remember) instance of that object created, but in rm_Initer you don't have that instance at all. It should technically scream about uninitialized variables in Debug mode, but our debugger sadly doesn't catch this right now. It just doesn't really do anything. Also in obj_Logo mouse enter you have "global.TitleInCenter" which is not actually global. So this variable is also uninitialized. If you run Debug, then this will error.
971
Third Party / Re: Natural GM (Alternate Cross-Platform IDE made in C++ WIP)
« on: December 04, 2013, 05:49:29 pm »
He's project is far from being finished, but he is not showing just a multiline textbox. He is (for some reason which I am not really interested in) trying to make a widget library. That is something that requires a lot of work and so even as basic as that screenshot is, it still shows a lot of work. And he also agreed that he showed it too soon. So he will make it at his own pace and when it's ready, he will release it. So he has done a lot, it's just nothing you can actually see (which is often the biggest thing in programming).
Anyway, moving on.
Anyway, moving on.
972
General ENIGMA / Re: List your main problems with ENIGMA and what you want to see added
« on: December 03, 2013, 12:39:33 pm »Quote
*Slow compile time on windowsDefine slow. I can compile an empty game in about 4 seconds. The first compile is of course slower (up to maybe 20sec), but subsequent are very fast. I of course have a good PC and ENIGMA is installed on an SSD though.
973
Developing ENIGMA / Re: GameMaker: Studio is EXTREMELY slow...
« on: December 02, 2013, 02:33:28 pm »Quote
No that was in fact why it wasn't working for me, I already knew you couldn't pack inside a float from when working on binary buffers, Josh clarified for me, IEEE does not guarantee any byte paste the first byte for floats. Which is where the union comes into play and I was finally able to resolve it now. But as for Direct3D, Direct3D not only expects it, but you have to use this for D3DCOLOR, as it is essentially a DWORD or long unsigned int. FVF requires D3DCOLOR.Correct, I was thinking float as 4 bytes, not as a type. But yes, anyway, you can still pack that in a way you could still put in vector<float>.
Quote
But without automatic indexingI was talking about draw_sprite and it didn't have automatic indexing but a manual one. I think for functions like that manual one should be faster, ergo, my example given previously.
Quote
Right, that is faster, what you think manually adding them and increasing the memory copy's 10 fold is faster?It would also work with reservations like your current code. Just without one if statement (i%2), a loop (I thought it could be unrolled, but actually I no longer think that is possible as the vector size can change, so it possibility doesn't unroll a loop even if 4 vertices are used and so requires a jmp) and possibility a simpler offset calculation.
Quote
At any rate, this is all theory, unless something is presented that actually gives better performance all around for games, I am generally uninterested.Agreed, I will try those optimizations later myself and see if it makes a difference. You shouldn't waste much time on it as it's already working quite fast.
Quote
So we got everything perfect, this system is optimal enough, let's just move on to fixing bugs with OpenGL3 batching and get the FFP into shaders and stuff now so we can get GLES working again, alrighty?Agreed. I see that you already try to use our own arrays for transformations matrices. I guess I will write a simple class for that later if you don't plan to and then we will finally be able to use shaders with the rendering.
974
Developing ENIGMA / Re: GameMaker: Studio is EXTREMELY slow...
« on: December 02, 2013, 01:33:03 pm »Quote
Oh I see, but yah people say glColorPointer is for vertex arrays but I use it anyway because it is easier than using the damn attribute functions. All it does is tell OpenGL the offset and stride, Direct3D is a lot nice with this.Attributes are not that hard to use as they are barely different from these pointers, but it's just that attributes require shaders to be used and pointer functions like glColorPointer are deprecated in GL3. So again, if we want to write it as best as possible, we will have to ditch them.
Quote
But what neither of you guessed is that OpenGL and Direct3D's FFP both expect only a 4 byte colorI know that it "can" expect that. That's what glColorPointer type argument is all about. But the fact that "The initial value is GL_FLOAT." (see http://www.opengl.org/sdk/docs/man2/xhtml/glColorPointer.xml) should give the idea that float is the most common way. Either way, as you just set "GL_UNSIGNED_BYTE" in glColorPointer type, then it will work fine. But I just realized that if attributes are used then you can still pack them just fine inside a float and also show type in glVertexAttribPointer. So basically nothing changes.
Quote
very large batches to be run through my mesh class and be converted to a single draw callBut previously it was also converted into 1 draw call. What I am saying is that you try to apply "optimizations", but those are not necessary when we already write optimized functions for sprites/backgrounds/surfaces etc. They can be applied when a user uses vertex functions, but I doubt they are necessary for when you are just drawing 1 sprite. Like this is the current draw_sprite:
Code: [Select]
void draw_sprite(int spr,int subimg, gs_scalar x, gs_scalar y)
{
get_spritev(spr2d,spr);
const int usi = subimg >= 0 ? (subimg % spr2d->subcount) : int(((enigma::object_graphics*)enigma::instance_event_iterator->inst)->image_index) % spr2d->subcount;
const float tbx = spr2d->texbordxarray[usi], tby = spr2d->texbordyarray[usi],
xvert1 = x-spr2d->xoffset, xvert2 = xvert1 + spr2d->width,
yvert1 = y-spr2d->yoffset, yvert2 = yvert1 + spr2d->height;
draw_primitive_begin_texture(pr_trianglestrip, spr2d->texturearray[usi]);
draw_vertex_texture(xvert1,yvert1,0,0);
draw_vertex_texture(xvert2,yvert1,tbx,0);
draw_vertex_texture(xvert1,yvert2, 0,tby);
draw_vertex_texture(xvert2,yvert2, tbx,tby);
draw_primitive_end();
}
draw_primitive_end(); will call d3d_model_primitive_end(); and that will call mesh->end(). Mesh->end() has this for trianglestrips (which the sprite is):Code: [Select]
case enigma_user::pr_trianglestrip:
triangleIndexedVertices.insert(triangleIndexedVertices.end(), vertices.begin(), vertices.end());
if (indices.size() > 0) {
for (std::vector<GLuint>::iterator it = indices.begin(); it != indices.end(); ++it) { *it += triangleIndexedCount; }
for (unsigned i = 0; i < indices.size() - 2; i++) {
// check for and continue if indexed triangle is degenerate, because the GPU won't render it anyway
if (indices[i] == indices[i + 1] || indices[i] == indices[i + 2] || indices[i + 1] == indices[i + 2] ) { continue; }
triangleIndices.push_back(indices[i]);
triangleIndices.push_back(indices[i+1]);
triangleIndices.push_back(indices[i+2]);
}
} else {
unsigned offset = (triangleIndexedVertices.size() - vertices.size()) / stride;
for (unsigned i = 0; i < vertices.size() / stride - 2; i++) {
if (i % 2) {
triangleIndices.push_back(offset + i + 2);
triangleIndices.push_back(offset + i + 1);
triangleIndices.push_back(offset + i);
} else {
triangleIndices.push_back(offset + i);
triangleIndices.push_back(offset + i + 1);
triangleIndices.push_back(offset + i + 2);
}
}
}
break;
As you are using draw_vertex_texture() which doesn't add indices manually, and this means that you are doing that second loop to push back indices. If you used a function which added indices as well, then it will do the first double loop to check for degenerated vertexes (which of course there are none, as sprite function is very specific that it draws a quad). And so in both cases there is useless if checks and useless loops. You should be able to populate the index buffer from draw_sprite() and reduce some of the operations used. Of course in quad case the loop will run twice, and the compiler will probably unroll it, but still. I think it would be a lot better if the operations wasn't done for stuff we can do for manually.
975
Developing ENIGMA / Re: GameMaker: Studio is EXTREMELY slow...
« on: December 01, 2013, 05:19:50 pm »Quote
Right, so it adds default color, if the VBO does not specify color, without knowing if the VBO specifies color? Wtf harri?It knows that you specify color. That what the attributes (or previously glColorPointer (which you still use)) are for. You specify what and in what order you have in vertex buffer. If you don't specify color in that buffer (don't enable GL_COLOR_ARRAY), then it knows that it must use the bound color. You cannot enable/disable it between vertices. So it's all or nothing.
Quote
Yes, but you have no idea how much slower that isI doubt that is much slower, as that is the standard way to do this (as you cannot specify a format like that using glColorPointer). You may also sacrifices precision, but if we have 255 values for each, then I guess 4bytes should pack it fine. This packing would be possible if you used attributes and shaders. Then you could send a custom attribute (packed float) to fragment shader and draw with specified color. The problem though, would be that you would have to unpack them anyway (as you cannot specify 1 float as color in fragment shader). So you sacrifice a little bit of shader speed for a smaller data bandwidth. Benchmarks would have to be conducted to see which is in fact faster.
Quote
Because the mesh classes as optimal as they are, are REALLY slow for something very very small, which happens in the case of the circle example where batch flushes are frequent.I don't get why that "optimization" has to be done outside model and primitive functions? Like doing some optimization for draw_sprite which is just a quad is of course slow. In this case the previous method of just pushing an array into a vector works a lot better. I have looked at the code a little and I am a little confused about your current way works. I will look further and run with a debugger, because now it seems it would just draw stuff 1 by 1.
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 »