Torque 2D Editor Work

2D version of the Torque engine.

Moderator: marauder2k9

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
70 posts Page 1 of 7
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Mon Dec 30, 2019 9:09 pm
EDIT: Changing this first post to have the link to the Editors github

So for anyone interested the EditorToy is ready for download and testing from anyone that is willing to.

You can find it here: https://github.com/marauder2k7/EditorToy

Just download it and put the EditorToy folder into your modules directory.

So all that is available in this version is:-

Module Creation
Scene Creation
ImageAsset Import
AnimationAsset Creation
SpriteAsset creation
Scroller Creation
CompositeSpriteAsset Creation
CollisionShape Creation

Other features are ready but not released as they are quite unstable features such as:
ParticleAsset Creation
Emitter Creation
TextSprite Creation
ShapeVector Creation
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Tue Dec 31, 2019 5:00 pm
I figured it out. Now i have the simple functionality of creating ImageAssets.

When you load up the EditorToy you are presented with this screen

Image

At the moment the only button that works is the Import Image button which loads up an ImageAsset that you choose, takes it into the engine as a private asset and presents it on the screen. After which you can choose and modify some of the options associated with image assets

FilterMode
CellCountX
CellCountY
CellWidth
CellHeight
CellRowOrder
Force16bit

These are then output to a asset.taml file that includes these changes.

For the moment i haven't figured out how to add a simpler method of creating Explicit Cells as i am creating a representation of the image in the center of the screen i need to figure out the math on how to calculate the top left corner as being 0 0 instead of it being -(half image asset width) -(half image asset height). I could possibly put the images top left corner at 0 0 then all the x positions would be correct but the Y would need to be flipped to a positive by multiplying by -1 or something
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jan 02, 2020 12:01 am
A brief video showing the ImageAsset creation with cell width cell height cell number x and cell number y selections. When this is finished it writes out a TAML file with all the options set in the guis

The grid overlay will eventually have thicker lines once i figure out how to do it lol

Other gui elements being added now for the further options. Sprite creation is next

marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jan 02, 2020 3:12 am
Taml file output from imageasset importer
<ImageAsset
	AssetName="Blocks"
	ImageFile="Blocks.png"
	FilterMode="Nearest"
	CellCountX="8"
	CellCountY="7"
	CellWidth="64"
	CellHeight="64"
/>
now has the button to export the image taml and removes all objects involved in its creation from the scene.
Parody Games
Posts: 2
Joined: Thu Jan 02, 2020 7:38 am
 
by Parody Games » Thu Jan 02, 2020 7:54 am
Just found a link to this forum from the old, dead, Garage Games one. Glad to see that there's still a couple people working with this engine :)
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jan 02, 2020 5:53 pm
Just found a link to this forum from the old, dead, Garage Games one. Glad to see that there's still a couple people working with this engine :)
theres some life in the old girl yet :lol:
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Thu Jan 02, 2020 9:50 pm
Initial Commit of the editor toy is pushed to my github,

https://github.com/marauder2k7/Torque2D/tree/EditorToy

The editor toy is heavily reliant on sandbox for the moment for gui elements and inputcallbacks.

Everything for the imageasset creation is in the main.cs file, everything i do for the editor will be in one file for the time being until i get everything working for imageasset i will keep it this way then when each feature is sorted out the imageasset scripts will be moved to their own file. This upload atm does not have any functionality in the other buttons only import image works.

For the moment images and their respective taml file get added directly into the assets/images folder. This output path will be changed when the user creates a new module and then the output path will be used instead

the file output paths then will be /output/{MODULENAME}/1/assets/{ASSETTYPE}

I have decided that adding other functions is possible sure but may be stupid without level editor being in place first because the size of the sprites decides the physics bodies sizes and such and these need to be on a per object instance basis usually.

So if you were to create sprites outside of a level say a sprite with size 2 2 and you create a boxbody of the same size and save this out when you import it into a level and resize the sprite to 5 5 then boxbody will still be 2 2 and would be too small. Creating sprites on the fly will be a lot easier. So far i have got a basic level editor in place where you can load in a sprite for image assets you have imported already and move them around to different positions, each sprite that gets selected will load up a gui menu much like the image importer menu where you get to select the sprite size, sprite frame whether it is flipped etc very basic functionality atm but while you can load sprites in and place them and all i have to figure out the saving function this is why i am not releasing this yet because itd be pretty stupid if people make and design a level that they cant save. Simple physics options can be added for box and circle shapes.

Eventually what i am planning to add is a section for adding physics bodies to the sprite, box and circle collision shapes are fairly straight forward and functionality for custom polygon shapes is possible and this is what i am testing out atm.
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Jan 03, 2020 11:52 am
New commit pushed for further options to the ImageAsset menu.

Now an overlay appears displaying frame numbers and a gui option for changing the frame numbering from row order to column order. Also fixed the offset settings. Video showing functionality



Uploaded to the github this version of the editor toy

The output from this was this taml file
<ImageAsset
	AssetName="Blocks"
	ImageFile="Blocks.png"
	FilterMode="Nearest"
	CellRowOrder="false"
	CellCountX="8"
	CellCountY="7"
	CellWidth="64"
	CellHeight="64"
/>
trident
Posts: 12
Joined: Wed Feb 18, 2015 11:58 pm
by trident » Fri Jan 03, 2020 2:19 pm
looking good and again thanks for this type of update
i look forward to when it all done and working
marauder2k9
Posts: 418
Joined: Wed Feb 18, 2015 7:36 am
by marauder2k9 » Fri Jan 03, 2020 10:06 pm
Update:-

Quick video showing basic sprite operations for loading in sprites and moving it around a scene for placement.



The gui for sprites has been disabled in this video for the time being until i finish all the hooks and callbacks.

At the moment, each object added to the level editor is added to a simset, this simset is then output as a taml file which when read back in should load up all the objects with their saved properties so its basically a way to block out a level without the need of guessing where objects go.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
70 posts Page 1 of 7

Who is online

Users browsing this forum: No registered users and 1 guest