Torque 2D Editor Work

2D version of the Torque engine.

Moderator: marauder2k9

  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
70 posts Page 5 of 7
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sun Mar 08, 2020 8:10 pm
Short video to show the scene saving and loading. I need to set it to hide any active menus when a scene is being loaded, also when a scene is not loaded or created buttons are active that shouldnt be but its all easy to link up, saving and loading is working properly :)

marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Mar 10, 2020 12:40 pm
Another short video, showing scene preferences file and this time you can see the camera object being displayed and i really have to figure out some sort of scaling for those handles :D lol big green squares don't look good.



Because this is really just loaded as a scene just you have other functions that save it out and allow modifying of object properties on the fly, you get to see what your game will look like on different resolutions on the fly.

For example if you have an object sitting at point 0 0 at a size of 2 by 2, each of its 4 corners from top right will be 1,1 1,-1 -1,-1, -1,1 and no matter what resolution is displayed this is where each corner will stay, this causes stretching on certain resolutions so say you have a level designed for a 16:9 camera it will look stretched or squished on 4:3 displays. But to be fair if you are designing your game for todays hardware, there really shouldnt be any reason to be setting it up for 4:3 least not to my knowledge and if you want to do that it can still be done it just needs to be designed with a 4:3 camera which you can easily do
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sat Mar 14, 2020 4:26 am
Yo dawg i heard you like CompositeSprites, so i put a composite inside your sprite to make it a composite sprite sprite :D



In other words composite sprites are less of a pain to make :D
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sun Mar 15, 2020 11:33 am
Please see initial post of this topic, the EditorToy is available now for testing, I had to remove some features as they are not yet ready but anything you do now can be saved and added into future versions of the editor.

You can find it here: https://github.com/marauder2k7/EditorToy
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Mar 16, 2020 7:14 am
Latest pushed to Github repo

Added
-Control camera with middlemouse
Now you click and hold the middle mouse button pressed in order to move the camera. This should mean now that while moving the camera there is less of an opportunity to accidentally grab an object.

-Modules auto load a scene
Now modules have their own pref file as well that will automatically load the last scene that was active the last time you loaded that module.

-GUI Changes, now the default object size is under the scene options, this will also be saved with scene prefs in future update. Def size is not yet hooked up either but will be soon.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Mar 17, 2020 4:56 am
Latest push to github
Added
-Play pause ability for scenes
-Camera zoom with zoom out limit so scene doesnt disappear
-PolyLines now rotate based on angle of object selected

Fixed
-When choosing selector twice in succession the mouse would completely disappear more on this below
-Errors being reported on CollContainers not being ready when object selected

Mouse Error:
Something that has often been a bit of a problem in Torque2d was the mouse showing over the top of custom cursors. At the moment you can actually see this if u load up the paint tool in the composite sprite editor toolbar you will see that if u click and drag the mouse appears above the graphic. Now something discovered quite by mistake is that if you call Canvas.resetCursor() twice in succession, the mouse disappears completely and will not flicker in and out on mouse callbacks. So if you want a custom cursor in your game calling Canvas.resetCursor() in your create block and then again in the reset block, then send the code to a block to create a custom cursor should make a proper custom cursor that shouldnt cause problems. Not sure why this works, maybe trying to set the nativecursor twice freaks out windows and creates some sort of null exception. Not sure but it works, and creates a flicker free custom cursor.

Why releasing in stages:
I have been asked why i am releasing this in stages when i have more features ready. The fact is while each feature is ready releasing it in full makes it harder to get to errors, the full Editor has just shy of 50,000 lines of code(script). So at the moment yes the main meat of the features are available these features work quite well and if anyone has any errors now i will know what needs to be fixed. Get these features to a more stable state and then add the more advanced features in afterwards. The composite sprite features in particular are quite advanced in a sense but compositesprites are so important to the creation of a level. TileMaps should all be composite sprites in rect layout for speed and ease on the engine. You can create a full game in the EditorToy as it is but it just needs some after work in script to do it(mainly the creation of a main.cs).


My next release should be fixing all errors that i have found or have been brought to my attention in this iteration and linking up scene settings and camera settings. Then move on to ParticleAsset creation and particle player creation (both of which may end up being the same functions).
XIXWYRMEXIX
Posts: 63
Joined: Sat Mar 07, 2015 3:13 pm
by XIXWYRMEXIX » Tue Mar 17, 2020 1:48 pm
Hey Marauder, fantastic work on all of this! I will be DL and testing your editor, I am excited to see t2d being worked on. I love this 2d engine. Let me know if there are any areas in specific you wish to see tested out. I will reply back with some feedback when I do some tests.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Mar 17, 2020 1:56 pm
Hey Marauder, fantastic work on all of this! I will be DL and testing your editor, I am excited to see t2d being worked on. I love this 2d engine. Let me know if there are any areas in specific you wish to see tested out. I will reply back with some feedback when I do some tests.
Pretty much everything lol i have a few more fixes to go up today for a few things, like creating a new module while having a scene loaded would load that scene into the new module :-S so gonna be pushing that up now soon and the starting of splitting out assets into their respective categories :)
XIXWYRMEXIX
Posts: 63
Joined: Sat Mar 07, 2015 3:13 pm
by XIXWYRMEXIX » Tue Mar 17, 2020 2:04 pm
Awesome! I will wait for your changes, then DL. Looking forward to playing with this.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Mar 17, 2020 6:58 pm
there we go thats all the changes pushed.
  • 1
  • 3
  • 4
  • 5
  • 6
  • 7
70 posts Page 5 of 7

Who is online

Users browsing this forum: No registered users and 1 guest