2ndwolf
Posts : 7 Reputation : 14 Join date : 2016-12-17
| Subject: Evora's Tile Editor Fri Jan 13, 2017 5:31 pm | |
| The goals: Provide an environment where creativity is possible to unpredictable extents. v0.1 - Code:
-
Tileset image on the left (in a darn resizeable field, because it's never big/small enough) Drag and drop tiles with left mouse button Tile selection Copy tiles by dragging them with the right mouse button. Scrolling v0.2 - Code:
-
Save Load Until I'm sure a newfile feature won't be exploitable, there'll probably be something like 3 files to tinker around with for each user. v0.25 - Code:
-
TWM pane: *Tileset All the way to: V1 - Code:
-
save as undo cut copy paste delete warps? signs? right click fill right click copy selection double click = default tile Predefined objects Editable entities that contain text (will later be used for NPCs) and have an image (that's along with the image uploading mechanism I've mentionned on JS Reborn) Tabs for multiple opened files Play button? Keyboard shortcuts! Tabs for multiple files opened? "Tiling window manager" specs: - Code:
-
Upon clicking, overlay full screen the list of pane choices Once chosen, enter the create pane mode, overlay full screen with buttons at each possible areas Done Available panes: (a * signifies there can be multiple instances of that pane) *Tileset Layer *Chicken object manager :The predefined object feature Graal's editor has but better. Where you can select the tiles independently. Special tiles tileset -> swim, bed, shallow water, hurt tiles... Find/replace tiles NPC editor (double clicking an NPC while there's no NPC editor window activates the create pane mode) Macro? *Another level file? I'm also considering to add: - Code:
-
Ctrl+tab -> switch between opened levels (if I can override the browser's ctrl+tab) (ctrl+s),(ctrl+c),(ctrl+v),(ctrl+shift+s),(ctrl+z), Save workspace WASD movement Command line editing Zoom in/out + Gmaps Live level modification (as players are playing it) And your suggestions! Journal: - Code:
-
- Got an image to display! - Trying to make my old computer work as a virtual machine to test efficiency. I know I need to activate the boot sector but can't find the tool.
- BOOTICE worked like a charm
- Because I wanted to have a clean version of my old Netbook I made a vhd with a new backup, for some reason I deleted the vhd that worked and now I'm stuck again but with a different problem: there's a blinking cursor on boot and it stops there.
- It seems my success was a false memory, if anyone has tips: tell me!
- After lots of trying, I've decided to simply install a completely new machine
- I doubt anyone reads this
- Figuring out the TWM paradigm...
- First module created!
- Took me two hours but I think I understand modules now, phew... now to know if it's consistent with Rammy's part
- Decided on the particular style of module I'll use. TWM is still a scrambled idea, I should concentrate on more vital things
- Using a dark theme for my editor... white hurts my eyes C_C
- really stuck at interfacing the panes...
The resize bar has to move and the pane also... how do I move both without coupling Move the resize bar and then update the pane Moving the resize bar calls an update on the pane
ok now... how about the clearRect... it both needs information on the pane and on the bar.. it should accumulate those can'T see anything, too white
- Finally figured out that if I was going to make something modular I had to make the panes modules.... ....lol
- I think I figured out how to separate the files, I've also changed window.onload for an eventListener, which works better. Files I'll be working on are: cResizeBar, cScrollbar, PPane, pLevel, pTileset, main. c means constructor, P means prototype (all panes will inherit from it), p means pane... and main is main. Still wondering how to manage the buttons. Almost installed required.js because the separate files didn't work... turns out I made a typo on a filename AND named the file wrong. X_X
- Documenting the projects right now. To have a general idea of what will do what. I'm being very specific I think. Also, added cDropDownList.
- An new one in the family, PTileBased, prototype for the Level, Tileset and SpecialTiles panes. It will inherit from PPane. Now what else did I forget...
- Added new files. Btw, hello rammy!
JA 19 ??:?? - Still adding files, considering to use require.js or just read its source code in order to make js file loading code by myself. Right now I am figuring out the structure of things and learning what's possible and what's not.
- I've just finished the backbone of the mouse system. Very happy that I coded it right the first time around.
15h - Not sure what to do next, everything is ready.. can't choose
18:44 - Decided to work on the graphical rendering. I realized a few minutes ago that maybe I should have been using objects instead of arrays... for now I don't see the difference. I read objects are faster but I think it needs to be on a really large scale. Will see once I fire it up on my virtual machine. Now there's a piece of code acting up but can't find where and I have like 13 files. I will need to make them load one by one. I know it's overkill for just one bug but (a) I need to figure out how to load files anyway and (b) it might be helpful in the long term.
22:00 - Did some cleaning IRL and wrote something that loads all my js files and added a debug delay on it to find out who was the culprit... turns out I forgot to save all files. Now I'm going to write the reaction of the buttons to hovering and clicking.
23:23 - Had a fun time trying to make something I didn't script yet work. Not really noteworthy but good anecdotal value I think.
00:00 - Interestingly, it seems it took me two hours to make the buttons visually operational.
- It seems I wrote 335 lines of code on a ~10 hour day. Sounds slow.
JA 20 9:48 - Starting the work on panes, fingers crossed. But I'll start by adding a try/catch to the loading of the js files. It sounds like solid code.
13:11 - Spent quite some time debugging what I found out were conflicting variable names. I want the panes to scroll, I don't want to use divs but I might have to. Considering to use webGL, I would learn it at the same time.
14:34 - I officially cannot use divs. Tried to jump into webGL but it's rather dense, my knowledge of it dates to waaay back when I was working on Armonston Ch 1. That's five years ago, and it wasn't even webGL, it was openGL ES 2 or something. I'll take some time doing something else before really diving into webGL.
16:29 - Took a walk. Looking back into this I will surely need to use a library.
16:53 - Lowest level library I could find advised to use three.js if I wanted to get shit done. Which I will do.
17:55 - After reading further about three.js (which people say is not ideal for 2d) and trying to download it (it's 163 mb ?!?) I decided to use pixi.js which has been used to make games for McDonald's and such. I want to use as little libraries as possible but webGL is ridiculously daunting.
23:58 - This is akin to the joke about reading more documentation than actually coding. pixi.js is cool and all but it handles stuff I don't want it to handle. In fact, even the most basic abstraction I could find (http://lib.ivank.net/?p=tutorial) handles more than it should (the mouse). I've already scripted the mouse, in fact it's the first thing I did. Ivank doesn't handle rotations though, despite the fact that its developper deserves all my respect, I'm annoyed to have the mouse handled by a library that isn't feature complete in what it should actually do. Maybe I will delve into both ivank and pixi and cut and paste some kind of Frankenstein for my own use... if I can.
00:57 - Given the best and most recent webGL tutorial I could find is about 100 pages long (rough, rounded up estimate of letter size pages). pixi.js's most in depth tutorial in comparison is 50 pages long. Which is worth it? pixi.js's I guess. I know I could simply avoid the features I don't want... Enough justifications! I wrote a darn novel here.
1:43 - No I'm not neurotic... I'm cooking spaghetti sauce, hence why I'm still up. http://caniuse.com/#feat=webgl I don't know what "partial support" means but it doesn't sound good.
JA 21 12:14 - I feel like doing more concrete stuff today. Call is a day off, until I come back to programming maybe this evening.
Last edited by 2ndwolf on Sat Jan 21, 2017 12:17 pm; edited 4 times in total | |
|
2ndwolf
Posts : 7 Reputation : 14 Join date : 2016-12-17
| Subject: Re: Evora's Tile Editor Fri Jan 13, 2017 5:41 pm | |
| Here's the interface, feel free to give feedback: | |
|
2ndwolf
Posts : 7 Reputation : 14 Join date : 2016-12-17
| Subject: Re: Evora's Tile Editor Sat Jan 21, 2017 12:23 pm | |
| I've decided a while ago on a different interface that will be modular and way more solid. The idea of basing this on the Graal version I started working on turns out to be bad. Although I figured out ways to make more powerful code that's almost object oriented, Graal is a much different framework(?). It's for the best though, it's much easier to make solid code through JS than Gscript. | |
|
Sponsored content
| Subject: Re: Evora's Tile Editor | |
| |
|