Page 1 of 2

Text Editor

Posted: Mon Mar 11, 2013 8:27 pm
by retrotails
Basic text editor, has some issues.
Issues:
- When a single word is longer then the text limit, its cut permanently. I won't fix this, but word wrap will be optional.
- Slow, renders every character every frame. I'll later have a custom love.draw or canvas that only updates when needed.
- Spaces are ~1 pixel shorter then all other (mono space) characters. Don't know how to fix this.
- You can delete the text so it has a negative total length. I'll fix this soon, I just didn't realize it was there for a while.
https://www.youtube.com/watch?v=0zgDVAD8yl0

v1.0
First release

v1.1
Added canvas option for better performance
Fixed backspace edge case

Re: Text Editor

Posted: Thu Mar 14, 2013 12:15 am
by Djent
retrotails wrote: - Slow, renders every character every frame. I'll later have a custom love.draw or canvas that only updates when needed.
I believe you can edit love.run and just comment out "love.graphics.clear()" that it does every frame, but you'll have to manually clear what you want.

Re: Text Editor

Posted: Thu Mar 14, 2013 7:37 am
by bartbes
Djent wrote: I believe you can edit love.run and just comment out "love.graphics.clear()" that it does every frame, but you'll have to manually clear what you want.
That is most likely to go wrong, you know single/double/triple buffering, no redraws when another application was on top of this one, that kind of stuff.

Re: Text Editor

Posted: Thu Mar 14, 2013 11:23 am
by iPoisonxL
this is really cool, has some potential. When you do backspace though, you start going off to the side. Like, leaving the screen. Really cool other than those small bugs.

Re: Text Editor

Posted: Thu Mar 14, 2013 4:21 pm
by retrotails
iPoisonxL wrote:this is really cool, has some potential. When you do backspace though, you start going off to the side. Like, leaving the screen. Really cool other than those small bugs.
Fixed now. Thanks by the way, glad to hear somebody sees it has potential. It's going to be a serverless secure chat program, encrypting and decrypting in all Lua.

Re: Text Editor

Posted: Thu Mar 14, 2013 4:44 pm
by Lafolie
You could use a canvas, or group of canvases to help lighten the drawing operations.

Also, how do you plan on implementing encryption? This is something I've thought about before - Lua doesn't seem to be the greatest candidate for running encryption programs.

Re: Text Editor

Posted: Thu Mar 14, 2013 4:50 pm
by Robin
Lafolie wrote:Lua doesn't seem to be the greatest candidate for running encryption programs.
You mean in terms of encryption/decription speed, right?

That's true, most useful encryption algorithms are either optimised for implementation in hardware or in a certain kind of software (lots of bit shifts and xors and stuff).

On the other hand, that's likely not going to matter that much when you probably will only be sending a few bytes per second on average.

Re: Text Editor

Posted: Thu Mar 14, 2013 5:13 pm
by Lafolie
I did mean that.

I was considering ways to encrypt passwords for a remote server logins as part of a multiplayer game. If what you say is true then in this case it should be ok to encrypt/decrypt in Lua since it's only going to happen once for each session (or login attempt).

This also applies to the text editor too, since any delay or 'lag' isn't a huge problem for an exchange of text (rather than say, an FPS game).

Re: Text Editor

Posted: Fri Mar 29, 2013 1:20 am
by iPoisonxL
Maybe you could add a simple HTML syntax highlighting? You know, highlight whatever is between <> brackets in blue or something.
That'd be pretty cool, IMO.

Re: Text Editor

Posted: Mon Apr 15, 2013 6:26 pm
by ArunHaridas
I got a error message when run it
cannot create canvas : Not supported by your open gl implementation

Help....