How good is the console really?

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

How good is the console really?

Postby Blµb » Tue Mar 18, 2008 5:25 pm

Ever wondered what you can actually do with the console in nexuiz?
Some freaky scripting has been done with the DP console before, like loops, if-elses...
I've set up some small x86-instruction-like "api", and created an AOP (alias-oriented programming language :P)

And well, see for yourself what the 2.4 console can do:
http://stud4.tuwien.ac.at/~e0725517/nexuiz/bball.avi

When working on that, I even manged to find some bugs in the console, which of course can be avoided, and are already fixed in SVN =)

Sadly, while that ball is bouncing, you cannot do much, so I decided to enhance the console a bit, with just a single new command:
Code: Select all
defer <delay in seconds> <command>


No, this command does not exist either in 2.4 or in SVN, but who knows, maybe it gets in?
It DOES have some good uses, like
Code: Select all
defer 100 "play2 misc/armor2.wav; echo ^1QUAD IN 20 SECONDS!!!"


And beside that, here's what I did with it:
http://stud4.tuwien.ac.at/~e0725517/nexuiz/pong.avi
(NOTE: I play that bad on PURPOSE so you actually see that you can score too :P)

This is an example of what one can actually do with only a few resources. One can build on them.

Sources are available here:
http://stud4.tuwien.ac.at/~e0725517/nexuiz/x86/
(note: For 2.4 you need to remove the floor/ceil rpn calls, and you cannot use the push and pop functions, they're not used in pong/bball either)
Last edited by Blµb on Tue Mar 18, 2008 5:45 pm, edited 1 time in total.
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby C.Brutail » Tue Mar 18, 2008 5:30 pm

OMG ROFL 1337! :D
"One should strive to achieve; not sit in bitter regret."
WE ARE NEXUIZ.
Image
Image
C.Brutail
Laidback mapper
 
Posts: 2357
Joined: Tue Feb 28, 2006 7:26 pm
Location: Ironforge

Postby Bundy » Tue Mar 18, 2008 6:35 pm

I would own you in pong, but thats really impressive :shock:

I am not sure if I would like to see such a timer, but of course, its only an example ...
defer 100 "play2 misc/armor2.wav; echo ^1QUAD IN 20 SECONDS!!!"
Last edited by Bundy on Tue Mar 18, 2008 6:36 pm, edited 1 time in total.
Bundy
Alien
 
Posts: 230
Joined: Sat Jun 23, 2007 10:47 am

Postby GreEn`mArine » Tue Mar 18, 2008 6:35 pm

That's really, really interesting !
IRC quote:
[kojn] I've been coming a bit more recently
[kojn] she took it the dirty way
GreEn`mArine
Forum addon
 
Posts: 1509
Joined: Tue Feb 28, 2006 9:33 pm
Location: Germany

Postby [-z-] » Tue Mar 18, 2008 7:21 pm

Image
Was this you?
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Blµb » Tue Mar 18, 2008 8:03 pm

No but I did some fixes for that yesterday :P
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby AceOfThumbs » Tue Mar 18, 2008 8:42 pm

Pretty cool, Blµb. Is the cfg missing some binds though? I didn't see how you could move the paddles.

There are some interesting thoughts brewing among the config wizards. Mr. Bougo has been working on conditional statements too. I made some looping and conditional statements a while back and I recently got around to documenting them for others to use.

It's interesting to see the different approaches. I'll post mine too. you should check out how I use toggle for string comparisons. I think it's a little cleaner than creating aliases of each string.

http://forums.alientrap.local/viewtopic.php?p=33951
So much to do, so little time to do it
AceOfThumbs
Alien
 
Posts: 158
Joined: Tue Sep 04, 2007 11:12 pm

Postby Blµb » Tue Mar 18, 2008 8:52 pm

AceOfThumbs wrote:Pretty cool, Blµb. Is the cfg missing some binds though? I didn't see how you could move the paddles.

There are some interesting thoughts brewing among the config wizards. Mr. Bougo has been working on conditional statements too. I made some looping and conditional statements a while back and I recently got around to documenting them for others to use.

It's interesting to see the different approaches. I'll post mine too. you should check out how I use toggle for string comparisons. I think it's a little cleaner than creating aliases of each string.

http://forums.alientrap.local/viewtopic.php?p=33951


I haven't added the movement binds, there are aliases to move though
In game I did
Code: Select all
bind F2 "pong_mov1 -1"
bind F3 "pong_mov1 1"
bind F5 "pong_mov2 1"
bind F6 "pong_mov2 -1"
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby The mysterious Mr. 4m » Tue Mar 18, 2008 8:58 pm

i bow to you, oh, mighty geek god, Blµb! :lol:


"Nextris" has already been in earlier versions, if i recall correctly, or am i confusing something? tZork? Div? Esteel?
4m [PB] (amoebios)

This is Your world.
The mysterious Mr. 4m
Forum addon
 
Posts: 1402
Joined: Wed Mar 01, 2006 6:03 pm
Location: germany

Postby KadaverJack » Tue Mar 18, 2008 11:32 pm

4m wrote:"Nextris" has already been in earlier versions, if i recall correctly, or am i confusing something? tZork? Div? Esteel?

The code has always been there (it's actually from a q1 mod), but it never worked.
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Next

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron