Torque 2D Editor Work

2D version of the Torque engine.

Moderator: marauder2k9

39 posts Page 4 of 4
trident
Posts: 9
Joined: Wed Feb 18, 2015 11:58 pm
by trident » Wed Jan 22, 2020 2:21 pm
thanks for the update and sorry about you job
am not working even as i've been off sick for over 2 years. even with all the free time you still dont have time to do stuff lol

anyway love reading what you doing and have done so looking forward to breaking it all for you when i have time
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Jan 28, 2020 12:29 am
Short Update:

Okay so i got stuck for a while on a loading and unloading problem for a bit but i think i have it sorted out.

To explain - in the editor each object is loaded in a simset. This simset is named the same as the object such as sprite, compositesprite, scroller etc

All the simsets were created when the particular object was created so when you did this it created the sprite simset. The way i was trying to load up objects was to already have the simset loaded and then assign them to it as they are read back in. This wont work as long as you have a simset object already created. My own stupidity got me stuck on this one. Previously i was loading saved scenes through the console, at this point i had an object automatically being created because i was also testing out autosave, and auto load upon relaunch. This was creating the simset before a new scene could be loaded. So not only do i have it changed so we don't have to load scenes in through the console, i also have a new script in place that deletes these simsets if they are present. So if you load up a scene that new scene creates the simsets along with the objects that were saved, along with all their saved attributes.

At the moment a module is really just a place marker in script until the module is exported. All assets are loaded as assets of the editortoy so in their associated taml file the file name for example would be EditorToy:ImageName. Upon export of the module this is changed to your module name.

CompositeSprites: Almost completely finished off but unfortunately they will need some further work. The problem i am facing is i have no way to load work previously done by a user into the composite sprite again. for example: Say you are working on rect layout for a tilemap say, you would choose a width in sprites and a height in sprites say 10 x 10. Then you load in your assets into a paintmode that allows you to change the default rect texture to whatever imageasset you have selected in your palette. This is a very easy and comfortable way of editing composite sprites.... until you decide after your work is done that you need a 10 x 11... then you have to start over from scratch. Granted you could just add another composite sprite for the extra row but there has to be a better way. and one way i was thinking of doing it was making a tilemap designer specifically for it. Instead of loading up a composite sprite it will load up a number of shapevector squares. These squares will be used to number the sprites that are painted over the top of them. These shapevectors will never be able to be changed and they will have an id number. This id number is assigned to whatever sprite you choose to paint over the top of it. Now if u change the row and column count the shapevector count will update and will be assigned a new number (much like it does in the imageasset viewer function) then each sprite will be checked to see if it's id matches the id of the shapevector at the same position. Then when u click create each sprite is iterated into a simset by name then placed into a composite sprite in that same order but positioned based on the id. because object 0 should always be the top left, once we know the number of columns and rows it should be easy to figure out the positions of all other sprites.

I haven't even begun working on a designer as it is just a concept at the moment but the basic composite sprite painting is working, but takes some planning before you start, and i'm not that disciplined i want to get into it and start drawing and figure things out later lol. Granted it shouldn't take too long to just do a composite sprite over again if its only a 10 x 10 but if your working on say 100 x 100 level. Tensions will rise if you have to start that all over again. The option to add or remove rows and columns to a compositesprite without losing all your hard work is a must.

Good things to come! Watch this space ;)
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Feb 03, 2020 7:35 pm
First update of February :D

Sorry this isn't really what you guys were waiting for but it shows the additions to the sprite setup. Now you have scene layer, scene group. Collision layer, collision group and Blending options. Blending should be a lot easier now that we have the ability to see what those options are actually doing :)



As you can see from the video i got a bit confused as to why the collision layers werent working. Turns out the collision layers and collision groups are connected to scene layer and scene group. So if both objects are on scene layer 1 and you want them to collide, the collision layers should be set to 1. Same for groups if both objects are on scene group 1 and you want them to collide you set their collision group to 1.
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Feb 04, 2020 9:47 pm
Another short video showing module creation



Closing in on that 5.0 release for the editor! I am now working on making it all a bit more pleasing to work with and making a better gui for it. This way it will just look a bit more professional. Another thing i forgot to show in the video, when u create a module it will automatically add it to the sandbox's list of tools on category 5 for games :D

This should be almost ready for proper use. The only thing left to do is sort out scene creation, loading and saving.
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sat Feb 15, 2020 4:45 am
It has been a busy couple of weeks! lol here is the first look at the new gui for the editor

Image

Atm not all of these settings are tied in but the functionality for new scene,load scene, save scene, scene settings and camera are all linked up, so are the buttons to create physics shapes and import image assets. The reason the sprite in the screenshot is saying cannot render is because i just loaded up a sprite in the launch of the editor so i could show the sprite menu, the sprites asset is tied to a project and therefore because i dont have that module loaded it wont render the texture. The menu at the bottom also hides itself when a module is created or loaded.

I am going to create a menu bar for all of these functions as well as loading and creating a module dont think it is a good idea making module buttons at the top bar be too easy to hit them by accident which atm will break the editor and make you lose work.
trident
Posts: 9
Joined: Wed Feb 18, 2015 11:58 pm
by trident » Sat Feb 15, 2020 8:11 pm
wow looking good
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Sun Feb 16, 2020 4:56 pm


Quick video showing some of the expanded additions to modifying sprites :D Still needs some work but very nearly there!
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Feb 17, 2020 10:10 pm


AnimationBuilder Finished!!!

With the animation builder all tied up, the module saving and loading sorted, scene saving and loading done. Just a few more to go :)
marauder2k9
Posts: 371
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Feb 18, 2020 10:45 am
In the Image builder i have implemented the cell stride function. I am still running into the same error when it is being used. When an image is created it is claiming that the cells are cutting off the right side of the image now due to offset and stride together.

As an example the cannonball image has a 4 x 4 grid of images for a cannon ball, whenever i set the cells up properly to cover the full 4 x 4 it pushes out the error. But if i change the number of cells on the x axis to 3 instead of 4 it works fine and when you load it up as a sprite asset the cells seem to be fine so i think the viewer is showing everything in the correct position.

Does anyone know if there is any correlation between offset and stride. As far as i know the offset is just to set the distance from the top left of the image to put the first cell and then the stride is the distances between each cell. But again no matter what image is used if you try to use the correct amount of cells it fails on the export and creation due to the error mentioned before.


This is the output from the image asset importer. With the blocks.png file set up properly with a cell on every visible block.
<ImageAsset
	AssetName="Blocks"
	ImageFile="Blocks.png"
	FilterMode="Nearest"
	CellCountX="8"
	CellCountY="7"
	CellWidth="32"
	CellHeight="32"
	CellOffsetX="16"
	CellOffsetY="16"
	CellStrideX="64"
	CellStrideY="64"
/>
If i change CellCountX to 7 it will work, as it is now it doesnt.
39 posts Page 4 of 4

Who is online

Users browsing this forum: No registered users and 0 guests