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 »
1696
Issues Help Desk / Re: Function pointers
« on: March 27, 2011, 10:40:09 am »Quote
argument0-N are global vars, not passed as parameters.You are sure? Looking at the code it seems to just call it like a function. So this is how the script looks after parsing:
Code: [Select]
variant enigma::OBJ_obj_0::scr_test(variant argument0, variant argument1, variant argument2)
{
var test, something;
test = argument0;
something = test + argument1;
return test + something;
;
return 0;
}
And this is the create event:Code: [Select]
variant enigma::OBJ_obj_0::myevent_create()
{
enigma::temp_event_scope ENIGMA_PUSH_ITERATOR_AND_VALIDATE(this);
b = scr_test(5, 1);
;
return 0;
}
So it seems that the variables are not global, but used just like in normal functions. The only bug I see is that it declares one argument too many.
1697
Issues Help Desk / Re: Function pointers
« on: March 27, 2011, 05:02:08 am »Quote
script_execute in Enigma works just like GM, doesn't it? It takes a script id, which works the same as well, along with some arguments, and calls the script with them.There is no script execute in Enigma. That is why I am asking how is this going to work (if ever). If it works exactly like in GM then I don't have any need to change anything and I have no problem with that implementation.
Quote
If you want function pointers, use actual functions, not scripts.But aren't scripts just custom functions? Calling a script is just calling a function. Every script is declared for each object that uses it, which is bad, but it still is a function. So I thought I might as well get the pointer to it and then call just like normal.
1698
Issues Help Desk / Function pointers
« on: March 26, 2011, 05:34:22 pm »
So I am using script indexes which I later call to add easy modularity to my program. So to add an element I just write something like this:
Code: [Select]
scr_element_add(spr_r,draw_resistor,"R_{index}",get_resistor_bbox,"1 /Ohm",0,"resistor rezistors R","R",0);
scr_element_add(spr_vsrc,draw_vsrc,"U_{index}",get_capacitor_bbox,"1V",0,"vsrc sprieguma voltage avots","vsrc",0);
scr_element_add(spr_isrc,draw_isrc,"I_{index}",get_capacitor_bbox,"1A",0,"isrc strava current avots","isrc",0);
draw_vsrc, for example, is the script index. Previously I didn't know GM returned script indexes when you type its name without arguments and parenthesis and previously I just used some via ass way by looping trough all scripts and finding the correct one by name. Anyway, I have something like this in the draw event:Code: [Select]
script_execute(draw_script,x,y,element_rotation,0,color,color2);
So basically to add a new element I just create a new draw script and not a new object or something like that. So the question basically is if I can do this (or will be able to) in Enigma? In C++ I can get a function pointer and then using that to execute the script/function, but a function like script_execute is not needed. So in C++ I could write something like this:Code: [Select]
draw_script(x,y,element_rotation,0,color,color2);
Will this be the case in Enigma or will there actually be script_execute function? Right now typing a script name without parenthesis just shows an error (that the script is not declared in this scope).
1699
They are all good. For good colors usually people just need contrast and all of these have it. Maybe white on black isn't such a good idea because eyes are used to be reading black on white. So bright text on dark background strain eyes more than black text on white backgrounds. So all of these can be used and in many places they are (like the new assassins creed game where many of these color combinations are used together).
Anyway, why do you ask? Do you make something absolutely awesome we should know about?
Anyway, why do you ask? Do you make something absolutely awesome we should know about?
1700
Announcements / Re: Recent Events
« on: March 22, 2011, 02:52:33 pm »Quote
fede- your post is the only one that appears without subpixel smoothing on my screen... WTF?Thats the power of images.
1701
Issues Help Desk / Re: Build mode doesn't and has never worked for me.
« on: March 22, 2011, 08:40:00 am »Quote
Josh's youtube accountWait what now?
edit: Aaa, get it now. You mean the 2008 trailer? It has been rewritten a gazillion times since. I don't think it even was in the released version.
1702
Proposals / Re: Function approval process
« on: March 13, 2011, 06:47:45 am »
Will pages like these populate automattically or we just put links in there to the finished functions? Or function names? Or what?
For example, these are finished, implemented and documented functions:
http://enigma-dev.org/docs/Wiki/Backgrounds#Functions
http://enigma-dev.org/docs/Wiki/Drawing_shapes#Functions
http://enigma-dev.org/docs/Wiki/Sprite#Functions
http://enigma-dev.org/docs/Wiki/Drawing_curves#Functions
http://enigma-dev.org/docs/Wiki/DLL#DLL_Functions
For example, these are finished, implemented and documented functions:
http://enigma-dev.org/docs/Wiki/Backgrounds#Functions
http://enigma-dev.org/docs/Wiki/Drawing_shapes#Functions
http://enigma-dev.org/docs/Wiki/Sprite#Functions
http://enigma-dev.org/docs/Wiki/Drawing_curves#Functions
http://enigma-dev.org/docs/Wiki/DLL#DLL_Functions
1703
Proposals / Re: room_speed
« on: February 28, 2011, 09:30:11 am »
room_speed doesn't work. The speed is constant to your refresh rate (you can't turn that off as well). So we need to wait until this is implemented or even benchmarks are impossible.
1704
Announcements / Re: Happenings
« on: January 30, 2011, 05:54:26 am »Quote
Surfaces were removed after R3 because no one's shitty Intel card supported them.And I don't care about intel cards. Also, I don't think there is another way in OpenGL, so either use FBO which intel cards won't be able to support or don't have surfaces in ENIGMA whatsoever (and that would suck). The game would still run on intel cards when the surface code is only included but not used right? Then I think that's the best bet, as GM's surfaces (or large backgrounds for that reason) didn't work on my Voodoo3 16mb either. So I see no reason why shitty card owners should have any saying in this. We will support directx at some point and that has some way to run surfaces on intel too (thou not on all hardware as I already stated about my voodoo).
Quote
As for the GLES folder, ask TGMG. He thought it would become necessary; we haven't seen it be so yet.GLES is OpenGL for Embedded Systems and as it doesn't support many things GL supports and so it should be in separate files. That is if you want to run ENIGMA games on phones.
1705
Function Peer Review / Re: move_towards_point
« on: January 28, 2011, 05:27:17 am »Quote
Will defining our types before using them increase the speed at all, for exampleOf course. The biggest speed increase is in for cycles like
Code: [Select]
for (int i=0; i<10000000; i++){}
will work A LOT faster thanCode: [Select]
for (i=0; i<10000000; i++){}
Quote
To get the boost will we also have to include the variable type in the if statements and other such checks when referncing the varnameNo, in c++ you have to set the type only when declaring them. When used in if checks and so on the type doesn't need to be set again. Unless you want to cast them as another type, like:
?
Code: [Select]
double d=1.23;
int i=1;
if ((int)d == i){}
Dunno if ENIGMA allows this right now, but I also never really saw the reason to do that (unless in coding in c++ where functions can take only certain types of varaibles).
1706
Proposals / Re: 2 bugged GM files
« on: January 25, 2011, 06:06:56 pm »Quote
Resource names should allow spaces in LGM, so the behavior you describe is not desired.Actually it could be desired (like showing an error). Because yeah, GM allows this too, but then assigning this resource is impossible. Like if you have "object 0" you will not be able to get the id for that object like so:
Code: [Select]
with (object 0){}
That will clearly show an error, and so maybe this should not be encouraged? On the other hand, while writing this I kind of guess that it is up to the user, and if the system allows this, then be it. On the other hand if LGM or ENIGMA should of be rewritten just to allow this, then I wouldn't see the point.
1707
Announcements / Re: Happenings
« on: January 19, 2011, 01:38:15 pm »Quote
But caN they be shoved in t he executable, you know I love shoving if the user cant fuck them up or forget to include them does it ns matterAn include system just like GM's will have to made either way, so I don't see why not. I always include my dll's inside the exe.
android phone I am using yes
1708
Announcements / Re: Happenings
« on: January 18, 2011, 08:37:13 am »
Josh, clean up the repo. Its been like two years since many of the files are not used. Might as well make the distribution a little smaller by removing thous useless files.
And if by some unknown reason you don't know what I am talking about, then one example are these GM{PutSomethingHere}.h inside OpenGL. They are whooping 77kb. Also removing useless stuff from other directories would make a much bigger difference.
And if by some unknown reason you don't know what I am talking about, then one example are these GM{PutSomethingHere}.h inside OpenGL. They are whooping 77kb. Also removing useless stuff from other directories would make a much bigger difference.
1709
Announcements / Re: Happenings
« on: January 14, 2011, 01:03:07 pm »Quote
With ENIGMA, will it be possible to create my own instance classes, such as using a specific one for projectiles so that it doesn't waste as much resources, this may mean I have to re-write parts of my engine later, though :\.I think the idea is that you will be able to remove unneeded built-in variables and so they would not be updated or used. So later it would be as simple as just unchecking some checkboxes inside object properties and they will become as simple as you want.
Quote
Will be uploading a video of my RTS engine soon, so that you can witness it .Can't wait.
1710
Announcements / Re: Happenings
« on: January 13, 2011, 03:14:44 pm »Quote
switches, surfaces and other functionsI don't think their done, even thou its "trivial shit" as Josh used to say. I too guess it could take him like 3h to get all this done, but he is just lazy as hell, and I am new to C++ (and never be anything more, as I think its dreadful). All I can do is some drawing functions etc. Not whole systems like surfaces (I have tried and tried and tried again, always failing). When basic draw_surface works, then I will be able to do the rest of the surface functions thou.
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 »