Pages: 1 [2]
  Print  
Author Topic: Unity Technologies CEO Steps Down  (Read 2577 times)
Offline (Unknown gender) TheExDeus
Reply #15 Posted on: January 19, 2015, 11:31:57 AM

Developer
Joined: Apr 2008
Posts: 1914

View Profile
More like function-wise. So we have things like gui_button_create(x,y,w,h,text), while theirs is GUI.Button(Rect(10,10,50,50),text). Because of the differences we structure code, I couldn't do event callbacks like they do, which is something like this:
Code: [Select]
gui_button_create(x,y,w,h,text) = {
//Pressed on button code
}
Instead there is gui_button_set_callback(button, event, script), which will call a script on an event. Current events are gui_event_pressed, gui_event_released and gui_event_hover. And for now I don't support automatic layouts. When you parent an element to a window, then the child's position is just offset by the window's position. So layout the elements relative to the window and when the window moves, all of them will. The extension is supposed to be quite basic (hence the name, Basic GUI), but can do many things.

More similarities with Unity is the use of skins and styles. A skin is a combinations of styles. What I would want is a "content" thing they allow instead of just text. So it's easy to create a button with a text or a button with only an image. Or tooltips. Sadly this in our case would involve a gui_content_create() and then doing gui_button_set_content() or something similar. So because we lack the possibility to do Lambdas and we don't have a way to differentiate between different objects (the integers we pass around doesn't hold the object type), then I cannot create it much prettier.

Also, I'm not sure I will add support for keyboard navigation. That really does involve analyzing the layout and I don't really want to put time in that. I make it as I go, and when I lack a certain function I need, then I add it.
« Last Edit: January 19, 2015, 11:37:47 AM by TheExDeus » Logged
Offline (Unknown gender) The 11th plague of Egypt
Reply #16 Posted on: January 20, 2015, 05:46:40 AM
Member
Joined: Dec 2009
Posts: 285

View Profile
Sounds reasonable!

Instead of integers, you could use Enums, to make it clearer.

I still don't understand how you handle the events, beside the click.
Or how you can differentiate between left click and right click.

If I could pass a Listener reference (or list) to that constructor, that would be good.

Besides, doesn't Enigma have support for keyboard events?
You could hook that up with a reference to a keyboard object, maybe.

What I found most confusing about the Unity GUI was how difficult it was to avoid making a mess of circular dependencies.
Maybe a QT inspired signal-slot paradigm could help your case?
Logged
Offline (Unknown gender) TheExDeus
Reply #17 Posted on: January 20, 2015, 08:03:47 AM

Developer
Joined: Apr 2008
Posts: 1914

View Profile
Enums where? With integers I mean references to GUI elements, like buttons and toggles. We already determined in the other topic enums won't work there. It's just that I want "var" to be overloaded to allow types, but Josh seems to be the only one who knows how to add that. That would basically allow me to know if "0" is a sprite or if it's a button. Right now 0 is just a 0. And enums help the programmer, but here I need to know the type at runtime inside a function.

GUI elements are constantly updated when they are drawn. In this update loop I check for mouse hovers and mouse clicks, which then call specified callback scripts. So if a user writes gui_button_set_callback(but, gui_even_release, spr_my_script), then spr_my_script will be called when he released the left mouse button over the gui button.

Right now I don't differentiate between left click and right click, but I know I will have to. I just don't want to make a million events for every possible occasion, but I don't know a way how to implement this in a more user extensible way. Like right now the user can use hover event to figure out if the mouse is over a button and then test left click / right click himself. I do this for keyboard combos in my node editor. For example, this is a create event:
Code: (EDL) [Select]
button = gui_button_create(10,10,100,20,"A button");
gui_button_set_callback(button, gui_event_hover, scr_button_hover);
And then the scr_button_hover has this:
Code: (EDL) [Select]
if (mouse_check_button_pressed(mb_right){
  if (keyboard_check(vk_alt)){
    show_message("Right click while hold alt!");
  } else {
    show_message("Pressed right button without alt!");
  }
}
So the script is called every step while the mouse is over the button. Then in the script I check for keyboard events. So technically this is enough for users to have all kinds of interactions with the elements, but I don't find this particularly pretty.

And ENIGMA doesn't have a "keyboard object" where you could hook up. What ENIGMA does is update an array filled with keys every step based on Window's/iOS's/Linux's window callbacks.
Logged
Offline (Unknown gender) egofree
Reply #18 Posted on: August 08, 2017, 04:42:11 AM
Contributor
Joined: Jun 2013
Posts: 611

View Profile Email
I am using right now the latest version of Unity. It is a very powerful game's engine and if you don't make a lot of money with it, it's free ! Also the main language is c#, which is one of my favorite. They are two main tools used by professional games developers : Unity and Unreal. I heard Unity is used more for 'indie' games and Unreal for AAA games.
Considering this, Game maker prices are outdated. The only advantage of Game maker is it's a little easier to use at first. Also, before Unity 4.3, unity was made mostly for 3d games, not 2d games. If you are a beginner, and you are afraid to program a game, perhaps you will begin with game maker, but if you want to be a serious games developer, try unity.

Edit: It's true also that if you make a 2d games, you have in unity to take into account some problems (c.f https://blogs.unity3d.com/2015/06/19/pixel-perfect-2d/), which are not present in 2d games engines. The reason is Unity was first a 3d games engine which has been adapted to work also for 2d games.
« Last Edit: August 08, 2017, 08:39:31 AM by egofree » Logged
Offline (Unknown gender) falki147
Reply #19 Posted on: August 08, 2017, 02:49:46 PM
Member
Joined: Sep 2015
Posts: 4

View Profile
YoYoGames should have kept the number of supported platforms lower. I don't think many use the Xbox, PS4 or Tizen exports. Also the prize. It's way to high for hobby game devs and tbh this is the user base of GameMaker. I guess the only thing why Unity is free, is that they hope to make revenue from either people buying the software or throwing their money at the asset store. I personally don't like Unity because it's more like a 3D modelling program where you just throw your 3D mdoels into it and maybe add some scripts if you really feel fancy. I enjoy writing my own engines in OpenGL because even though you have to write much code, you get a feeling for the hardware and the underlying os.
Logged
Offline (Male) hpg678
Reply #20 Posted on: August 08, 2017, 06:06:01 PM

Member
Location: Barbados
Joined: Mar 2017
Posts: 47

View Profile Email
YoYoGames should have kept the number of supported platforms lower. I don't think many use the Xbox, PS4 or Tizen exports. Also the prize. It's way to high for hobby game devs and tbh this is the user base of GameMaker. I guess the only thing why Unity is free, is that they hope to make revenue from either people buying the software or throwing their money at the asset store. I personally don't like Unity because it's more like a 3D modelling program where you just throw your 3D mdoels into it and maybe add some scripts if you really feel fancy. I enjoy writing my own engines in OpenGL because even though you have to write much code, you get a feeling for the hardware and the underlying os.

I agree a lot of your statements. YoYoGames have demolished Gamemaker where its original author have crafted it to an jewel. Greed have spoilt its potential where Unity and Unreal have surpassed it. After all they were original 3D based but now due to followers request for 2D, they have added 2D elements to their engines with no additional costs to the consumer.

I too didn't like Unity. Personally I wasn't that partial to 3D development in the past, but we've all got to grow and improve so I'm learning 3D to add some form of realism in my projects.
Logged
Hugar
Offline (Male) time-killer-games
Reply #21 Posted on: August 10, 2017, 12:16:19 AM

Member
Location: Virginia Beach
Joined: Jan 2013
Posts: 1049

View Profile WWW Email
Always be aware of the dates of posts on these forums. This is what you would call a 2 year necro bump. :)
Logged
Pages: 1 [2]
  Print