Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #1357

Re: multi-line editing/evaluation...

From BGB <cr88192@hotmail.com>
Newsgroups comp.lang.misc, comp.programming
Subject Re: multi-line editing/evaluation...
Date 2012-03-13 11:12 -0700
Organization albasani.net
Message-ID <jjo2or$qjp$1@news.albasani.net> (permalink)
References <jjlqg2$vbf$1@news.albasani.net> <jjmqau$fj1$1@speranza.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


On 3/12/2012 11:43 PM, Rod Pemberton wrote:
> "BGB"<cr88192@hotmail.com>  wrote in message
> news:jjlqg2$vbf$1@news.albasani.net...
>> [...]
>> problem:
>> I was having a hard-time thinking up a good way to
>> interface a text editor with the 3D Engine's UI.
>>
>
> 1) line editor
> 2) use the GUI to point and click program
> 3) zero display text entry
> 4) remote terminal
>
> For 1), line editors are old concept which is largely forgotten.  See:
> http://en.wikipedia.org/wiki/Line_editor
>

a line editor is what I currently have.

previously, there was nothing: all interactively-entered script 
fragments had to fit on a single line.


I added the line editor initially, because this was a lot faster and 
easier to implement than a "proper" text editor would be.

that done, I am considering "moving up" to a more advanced text editor, 
namely something where the usual keys do their usual things (arrow keys 
move the cursor, enter adds a line-break, ...).


> For 2), your alt key combination transports you from your current room to a
> special room.  The room has a wall.  The wall has many pictures.  Each image
> represents one of your macros or code piece.  Point.  Click.  Converts to
> text.
>

?...
totally bizarre idea.

not likely all that practical though, since presumably if a person is 
bringing up an in-program editor, they are wanting to mess around with 
something right in front of them (where they already are).


> For 3), your alt key combination just redirects text input from 3D game to
> text entry.  No visual display of what you're typing at all.  Type what you
> want.  Be careful.  BTDT (but not with a 3D game...).
>

why?

there is a console for typing commands.
I am not doing this Doom style, it is more like Quake and later style.
the console differs some cosmetically from the one in Quake 1/2/3/4 and 
Doom3, and also from the one in Source games (Valve had the amazing idea 
of making their console be some sort of in-game detached window, like it 
were an xterm window or something...).


note, IIRC:
Quake 1/2/3 had the console accessed via '~';

Doom 3 / Quake 4 used CTRL-ALT-~

both Half-Life (GoldSrc) and Source require a "developer" cvar to be set 
(either via the command-line or editing the config file), at which point 
it was accessed via '~'.

in my case, it is ALT-~, mostly because ~ is a valid operator in 
BGBScript (and using it as the console key would make it unusable in 
interactive entry). for a long time I was using CTRL-~, but in the game 
project, CTRL is by default bound to "+fire" (fire weapon), which had 
the annoying side effect of firing the gun whenever entering the console 
(and, worse, sometimes getting stuck, with the gun firing the whole time 
one is in the console...). so, I changed it to ALT.

I don't personally trust CTRL-ALT, since this is used for a number of OS 
command-keys (CTRL_ALT-PGDN and suddenly PC goes into sleep mode, ...), 
or CTRL-ALT-F2 and Linux will dump the user at a text-mode console 
(sorry, your X11 is in another console), ...


I just made it a full-screen (full-window) overlay.
at the current default (errm, hard-coded) window resolution, this works 
out to a 100x75 character console (of which, 80x25 or 80x50 or 80x55 or 
so would probably be used for the editor region).

I was considering the right-hand margin would likely hold an open-file 
list or similar. out of nostalgia... one could also design the UI using 
CP437 characters and a similar style to QBasic, and maybe even a similar 
color scheme as well... "you ready for some white text on a blue 
background?!... (yelled cheers) YEAH!"



granted, when one is in the console, it is currently not possible to 
move or interact with the scene, and (like in Doom3, unlike most other 
Quake-family engines) the console being active doesn't automatically 
pause the game, leading to a potential "monsters own you as you try to 
type your cheat-codes" style events.

ironically, Doom3 did several things to make this annoying (for cheats 
users):
every map change would tend to forget any active cheat codes;
Doom3 tended to have a lot of maps where the player spawns with monsters 
"all up in their grill" as soon as they spawn (rarely done in other 
games, generally the player spawn location is a safe spot, where 
monsters are either not spawned nearby, or are generally spawned facing 
away from the spawn-point).

this could have all been deliberate though, such as to hinder people 
easily playing through the whole game with cheats on.


> For 4), you'll need another computer and display, a communication line
> (serial, USB, ethernet, modem, etc), and software to connect the two or
> transfer files (ssh, ftp, rz/sz, zmodem, kermit, rlogin, etc).  The main PC
> displays the 3D game, and the remote displays text.  The remote doesn't have
> to be remotely located, of course.  It'll be next to you, e.g., old laptop.

errm, why?

this would be considerably more awkward and annoying than, say, typing 
stuff in the console, or even alt-tabbing into an editor (which is what 
I was previously doing).

ALT-TAB is annoying, but much less so than having to alternate between a 
PC and a laptop would be.


the goal is to minimize effort, which in this case, is mostly a matter 
of key-presses.

Back to comp.programming | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-12 14:38 -0700
  Re: misc: multi-line editing/evaluation... Rui Maciel <rui.maciel@gmail.com> - 2012-03-12 23:42 +0000
    Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-12 17:39 -0700
  Re: misc: multi-line editing/evaluation... "BartC" <bc@freeuk.com> - 2012-03-12 23:51 +0000
    Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-12 18:29 -0700
      Re: misc: multi-line editing/evaluation... "BartC" <bc@freeuk.com> - 2012-03-13 12:31 +0000
        Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-13 10:03 -0700
  Re: multi-line editing/evaluation... "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-13 02:43 -0400
    Re: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-13 11:12 -0700
  Re: misc: multi-line editing/evaluation... Paul N <gw7rib@aol.com> - 2012-03-14 15:08 -0700
    Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-14 19:11 -0700
      Re: misc: multi-line editing/evaluation... "Rod Pemberton" <do_not_have@noavailemail.cmm> - 2012-03-15 04:10 -0400
        Re: misc: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-15 13:09 -0700
  Re: multi-line editing/evaluation... "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2012-03-16 08:54 +0000
    Re: multi-line editing/evaluation... BGB <cr88192@hotmail.com> - 2012-03-16 09:45 -0700

csiph-web