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.


Messages - TheExDeus

511
Proposals / Re: Flipping, scaling and rotating instances
« on: August 02, 2014, 05:35:00 am »
Quote
Instead of just adding the variables to the backend which takes me like 3 seconds to do and then you all update, you want me to dick around for a couple of days adding a pre-create event?
I'm 100% certain this "adding variables to the backend" will just be rewritten in 3 months. So I am suggesting doing it extendable from the get go. Also, if you knew how Creation Code was made, then you wouldn't have much problem adding a Pre-Creation code. It doesn't even have to be an event. Like this how Create code works right now (which you didn't probably know because you added a confused comment in roomsystem.cpp line 184):
1) The gotome() in roomsystem.cpp is called to go to room.
2) Then createcode() is called in line 194.
3) That calls something like "roomcreate0" in IDE_EDIT_roomcreates.h.
4) And that calls "room_0_instancecreate_100001" in the same IDE_EDIT_roomcreates.h which has the creation code.

So what I suggest is adding "room_0_instanceprecreate_100001" with the variable changes. Then add "roomprecreate0". And then call it from roomsystem.cpp in before instance create, like in line 177. You can add all the required code in write_room_data.cpp line 191 to 218. I might even do it, though I don't want to right now.

Anyway, it was just as suggestion I feel has merit, as it allows not only adding the room options, it allows more flexibility in the future and we might even give this option to users. As some IDE's allow running a code before some other code just for configuration (usually graphical IDE's like Visual Studio). And as I pointed out it should be easy to add.

I wanna hear Josh's thoughts on this, as he might appreciate the "elegance" of that solution, although he might just as well hate it. :D

512
Developing ENIGMA / Re: Font Pixel Alignment
« on: August 01, 2014, 06:53:33 pm »
Quote
No. The purpose of padding is to prevent noise around glyph bounding rectangle edges from nearby glyphs being interpolated across those boundaries.
Yes, but in those screenshots the most noticeable thing for me is the faintness of the text. So even if it renders correctly (like number "8") it is still very faint and transparent, because it's interpolated. Lack of padding creates the problem in the first screenshot, which is what we hackishly fixed with the projection offset.

513
Programming Help / Re: Where do I find ENIGMA's API?
« on: August 01, 2014, 06:45:50 pm »
Quote
When you make a program for windows you may need to know several APIs: The API of the software you are using, Windows API, Database API, etc.
so that you can use those applications inside yours, make calls, send files, create, modify, save, delete databases, etc. ; so Enigma's API is not necesary (although it kind of is) for using LGM+ENIGMA but... If you want to call ENIGMA from another IDE and use it then you need to know ENIGMA's API.
I know what an API is, but there is no such thing as ENIGMA's API in the usual sense. LGM talks to the .dll via a plugin. I guess you could call the way they talk an API. You should look at compiler source code (\CompilerSource) and the Java plugin source (which is somewhere in Git).
No need to look into \ENIGMAsystem, it's the game engine which has nothing to do with the IDE. The .dll (\CompilerSource) is also technically not connected to the IDE. LGM sends data via the plugin and the .dll sees this data. Then it parsers, writes everything to IDE_EDIT files (which is the generated content) and then calls a makefile so C++ would compile it.

So basically you should look into the Java plugin code and then replicate that, so you know how to send data to the .dll.

Others might help you more on this than I. I have done basically 0 changes for the \CompilerSource in the years I have been here. I have only modified the .exe a little. I work on the game engine.

514
Proposals / Re: Flipping, scaling and rotating instances
« on: August 01, 2014, 06:43:44 pm »
Quote
You seem to be missing the entire point Harri, X and Y are passed in the constructor of objects to be made available in the actual create event, so the compiler must pass them that way as well. And yes the creation code order did change in Studio. However the results of my test my be inconclusive because Studio has a bug apparently where it is not saving my instance creation code, but this doesn't change the fact that image_angle must be set before the create event which therefore requires it to be passed in the constructor as X and Y are.
I'm not missing any point. I even gave you a implementation idea on how to do it the way you want it. Just add another code that will be run pre-create event. We could even allow that to be modified by the users, like the creation code, so they have more options.

515
Programming Help / Re: Where do I find ENIGMA's API?
« on: August 01, 2014, 01:26:01 pm »
What do you mean with API? API usually means using one thing inside another. ENIGMA isn't meant to be used outside ENIGMA.

516
Well without sudo you usually don't have permissions to write files and whatnot in Linux. Unless you specify those permissions with chmod or something. So I was thinking maybe LGM doesn't permission to write the log, or even the sprites.

517
Developing ENIGMA / Re: Font Pixel Alignment
« on: August 01, 2014, 04:37:50 am »
Quote
These are the results with the above changes. The following is drawn starting at full pixel passed to the draw text function and interpolation enabled, this is actually what it should look like with interpolation enabled when the font texture is not padded.
Would the padding really help here? It seems the problem is not "leaks" from nearby glyphs, it's the fact that it blurs the texture by itself. So if you padded, it would still look bad.

518
Proposals / Re: Flipping, scaling and rotating instances
« on: August 01, 2014, 04:22:08 am »
Quote
Because nobody has tested Studio to see at what point those locals are set, what if they are accessible in the create event? Then having them in instance creation certainly won't work because they won't be available, same as X, Y which are available in the create event. I'd prefer this be tested first to ensure.
Pre GM8.1 creation code was before create event. But I guess now it's the other way around. Anyway, I still recommend this way even if you have to create another creation code - the Pre-Create Event Creation Code. Because I just don't want you to hard code each changed variable, like if LGM can change rotation, color and alpha, then you just add 3 variables to the plugin, to the compiler and then to the game. That will be pain in the ass to extend and maintain. So I suggest just appending code that plugin/compiler can write.

519
Proposals / Re: Close file without closing LGM/ENIGMA
« on: August 01, 2014, 04:10:55 am »
Quote
More like what lazarus does where I can close a project without closing the ide, this because before I could open another project on enigma and it would close the one already open, but now sometimes I end up with two projects open on the project inspector one on top of the other.
That is a bug probably, as LGM doesn't have the option to have more than one project open. It seems you have a lot of bugs with LGM no one else can replicate for now. :D People with Linux should test. But you can just press "New Project" and it will reset everything.

520
Quote
I manually downloaded and still the bug persists.
Here are two more suggestions:
1) Do you recompile the .so? Like go to enigma-dev and delete compileEGMf.so, and then type make (on windows it's mingw32-make). When you update .jar's and download new code via pull, the compiler/parser .dll is usually not automatically updated. If you delete it, then it's possible it will be built the next time you run LGM. But I personally do it via terminal.
2) If 1) doesn't work, then try this LGM and plugin: https://www.dropbox.com/s/qe19dvwa7v4kbxz/workingLGM.rar
This is LGM+plugin I use and it works. I haven't updated it to the newest version egofree has made, so maybe he has created some kind of bugs.

Quote
No such directory or file, is it supossed to be on enigma-dev? should enigma generate it always? How do I make enigma generate it?
It should be created automatically and always (although I think there was an option in settings.ini to toggle, but by default it should on). The fact that it doesn't write the log files seems to be some kind of privilege problem? Do you use sudo to launch LGM?

521
Try this: https://www.dropbox.com/s/f2qne57uik51kp4/temp_sprite_test.egm
It's one sprite, added to one object (without any code) and then added to the room. When I launch it I see ENIGMA logo in the middle. It doesn't render anything to you? Graphics system is set to GL3.3 in that example. Try GL1.1 if it doesn't render.
And did you actually download newer LGM+plugin as well? Because you cannot get it by "git pull".

522
Proposals / Re: Flipping, scaling and rotating instances
« on: July 31, 2014, 04:12:21 pm »
Well the problem with "adding these properties directly to ENIGMA" is they are not actually separate properties. They really do just mean image_xscale, image_yscale, image_angle, image_alpha and so on. So those are the properties that are going to be changed anyway. Changing the plugin to export starting values for these properties separately seems impractical, as you would have to send it for all of the instances in the room. I personally don't see any negative side for the creation code method. It should be a lot easier to implement, it should allow easy expansion in the future (like if you want to change even things like default shader it is render with, it would trivial to add), and it allows overriding in the creation code itself. So you can rotate it in the room, and then still add "direction = 19;" in Instance Create Code and it will work. On the other hand if you add them as separate codes to be run, then it's basically as adding another event which is again, a waste.
So unless someone has an argument why my idea wouldn't work, then I think it's the most practical. And as I said, if you do it this way, then ENIGMA doesn't even care about those room options. They would work no matter what you add and ENIGMA wouldn't have to be changed.

523
It seems sprites are not written to the game:
Quote
Adding Sprites to Game Module:
Done writing sprites.
Finalized sprites.
0
I think it might be a format issue. As I said, save and use only EGM. Try creating a new project, add a sprite, then assign sprite to object and put object in room. Launch the game, see the sprite.

524
Off-Topic / Re: MacOS Counter-intuitive?
« on: July 31, 2014, 01:04:31 pm »
Quote
, but Macs are just high-end machines with fancy designs- get a $2999 PC and it won't be 33% faster than a $1500 PC either.
It might, because you could easily buy more ram, sli a GPU or two. Can you have 2 Titans in SLI in Mac? Can you even have Nvidia cards in a Mac? Apple themselves don't provide that. So things like CUDA for scientific stuff is off the table. That is why Mac's are not used for science, even though Apple tries to prove otherwise in their public material.

525
Off-Topic / Re: MacOS Counter-intuitive?
« on: July 31, 2014, 11:16:06 am »
Sadly Apple products are not customizable when you buy them, so I cannot compare 1:1 with a regular PC. And Apple has a "niche" in art and whatnot (diminishing though), because people don't really buy macs for office desktop or gaming. You can by a decent office PC for 400$, and a VERY decent gaming PC for 1500$, while the cheapest Mac Pro was 2999$, and no, it wasn't 33% faster. I would say you can build a performance wise comparable PC about 20% cheaper than an equivalent mac.