How good is the console really?

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

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.
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm

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
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

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.
    User avatar
    Bundy
    Alien
     
    Posts: 230
    Joined: Sat Jun 23, 2007 10:47 am

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

Tue Mar 18, 2008 7:21 pm

Tue Mar 18, 2008 8:03 pm

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

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
    User avatar
    AceOfThumbs
    Alien
     
    Posts: 158
    Joined: Tue Sep 04, 2007 11:12 pm

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"
    User avatar
    Blµb
    Alien trapper
     
    Posts: 277
    Joined: Thu Mar 29, 2007 1:49 pm

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

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.
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Fri May 02, 2008 9:14 am

  • Could someone please give me an example of a command using defer that loops. Xeno did it to me, it repeated Haha every second.

    Code: Select all
    defer 1 "say Haha ; loop"
    alias loop "defer 1 /"say Haha""


    I'm really stumped. [/code]
    User avatar
    shaggy
    Alien trapper
     
    Posts: 419
    Joined: Tue Apr 03, 2007 6:12 am

Fri May 02, 2008 12:05 pm

  • You want it more like:

    alias loop "say haha; defer 1 loop"

    Simpler :)

    The problem is that it won't stop :p
    User avatar
    Mr. Bougo
    Keyboard killer
     
    Posts: 760
    Joined: Mon Sep 10, 2007 3:29 pm

Fri May 02, 2008 12:42 pm

  • then stop by setting the alias loop to ""
    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

Fri May 02, 2008 10:30 pm

  • Ah that's it :D thank you. Mr. Bougo and Green Marine.
    User avatar
    shaggy
    Alien trapper
     
    Posts: 419
    Joined: Tue Apr 03, 2007 6:12 am



Return to Nexuiz - General Discussion




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest