Joshua a.k.a sigonasr2’s Blog

October 9, 2008

Fun with bash History

So today I found a nifty script that shows your top 10 commands used in bash. This is a very cool script to let you know what you have been doing and tells people about you.

So, this is on the unstable server, where I do most of my experimenting on. It returned these results:

57 cd
56 bzfs
43 screen
27 ./obstacle_course.sh
24 ./super_maze.sh
20 killall
16 mysql
13 history
13 g++
13 crontab 

So according to these results, I experiment with script running alot, do a lot of file browsing, run BZFS (BZFlag Server) which means I do a lot of testing in BZFlag maps. Screen is up in third also, which means I do a lot of programs that I stay running. I got killall, which I used to kill all my scripts and BZFlag servers. MySQL was strictly for my website. History is just this script XD. g++ is used to convert plugins to .so from .cpp so that they can be used in BZFlag, so I do lots of plugin conversions. Crontab shows up, which I use to modify how often my random map generating scripts run.

So, unstable isn’t the only server I have available, so I took a look at twilight, my strictly BZFlag server:    121 /bzflag/builds/2.0.x/bin/bzfs
     84 screen
     61 killall
     35 cd
     32 nano
     20 ./keepalive.sh
     17 ps
     17 ls
     14 kill
     12 bzfs

According to this list, I have bzfs up at the top with 121 uses. So obviously bzflag strictly. Again, we have screen and killall up there, both used for bzfs related stuff. cd and nano (Command Line Editor) are up there too, as I did minor modifications right in the terminal. We have keepalive which is basically a script that runs the whole server (Including bzfs, so bzfs could really be 141). Down near the bottom, ps (While I was experimenting with processes), ls for file browsing, and kill which I used in correspondence with ps. bzfs is at the bottom, these are just failed attempts to execute the top bzfs because I remembered that this wasn’t unstable, so bzfs wasn’t included as a normal function, so you have to go to the actual directory where it’s installed.

Ok, so that was a little interesting with the command line. By the way, that code is:
history | awk '{print $2}' | awk 'BEGIN {FS="|"} {print $1}'|sort|uniq -c | sort -n | tail | sort -nr
Placed it in that textarea because wordpress does not show ' and " correctly in a terminal.

Alrighty, next up on the list of stuff to talk about, is Game Maker.

First off, my new game release, Multi-Breakout 2.

(Taken from http://sigonasr2.servegame.org/zgamers/v2/index.php?Multi-Breakout2)

Main Goal Although this may sound like a basic Breakout game, it is not. The concept itself is completely original. Instead of just hitting blocks, you have to hit blocks with 2 other players! You have health, and every time you hit a block, you gain 3 health and your opponents lose 5 health. Over time, this health adds up! There are also powerups you can get, and as you see the effects of each and their icons, you can try to memorize which ones do what. Finally, when you do hit a block, it gets sent to your opponent’s fields after a short amount of time. This means that the more blocks you hit, the more blocks you create on your opponent’s side to block out the stage and possibly make it harder for them to survive!

Some screenies (Click to view enlarged):

Download: multi_breakout2.exe

 

 

Alrighty, that’s that. Next up, I have made a Steady Healthbar example.

(Taken from http://gmc.yoyogames.com/index.php?showtopic=400958)

  • Title: Steady Healthbar Example
  • Description:The goal of this example is to accomplish a smoothly decreasing healthbar.Most of the time when you play a game, and you lose a health, you see the healthbar
    go from a certain point directly to another point.This example makes smoothly decreasing healthbars instead, which can be useful in
    lots of ways to make your game graphically enhanced.
  • GM Version: GM 7
  • Registered: no
  • File Type: .gmk
  • File Size: ~38 kb
  • File Link: steady_healthbar.gmk
  • This is an example that I am pretty proud of. It shows a ball getting hit by a continuous bullet slowly losing health, and then there’s a DDR-style healthbar that you can press the up and down arrow keys on to make it gain or lose health, smoothly, of course ;)

     

    So that takes care of the topic of Game Maker. What else have I got…

    Oh yeah, I finished reading the Space Odyssey series. Great books, probably the first ever I’ve seen with so much science fiction and action in it. If I were to rate these books in the series on a scale of 1 to 10, I’d give them:
    2001: A Space Odyssey 

    8

    (Great Book, but I read this one second, so I kinda knew how everything was gonna turn out. Kind of interesting to connect it to 2010 after reading it.)
    2010: Odyssey Two 

    9

    (The book that got me started on this series. Just loved it.)
    2061: Odyssey Three 

    6

    (Why such a low rating? Well, truthfully, half of the book was retelling of 2001 and 2010, which I sort of hated, but it was still pretty cool that they went out to Haley’s Comet, then to Europa. And Heywood Floyd’s son.)
    3001: The Final Odyssey 

    10

     (The best of the series in my opinion. I loved all the future concepts and how communication and exploration of the various planets worked. I just liked the fact that we got to see so much detail from Frank Poole’s mind and that he was living a literal luxurious life.)


    So, what am I reading now. Well, guess what? I went to our library, and looked at more of Arthur C. Clarke’s books, and I found a book called “Rama Revealed”, so I picked it and started reading it. Truthfully, another great book so far, I loved the first chapter, already intense with Nicole scattering to a hideout she’d have to live in for a few weeks until phase two of the escape plan can start. Just great. One strange thing though, is that I picked the last book in the series (hmm), see a patten yet? I always seem to pick a book that is not the beginning of a series. But I think it’s kinda cool, because later you can link it to previous reading and put it all into the big picture!

     

    So, now I want to talk to you about a neat little program called CExe.

    Cexe’s goal is to produce smaller exe files using the smallest possible exe compression method. It uses the framework of zlib and lzw. It worked quite well with the Game Maker Executables, dropping fightersfield from 6.3 MB to 5.3 MB and dropping simple_race (another one of my unreleased games) from 2.6 to 1.5 MB. Basically, it drops them 1 MB, which could make some difference for some people, so it works. If you really wanted to, you can then put it in a zip file dropping fighter’s field to 4.8 MB and simple_race to 1.2 MB.
    This was produced by a person named Scott Ludwig, and that’s the post about CExe, and the download by it. Very nice job Scott, you did well.
    http://www.scottlu.com/Content/CExe.html

     

    That’s about all for tonight. Yes, another long post, I think this’ll happen often now since I’ll be posting once every week or so, so I get a lot of stories then post. Anyways, see you later!

    September 27, 2008

    Rincon High School

    As you may know from previous posts, I am in the marching band for our school and we go to football games to play and cheer on our football team. So yesterday we went up to Rincon High School. By now, we’ve had 3 games and I didn’t expect to see much of an improvement from our 0-3 win-loss record for our football team. We arrived at the high school, got into the bleachers on the visitors side and started our normal stuff. We got to march our pre-game show and I say it wasn’t the best, but decent. Pretty soon (I think it was 4 or 5 minutes into the first quarter), we make a touchdown! Well, this happened in our first game, but we ended up getting beat, so we were like, ok that’s great, now let’s see what happens. So we wait and wait, and I think 3 minutes before the first quarter ended, we make yet another touchdown. The kick gets blocked, but that still has the score at 13-0. So the game continues into second quarter, near half time, Rincon gets their first touchdown and kick. So score is 13-7. We then got to watch Rincon’s half-time show, which I must say is pretty dang impressive. Although I did watch their off-step’ness happen here and there (They wore black pants compared to our white pants so being off-step isn’t as major for them), but other than that, they created some impressive sets. The fast follow-the-leader move at the beginning of the show was great, and near the end they got into a perfectly made diamond. I noticed there were a lot of gaps, but other than that they did impressive. Afterward, they played their fight song which was also one of the most impressive things I’ve ever seen, not just the quality of the song, but what they did during it. They bobbed up and down, turned left and right, moved here and there, and was just all-out fun. I do not think any other band has ever done something as spectacular as this before. But this wasn’t the only thing that made this day probably the best football game I’ve ever been to. It’s also when we got to meet them. Rincon has about the same amount of band students as we do (A Division One band just like us) and we got to meet and greet them. These people were great, I couldn’t believe how exciting they were, how they felt about everything, and most of the Alto Saxophone’s names were short 3-5 letter names (Like Sam), which I found kind of funny. We got to make a crazy train of people and about 100 kids all ran around the tennis courts we were at turning this way and that with others grabbing on to the end, it was crazy fun, probably the most active group of band students I’ve ever seen. After that, we got to watch the rest of the game, and only from the third-fourth quarter did I notice their band in the bleachers and got to see exactly what they did. During some of their songs, they would start doing little dances in the bleachers, the trombones would duck while every other trombone turned to the left or the right, and they’d alternate this throughout the song. The tubas turned left and right and it was very noticeable as the bells were very large. And all the other sections also did nifty things in the stands. We were in awe at everything they did to make their band look so fun. (Even makes me think about joining them XD) They even got to play the Mortal Kombat Theme Song, which was amazing. And as if it couldn’t get any better, our football team won 13-7 and making our win:loss record 1:3. Go Buena!

    Oh man, I just wrote such a long passage on that, but this is a moment I’ll probably remember for the rest of my life. I do not think I will ever forget yesterday. So, want to know what else is going on? Some less-exciting things (In my opinion) including that we’re gonna be joining in on this 3-month YoYoGames competition. The Z-Gamers are going to try to win money if we can and we’re gonna create hopefully what’s gonna be a great game. (For more information on this, see http://www.yoyogames.com/gamemaker/competition04) This is going to be called Project GLOBE for us, since the competition needs to be based on Saving the Planet in some way or form. (From Natural Phenomenon, not Alien Invasions) So that’s something to think about.

    I also have never talked about a neat little desktop-viewing program I found called TeamViewer. (http://www.teamviewer.com/) What is this program you ask? Well, it lets you easily view another person’s screen by just giving them a 9-digit ID and 4-digit password. You may think this is a little insecure, but who would really need to view someone else’s desktop and guessing could still take forever. Anyways, I can’t tell you how easy this program works. As a very convenient feature, you can simply run the program from the installer, and not even install the program! This is great for just trying it out and I installed the program thereafter. This program also easily passes a firewall, so you don’t have to sit around wondering why you cannot connect. The reason why this happens is because it authenticates through another server, so your computer won’t bother blocking out that connection in which a user can pass through. By default, the user that connects with you can interact with your desktop (As in move your mouse around) and type things, not just watching. If you do not want to do that, you simply go to the Options menu before connecting, and change what you want to let them control. I also like how it’s easy to simply switch to the other person’s monitor, this makes it so that you don’t have to restart the program and give out a new id and password. Also as a final note, your id will always stay the same, so you just have to give out a new password!

    What else has been happening? (As if that’s not enough reading already!) I started playing BZFlag again! I think it’s kind of a bored-sense thing, but I’m back now, and I introduced to myself to the players that still played. It’s still pretty fun, and I still have my servers I run and everything. Warinthestar wants me to rebuild Twilight, but I don’t think I’m ready for that yet. :P I just wanna play for now. One thing I want to create is a large randomly generated BZFlag maze, where there are different colored teleporters so that you can distinguish if you’ve been through a path already. This will hopefully be nice once I complete it, and there will be I think 400 different “squares” in the teleporter maze. This will make for a pretty challenging teleporter maze, and I’ll probably let it rotate mazes every once in awhile. (I may make an added challenge where you must find the flag, then the base!) This’ll be a fun Bash Script to create!

    Hmm…Is there anything else I have to discuss? I think that’s it for now! This is the longest post I have made so far, but I think it covers 2-week’s worth of missing posts, so that should do it.

    April 14, 2008

    Google Uploader is Buggy

    Today I was trying to upload that large Earthbound video I was going to put on the site, but it seemed to have failed…6 times. I had no clue why my uploaded video wasn’t appearing on the site, until I came upon one of my friends who has used it multiple times. He says that after the video is “done”, you must press Upload again and then it’ll “finish” the upload. The second time always works. I am currently uploading the new Earthbound video, and hope his tips follow. I do like how the upload resumes if your network breaks off or something, so it’s pretty good.

    I was looking through some search engines for a good screen sharing program that’s easy to use to easily see another person’s desktop screen and watch what they’re doing. I happened upon Bosco’s Screen Share which is a very nice and simple program indeed. It tells you your IP address, and if your firewall and router settings are set up correctly, so you won’t have any issues. You can then “Dial” a computer like calling a telephone and the recipient can  accept or deny access to viewing their screen. Another nifty thing is the “Privacy” feature, which at any time a person is viewing your screen, you can click it and makes them see a black screen. So if you need to quickly log in to a bank account or something, you just click and that should do it. I found the program slightly sluggish though, but changing the process priority to BelowNormal speeded up my computer and kept a steady frame rate for the receiver.

    In other news, I created the hard level of BZFlag Racecourse today. It is very tricky and this screenshot below is color coded. Red=Basic Path Green=You need to jump here to continue Blue=Climbable Slope

    It is a very challenging map and it is up at twilight.fairserve.net:5219 if you ever get the chance to try it.

    The hard BZFlag raceCourse

    If you haven’t noticed, I added a huge section on Bash scripting into my Linux Tips page if you want to check that out.

    I stumbled upon this website called Computer Stupidities and it’s full of jokes about how dumb people can be when it comes to operating systems. It involves mainly tech support and your average customer. Two of my favorites:

  • Customer: “How much do Windows cost?”
  • Tech Support: “Windows costs about $100.”
  • Customer: “Oh, that’s kind of expensive. Can I buy just one window?”

  • Customer: “I have Windows Thirty One.”
  • Tech Support: “Ok, this program requires either Windows 95 or Win32s. Do you have Win32s on your system?”
  • Customer: “No, I have Windows Thirty One, not Thirty Two.”
  • Tech Support: “Windows 3.1 is the operating system. Win32s is a program that makes your computer fast like Windows 95.”
  • Customer: “What’s Windows Ninety Five got to do with it?”
  • Tech Supprort: “You need either Windows 95 or Win32s to run this.”
  • Customer: “I HAVE THIRTY ONE! WHY WON’T IT WORK?”
  • Tech Support: (giving up) “Ma’am, your computer is too old. Buy a new one with Windows 95.”
  • Customer: “I’ve heard about Windows Three Hundred and Eleven. Wouldn’t that be better than Ninety Five?”
  •  http://www.rinkworks.com/stupid/cs_os.shtml 

    I also got a huge stuffed white tiger. It is about 4′ 8″ in length. With its tail stretched out, it gains an extra 3 feet. I like it! I will post a picture of it later.

    April 9, 2008

    Scripts Scripts Scripts

    Filed under: 1 — Tags: , , , , , , , , — sigonasr2 @ 7:09 pm

    The reason why I didn’t take the time to make a post yesterday was due to the fact that I was busy working on our church’s website. I was adding in a comment script, which will be used to easily add news/information to any page. Now they also wanted me to find an image uploader script we can use. I find out that the server I am currently running the website on does not have the latest version of PHP, so I cannot find any script without the function ImageCreateTrueColor(). Until my host updates PHP, I am kinda stuck. He doesn’t feel it would be safe to update until Ubuntu 8.04 comes out with the new PHP version installed, so I guess we can wait for two weeks.

    I have been starting to work on a bash script (what ubuntu reads in the command line) that creates those race courses you saw from my last post. If I get it to work, it can randomly generate courses and make it better and fun. The hard part is coming up with the smart part of the script. I want it to choose from a list of obstacles randomly, and implement them based on what level you tell the script to make. (Like 1=easy 2=medium 3=hard) I will post progress on it later.

    At our school, one of our other “nerd” friends now sits with us. I am so glad. I don’t really care if others think I am a geek, I actually like to say, “Yep, I am a nerd if that’s what you call me.” I tend to not care what people think of me as long as that’s the normal way I act. If someone says “You suck.” Then I’ll say “Ok, I suck then, if that’s what you consider sucking.” I find it to be a nice way to prevent people from degrading me, and even when they keep bothering me, you just ignore them. Oh yeah, we had to take the experimental Science AIMS (Arizona Instrument to Measure Standards) which is basically a test, and they now require you to pass a science portion to graduate, well…not yet at least. We’re like the guinea pigs and we’re determining what they have to fix for the test. I found it really easy. We also took a test called the TerraNova, which is a general knowledge test involving math and reading questions.

    I want to finish this post with a little thought about Time Travel. I’ve always been fascinated about time traveling and always wondered if it really was possible. Usually when I look at things, I look and think about things alot differently than everyone else. I tend to expand on thoughts that are never thought of. I was thinking about this during class today. I’ve always thought, why would we need a time machine? Well, to get through the fabric of time and space, you need to be able to warp ‘through’ it. Now it’s just a matter of figuring it out. A black hole was always a thought, but how would you survive through that? I just wish our body’s didn’t combust once we reached the speed of light. Maybe we can send something, that’s tough enough to survive traveling faster than the speed of light. Or maybe we could send something through a black hole. But then there’s the fact of figuring out how we can communicate with the data. If it’s in the past, it would be in record, wouldn’t it? If it’s in the future, will we even know what the object tells us until we reach that point in time? It’s just all too crazy to figure out. We are far out from time travel now.

    Blog at WordPress.com.