Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1353
| From | BGB <cr88192@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.misc, comp.programming |
| Subject | Re: misc: multi-line editing/evaluation... |
| Date | 2012-03-12 18:29 -0700 |
| Organization | albasani.net |
| Message-ID | <jjm7vs$47f$1@news.albasani.net> (permalink) |
| References | <jjlqg2$vbf$1@news.albasani.net> <jjm277$76l$1@dont-email.me> |
Cross-posted to 2 groups.
On 3/12/2012 4:51 PM, BartC wrote:
>
> "BGB" <cr88192@hotmail.com> wrote in message
> news:jjlqg2$vbf$1@news.albasani.net...
>> here is the scenario:
>> I have a 3D engine;
>> it has a console;
>> I can evaluated code fragments at said console.
>>
>>
>> basically, sort of like the Quake-family engines, except that the console
>> is a full-screen translucent overlay, and presently accessed via "ALT-~"
>> (both CTRL-~ and ~ by itself had drawbacks).
>>
>>
>> I was generally limited (WRT evaluating script expressions) to whatever I
>> could reasonably type at a command-prompt.
>>
>> so, then I was left thinking, "what if I had a text editor"?
>>
>> the idea would be to have something sort of like QBasic or the "SQL
>> Server
>> Management Studio", where one can type/edit scripts, in program, and then
>> evaluate them. or, likewise, highlight chunks of text, hit an "evaluate"
>> key, and have it do something.
>
> You want a quick development cycle for trying out multi-line scripts on
> your
> graphics app?
>
it is a 3D engine (basically, a 3D Game-engine, also FPS / "First Person
Shooter" style), either way.
> I wouldn't have thought that too difficult; you just need to set up macros
> on function keys so that you can instantly switch from one mode to another.
> Even with Notepad that might be possible.
>
hmm, key-binding in Windows?...
I hadn't actually thought of looking into it.
ALT-TAB sort of works, since one can ALT-TAB between several open apps.
as-is though, it is sort of a pain to do this though, because the number
of steps involved gets tedious.
generally, I am using Notepad2 as an external editor (for editing most
source code, including scripts).
> For years, when I was working CAD applications, I mostly developed from
> within the application itself. It had a command line, but any multiple-line
> scripts were handled in an editor popup. With function keys set up, one
> press would bring up the script (with the cursor positioned where it had
> been before). You did the changes, then another press would save, compile,
> and run, doing something to the app.
>
yes, this would also be for an in-app editor, mostly accessed via the
console interface. I am mostly deciding on UI specifics (things like how
it should look and how the keyboard should be handled).
> I did use my own editors (so they could communicate an exit code more
> easily), but with ordinary editors, it might just mean an extra key
> press to
> evaluate the result.
>
> Going back even further, I had a compiler/editor where the source stayed
> displayed on the screen. Any graphics I was working with was often on a
> separate board with it's own display. The source wasn't saved because the
> floppy disks were too slow for the turn-around I wanted.
>
> Maybe your hardware can support a dual display, one showing the script,
> however you still have a bit of a headache in switching the keyboard/mouse
> from the editor window to the app window.
>
my PC could do dual display, but I don't currently have money to invest
in another monitor, nor would this likely be particularly useful.
> I don't know about using the 3D UI to do editing, if you're thinking about
> maybe displaying the script via some texture bitmap in the scene (or
> perhaps one of the scene objects is itself a computer screen!). I think
> they should be kept distinct.
this is theoretically possible, but not actually what I was currently
planning.
basically, the 3D engine does its thing, and when the console is active
("down"), then UI is taken over by the console (things like camera
controls, ... ignore user-input when the console or menus are active).
functionally, the console is like if one had the 3D game in the
background, and then summoned up a DOS-Prompt style environment on top
of it (partly translucent, so one can essentially see the 3D scene
"behind" the DOS-Prompt), and then proceeded to type commands which may
or may not effect the 3D world.
one can repeat the keyboard magic, and the console goes away, and one is
back to interacting with the 3D world.
but, the issue is that it is sort of a hassle to switch back and forth
between the 3D engine and an external text editor, so the idea is to
allow putting a text editor in the console (so that one can edit the
scripts for the game directly inside the game engine, and more quickly
see the results of doing so).
this way, the console-key magic also allows switching between the 3D
world and a text editor, and one can edit things, and hit a key to
evaluate whatever is currently in the editor.
say: F5=Go, or similar.
say, for example, a person wants to make all the lights in the immediate
vicinity of the player explode, they could go in the editor and quickly
type something like:
<--
var cur, nxt;
cur=btFindRadius(btGetCurrentPlayer().origin, 512);
while(cur)
{
nxt=cur.chain;
if(cur.light)btBecomeExplosion(cur);
cur=nxt;
}
-->
then hit F5, and watch as all the lights in their immediate vicinity
explode and the area around them goes dark.
(yes, I was actually fiddling around with manually exploding the
light-sources recently... kind of a LOLZ effect).
or such...
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
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