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 - Goombert

2221
General ENIGMA / Community Facebook
« on: October 29, 2013, 06:19:16 AM »
Polygone, Harri, everyone, I'd like to know how you guys think this should be handled. Take for instance the following post left on our Facebook.



Now, I am inclined to agree with him, the issue is do we want to allow this sort of language on a page that represents our product, or should I pull a YoYoGames? Again, my personal preference is to allow people to speak their minds, and like I said I agree with him. But again, this is not only my project, so I'd like some input from the rest of you.

2222
General ENIGMA / draw_set_color
« on: October 29, 2013, 03:18:02 AM »
Yah just a heads up everybody, Studio removed the draw_set_color function, well, the way it used to be anyway. I recently readded it the Game Maker 8.1 way with Direct3D where you can call it to change the color of a model or the alpha, but listen here is the funny thing. YoYoGames decided to store current color for every vertice, making their code redundant one would assume, and making it run slower and also making it less flexible to use, eg. drawing transparent models, when they simply could have replaced the blend operation in the FFP with HLSL. But never the less ENIGMA will continue the old expected draw_set_color behavior because it is rather useful to draw transparent models and the likes.

Code: [Select]
void draw_set_color(int col)
{
enigma::currentcolor[0] = __GETR(col);
enigma::currentcolor[1] = __GETG(col);
enigma::currentcolor[2] = __GETB(col);
    D3DCOLOR D3DColor = D3DCOLOR_RGBA(__GETR(col), __GETG(col), __GETB(col), 155);
d3ddev->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
    d3ddev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_BLENDFACTOR);
    d3ddev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    d3ddev->SetRenderState(D3DRS_BLENDFACTOR, D3DColor);
d3ddev->SetRenderState(D3DRS_TEXTUREFACTOR, D3DCOLOR_RGBA(155, 155, 155, 155));
}

Also, this means that stupid cubes demo of their's won't work right out of the box. And listen how dumb this is, here is why...
Code: [Select]
       draw_set_color(c_red);
       d3d_set_lighting(true);
       d3d_light_define_direction(0, 0.5,0,1, c_white);
       d3d_light_enable(0,true);
       
       d3d_transform_set_rotation_z( d3d.x );
       d3d_transform_add_rotation_y( d3d.x/2 );

       if( global.cube>=0 ) d3d_model_draw(global.cube, 0,0,0, -1);
       
       d3d_set_lighting(false);
       d3d_model_draw(global.wirecube,  0,0,0,  -1 );

They put draw_set_color(c_red); directly before drawing the cubes. Which doesn't even change anything in Studio since set color was stored in the model but yet it does work in ENIGMA. Which makes me wonder why the fuck that code is even their in there demo, if they were just testing it or testing if it was removed or what. But at any rate, ENIGMA will keep the easy to use expected behavior and sprite batching will render on the state change since it is simply a blend op.

2223
Yes we are the interfacing is all the same, that's the entire purpose of our project really a cross platform game engine that cuts down on all the differences in API's, etc.

Edit: Just to update everyone on this I have finally found the implementation for draw_set_color and also I have added some 2D basic shapes in the following pull request.
https://github.com/enigma-dev/enigma-dev/pull/475

The physics demo now renders perfectly, but slow, because we need a D3D version of Harri's Global VBO in the device manager.


2224
Off-Topic / Re: The truth about "Obsolete GMStudio functions
« on: October 28, 2013, 09:27:58 PM »
Four things.

One, those functions are deprecated if you try to use them Studio will usually error out the ass.

Two, this basically sounds to me like they just don't know what the fuck they are doing, because we implemented a lot of that shit to other platforms. What the fuck does taking control of a device even mean? Any sort of device managers Studio should already be in control of, otherwise how the fuck does it have retina functions and shit. This honestly sounds like 100% laziness to me.

Three, I would make it practice to never buy anything off of them ever, not just Game Maker, but any software they ever come up with.

Four, they are probably watching our site and noticing how it's catching up and doesn't deprecate these features which leads me to think this is why they are trying to recant earlier statements.

2225
General ENIGMA / Re: GLbinding
« on: October 28, 2013, 11:33:45 AM »
Push those fixes to github for the time being until I have a chance to redo that properly.

2226
Tips, Tutorials, Examples / Re: My Tutorial - need help
« on: October 28, 2013, 10:06:53 AM »
Quote
We will also need to create an invisible wall for detecting if the object falls of the screen.
Add an object and tick the solid option on it, which is generally for stationary objects.

In obj_hero add a event Collision with obj_wall and enter the code:
if (vspeed> 0) {
  move_contact_solid (270, vspeed);
}
vspeed = 0;

This way if the character hits the wall it will not fall.
Done, and I need a break again :P

2227
General ENIGMA / Re: GLbinding
« on: October 28, 2013, 10:03:24 AM »
Quote
draw_clear(0)
draw_sprite(argument0,0,0,0)
for(xx=0; xx<global.cx; xx+=1){
for(yy=0; yy<global.cy; yy+=1)
{
 height=color_get_red(draw_getpixel(xx,yy))/255*global.cz

 for(zz=0 zz<height zz+=1)
 if zz>height-3 {
  ds_grid_set(global.layer[zz],xx,yy, 1)     //grass
 } else {
  ds_grid_set(global.layer[zz],xx,yy, 2)     //stone
 }
}
}
d3d_set_hidden(true)

Also Harri this needs done to fix the Minecraft example in OpenGL3 as well, because you are batching that sprite call and the global VBO is not getting rendered on the hidden state change. But this also presents a problems such as the car racing game that draw outside the draw events and not using surfaces, but this should be fine since draw_getpixel will most likely fireoff an FBO or texture state change with glBind, so I presume that this should continue working outside the draw event and without using surfaces, it will have to or the car racing game won't work either, so I think my solution is pretty solid.


2228
Tips, Tutorials, Examples / Re: My Tutorial - need help
« on: October 28, 2013, 09:37:20 AM »
Quote
It is helpful if you already know basic highschool geometry and math, for instance the Cartesian coordinate system is used to map objects and graphics on the screen as well as calculate collision detection and make physics calculations. The character object we need to add events to handle the input  from the arrow keys and move it accordingly.

We move the object to the right using this code: x = x +3

This sets the x coordinate of the object equal to its current position in addition to 3 pixels. To move left you simply subtract from x.

For jumping we need to add a little more code than what we did for moving left or right. To move the object vertically without accounting for gravity, such as walking up a ladder you would use the following code.
if !place_free(x,y+1)
vspeed=-8;

Basically this code says that if no objects are on top of each other the vertical speed becomes -8 pixels per time step.

Now we can add an extra component, gravity, which will gradually pull the object down. You can add this code to the step event of the object.
if place_free(x+0,y+3) {
  gravity=0.25
} else {
  gravity=0
}


if (vspeed>8)
{
  vspeed=8
}

Done.

2229
Announcements / Re: Object Inheritance Implemented
« on: October 28, 2013, 09:33:01 AM »
Quote
f any of you decided to get a clue what was going on in it, you could check out the JDI branch of ENIGMA and the new templates branch of JDI and work on it.
I would, but it is the only thing you've not taking the time to explain to me, you should write a tutorial, preferably on the Wiki.

2230
General ENIGMA / Re: GLbinding
« on: October 28, 2013, 09:32:03 AM »
Quote
I did take a quick look and texture_use() itself seemed fine.
I see, but that example works fine in OpenGL 1.1 for me, just not OGL3. The device manager needs to be similar to the DirectX one, it shouldn't implement functions by unique names it should just be similar to the following.

oglmanager->glBind(...);

This way the manager can also easily be removed, anyway inside this manager is where global batching and state changing and memorization will occur, please see the following.

https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Bridges/General/DX9Device.h

This is also where common error messages should be handled, in order to reduce duplication of code even more as well.

Quote
Also, how are the matrices going?
You may go ahead and start on them but any of that will most likely get moved to the OGL manager when I write it. I am working on implementing timelines and other long forgotten features.

2231
Tips, Tutorials, Examples / Re: My Tutorial - need help
« on: October 28, 2013, 05:50:35 AM »
Ugh, I need a break fervi ^_^ I'll translate that one later.

2232
Tips, Tutorials, Examples / Re: My Tutorial - need help
« on: October 28, 2013, 05:32:00 AM »
I am going to move this since this does not fit the criteria of W.I.P. give me a minute to translate it.

Quote
2) Picking Names
It is worth noting that "my game" is just an example, or a prototype, if you will, so it is not meant to be a full blown platformer.

http://opengameart.org/content/outside-tileset

I chose this tileset because it is simple and we can quickly take advantage of it.

1) Character Control
First, we should start with the main character, draw it in Paint (I use the Pinta, but KolourPaint is also good), create a new Sprite, paste it and name the resource properly. Since resources are actually variables they should and must follow the same naming conventions, i.e. do not add weird characters or spaces, underscores are fine, and do not make the first character a number. The standard is usually prefixing sprites as spr_* and objects as obj_*, etc. It is also more sensible to name the objects and other resources what they represent such as a player object would be called obj_player, etc.

You should create an object (obj_hero) and assign an image (spr_hero), create a new room and place the instance there.

2) Movement
Each character in the game should not move, unless of course you are in a sort of spectator mode. We will move to the right, left, up and add a little bit of gravity.

Edit: Done.

2233
Tips, Tutorials, Examples / Re: My Tutorial - need help
« on: October 28, 2013, 05:09:22 AM »
Quote
Hello!

Many people like to play computer games. Some prefer platformers, some racing, FPS, MMO, etc.

But few people ever learn to program, usually because it seems to be difficult and time consuming :)

I will try to show you that creating games is quite simple and can be a lot of fun. In which you basically take the role of God in creating your own digitally interactive worlds.

First, we need to pick out a few tools to use and a game engine that will run our game. There are a lot of popular rapid application development tools for games including ENIGMA, Unity3D, and Blitz Basic.

- Game Editor
Game Editor is a simple point and click tool, which you need to know English to use. While most things can be easy to use, then you need to know which to choose. The project itself is licensed under GNU GPL and can convert a number of platforms (mostly old phones and basic free operating systems (although you can try to compile on BSD or other systems)

- Enigma - dev ( I'm going to use it )
Enigma is an intermediate program (if you can call it that) - In general, amateurs can create games as well as advanced users (of course, the more we can, the more we create miracles) , based on EDL (Enigma Development Language). In general, you can call the program a clone of Game Maker (the developers generally try to achieve compatibility)

- SandBox Game Maker (entering into deep water , resort)
Although I tried to learn it - I failed. SBGM used to create RPG, FPS and platforming games in 3D (on the Cube 2 engine), generally everything looks brilliant and as it was being mastered, it has to beat a lot of open source games  (and of high quality , something I have to play the game :P)

1 ) Planning
The first thing we should do is plan a little bit about the game. To start we will create a basic game since you are simply starting out and do not want a lot of complexity yet.

The second thing is graphics, as games require a lot of high quality art and animation. The problem here is that usually developers and coders are not very good artists and rely on others talents. Another problem is finding a suitable paint program, there are a lot of popular free ones such as Paint.net, which is preferred by ENIGMA's lead developer Robert, as well as Gimp which is available cross-platform. You can also find a lot of free graphics content on the web, You should take a look at : http://www.opengameart.org.

Audio and Video - these two are usually a big problem for indie developers without money to hire musicians and artists, you can of course use free and open source media found on many popular websites, just so long as you be careful about copyright infringement. However usually games that do have their own custom content can be a lot more appealing.

Give me a minute, still translating...

Edit: There I think that is pretty good.

2234
Function Peer Review / Re: Yoyogames Example in Enigma
« on: October 28, 2013, 03:36:09 AM »
Ok, it'll need fixed but it's not priority right now.

2235
Announcements / Re: Object Inheritance Implemented
« on: October 28, 2013, 02:53:48 AM »
TKG, I have another surprise coming in maybe a week or so for you. Also, yes persistent is already implemented, but a couple of noticed it's broke, I will fix it when I get the chance, I am working on things to get Project Mario working too.

Edit: Just to update everyone on this there was a bug causing objects to have their parent object_index. I have fixed it in the following pull request.
https://github.com/enigma-dev/enigma-dev/pull/474/files

Now I believe object inheritance is pretty solid, I am going to fix with constructs next.

Also, I'd put up the source to that game but for copyright reasons I can not.