You < /dev/notptr https://matrix.underhalls.net CNC Wood Hotel Tags Wed, 21 Jul 21 19:38:36 -0500 Matthew Deig https://matrix.underhalls.net/post/2021-07-21_CNC_Wood_Hotel_Tags https://matrix.underhalls.net/post/2021-07-21_CNC_Wood_Hotel_Tags Project

I got a longmill cnc over the covid lock down, and I have been teaching myself how to CAD and woodworking. I did a few practice stuff making a phone holder for my cell phone and a Christmas sign.

For my current project I making some keyring tags that look like the old hotel ones. I figure that would give me a chance to practice engraving and carving with the cnc.

It turns out it did work out for learning them, the hardest part for me is coming up with items to engrave onto the tags.

Images

Engraved version Batch of tags

]]>
Doom Luancher Script Thu, 17 Dec 20 19:01:22 -0600 Matthew Deig https://matrix.underhalls.net/post/2020-12-17_Doom_Luancher_Script https://matrix.underhalls.net/post/2020-12-17_Doom_Luancher_Script #!/usr/bin/env bash PWADDIR='/home/notptr/doom_stuff/pwad/' PWADDIR='/home/notptr/doom_stuff/pwad/' IWADDIR='/home/notptr/doom_stuff/iwad/' DOOMPORT='/home/notptr/doom_stuff/eternity-bin/eternity' IWADSEL=$IWADDIR$(ls $IWADDIR | dmenu -l 30 -p "Select Doom Iwad" -i) CONPWADADD='Yes' PWADSEL='' while [ $CONPWADADD = 'Yes' ] do NEWPWAD=$PWADDIR$(ls $PWADDIR | dmenu -l 30 -p "Select Doom Pwad" -i) PWADSEL=$PWADSEL' '$NEWPWAD CONPWADADD=$(echo -e "Yes\n\nNo" | dmenu -p "Want to add more Doom Pwads?" -i) done if [ -z $PWADSEL ] then $DOOMPORT -iwad $IWADSEL else $DOOMPORT -iwad $IWADSEL -file $PWADSEL fi exit ]]> Advent of Code Day 3 Sun, 06 Dec 20 14:12:31 -0600 Matthew Deig https://matrix.underhalls.net/post/2020-12-06_Advent_of_Code_Day_3 https://matrix.underhalls.net/post/2020-12-06_Advent_of_Code_Day_3 Current Status

As of this post I only did Day 1, 2, and 3. The current day for this is Day 6. I been doing this at my own pace. I feel like I’m getting better with lisp with these puzzles, and I had to look at other people’s solutions to fully understand what the problem was asking for.

Day 3

Day 3 has you finding out how many trees you hit on a toboggan stuck on one path

here is the code

(defparameter *toboggan-vel* '((1 1) (3 1) (5 1) (7 1) (1 2)))

(defun read-file-in (filename)
  (with-open-file ( in filename
                       :if-does-not-exist nil
                       :external-format '(:utf-8 :replacement "?"))
    (loop for line = ( read-line in nil nil )
          while line collect line)))


(defun is-tree? (pos-char)
  (if (char= pos-char #\#) t))

(defun toboggan-y-vel (lines vel)
  (cond ((eq lines nil) '())
        ((= vel 0) lines)
        (t (toboggan-y-vel (cdr lines) (- vel 1)))))


(defun check-toboggan-path (lines pos)
  (cond ((eq lines nil) '())
        ((not (is-tree? (char (subseq (car lines) pos (+ pos 1)) 0))) (cons #\O (check-toboggan-path (cdr lines) (mod (+ pos *toboggan-x-vel*) (length (car lines))))))
        ((is-tree? (char (subseq (car lines) pos (+ pos 1)) 0)) (cons #\X (check-toboggan-path (cdr lines) (mod (+ pos *toboggan-x-vel*) (length (car lines))))))
        (t '())))

(defun check-toboggan-path-2 (lines pos y-vel x-vel)
  (cond ((eq lines nil) '())
        ((not (is-tree? (char (subseq (car lines) pos (+ pos 1)) 0)))
         (cons #\O
               (check-toboggan-path-2 (toboggan-y-vel lines y-vel) (mod (+ pos x-vel) (length (car lines))) y-vel x-vel)))
        ((is-tree? (char (subseq (car lines) pos (+ pos 1)) 0))
         (cons #\X (check-toboggan-path-2 (toboggan-y-vel lines y-vel) (mod (+ pos x-vel) (length (car lines))) y-vel x-vel)))
        (t '())))

(defun count-tree-hits (path)
  (loop for item in path
        when (char= item #\X)
          sum 1 into total
        finally (return total)))

(defun mul-tree-hit-counts (tree-hit-list)
  (cond ((eq tree-hit-list nil) 1)
        (t (* (car tree-hit-list) (mul-tree-hit-counts (cdr tree-hit-list))))))

(defun loop-vel ()
  (loop for item in *toboggan-vel*
        collect (count-tree-hits (check-toboggan-path-2 (read-file-in "puz3.in") 0 (cadr item) (car item)))))
]]>
Advent of Code Day 1 and Day 2 Fri, 04 Dec 20 14:52:35 -0600 Matthew Deig https://matrix.underhalls.net/post/2020-12-04_Advent_of_Code_Day_1_and_Day_2 https://matrix.underhalls.net/post/2020-12-04_Advent_of_Code_Day_1_and_Day_2 Advent of Code

I figure I would give it a try this year. Just some small problems to code out. I the language I chose to use was Common Lisp using sbcl. As of this post I just did Day 1 and Day 2.

I’m using common lisp because I though it be fun to use and I still want to get better at using it. I still had to search around to find out how to use some of the functions in lisp still, but I feel I like I’m getting there.

Day 1

Day 1 was to find what 2 transactions summed equal to 2020 and give the product of those numbers

(defparameter *transactions* nil)


(defun read-file-in (filename)
  (with-open-file ( in filename
                       :if-does-not-exist nil
                       :external-format '(:utf-8 :replacement "?"))
    (loop for line = ( read-line in nil nil )
          while line collect line)))

;;part one
(defun sum-2020? (transaction)
  (loop for item in *transactions*
        when (= (+ transaction item) 2020)
          return (* transaction item)))
;;part two
(defun sum-three-2020? (transaction)
  (loop for item2 in *transactions*
        collect (loop for item3 in *transactions*
                      when (= (+ transaction item2 item3) 2020)
                        return (* transaction item2 item3))))

Day 2

Day 2’s was validating password rules from a database corruption. For this one I borrows a snippet from common lisp cookbook and rolled my own boolean-xor

(defparameter *password-policy* nil)

(defun read-file-in (filename)
  (with-open-file ( in filename
                       :if-does-not-exist nil
                       :external-format '(:utf-8 :replacement "?"))
    (loop for line = ( read-line in nil nil )
          while line collect line)))

;;took from http://cl-cookbook.sourceforge.net/strings.html
(defun split-by-one-space (string)
    "Returns a list of substrings of string divided by ONE space each.
     Note: Two consecutive spaces will be seen as if there were an empty string between them."
    (loop for i = 0 then (1+ j)
          as j = (position #\Space string :start i)
          collect (subseq string i j)
          while j))

(defun split-by-one-hypen (string)
  "returns a list of substrings of string divided by ONE hypen"
  (loop for i = 0 then (1+ j)
          as j = (position #\- string :start i)
          collect (subseq string i j)
        while j))

(defun process-file-line (line)
  (list (car (split-by-one-hypen (car (split-by-one-space line))))
        (car (cdr (split-by-one-hypen (car (split-by-one-space line)))))
        (subseq (car (cdr (split-by-one-space line))) 0 1)
        (car (cddr (split-by-one-space line)))))

(defun boolean-xor ( test1 test2 )
  (cond ((and test1 test2) nil)
        ((or test1 test2) t)
        (t nil)))


(defun valid-password? (password)
  (if (<= (parse-integer (car password)) (count (char (caddr password) 0) (cadddr password) :test #'equal)
          (parse-integer (cadr password)))
      t))

(defun valid-password2? (password)
  (if (boolean-xor
       (char= (char (caddr password) 0) (char (cadddr password) (- (parse-integer (car password)) 1)))
       (char= (char (caddr password) 0) (char (cadddr password) (- (parse-integer (cadr password)) 1))))
      t))

(defun count-valid-passwords (pass-list)
  (loop for item in pass-list
        when item
          sum 1 into total
        finally (princ total)))
]]>
Update to the blog yet agian Mon, 30 Nov 20 11:50:52 -0600 Matthew Deig https://matrix.underhalls.net/post/2020-11-30_Update_to_the_blog_yet_agian https://matrix.underhalls.net/post/2020-11-30_Update_to_the_blog_yet_agian Update

So I updated this blog again to use flask and python. I figure if I did this way it can open up a few more things I can do for the blog.

I looked into webmentions and it looked hard to do under hugo so I figure I would just update to use a server side blog.

Any weirdness

Let me know if anything weird happens on this site on my mastodon account or whatever works for you

]]>
Mix CD VOL 1: Spacey Mon, 15 Jun 20 00:00:00 -0500 Matthew Deig https://matrix.underhalls.net/post/2020-06-15_Mix_CD_VOL_1:_Spacey https://matrix.underhalls.net/post/2020-06-15_Mix_CD_VOL_1:_Spacey Notes

I was trying to go for a space like mix. If any of these links are wrong just hit me up. I will fix it.

Tracks

Track Name Artist Duration Link
Paper Dolls 4mat 3:11 Bandcamp, YouTube
Makin It lpower 6:18 Bandcamp, Internet Archive
Orbital Sky Diving Gario 3:18 Bandcamp
Wake Up Aseul 4:20 Bandcamp, YouTube
Every Day is Night Garoad 3:40 Bandcamp, YouTube
LazerSwag Coyote Kisses 4:49 YouTube
Floating on Simple Waves TheGuitahHeroe 4:08 Bandcamp, YouTube
Triumph nervoustestpilot 4:56 YouTube
Untouchable Nimanslin 4:53 YouTube
Subaquos Ipsum Vrantheo 1:57 YouTube
Everything will be okay in the end don’tblinkoryou’lldie 5:42 Bandcamp, Youtube
Future, and It Doesn’t Work Starscream 5:25 Bandcamp, YouTube
]]>
Game Log For Puzzle Game Sun, 10 May 20 00:00:00 -0500 Matthew Deig https://matrix.underhalls.net/post/2020-05-10_Game_Log_For_Puzzle_Game https://matrix.underhalls.net/post/2020-05-10_Game_Log_For_Puzzle_Game Puzzle Game

I have been working on game during this COVID-19 quarantine, since it seemed to be a good use of time. I’m aiming for a game that is similar to Super Puzzle Fighter Turbo. The reason I chose to make something similar to that is because I have a friend that is good at it and I figure I just make a game similar to beat him at it.

My Design

Setting

I was going to set in sometime of cyberpunk setting and the puzzle fighting is hacking in this game.

Game play

It is going to similar to Super Puzzle Fighter Turbo that it will have the matching and to clear out the matches you need a clear block that matches it. What I was thinking of changing for my game is to add a deck building aspect. In Puzzle fighter there is counter attacks to match pattern of blocks, I figure I can come up with a deck cards that can be used as power ups instead of the counter patterns.

What do I have

I started this back in 2020-03-29 and I had a good pace until now, but I have a lot of collision detection ironed out using test blocks. I mainly got the block playing area done which in the code is called grid. The blocks are hard coded as the same two blocks but it does help me out though with testing. I also have it set up to display and updated the two player’s grids, but I have the game window too small to handle the playing area. In which will be a next step for me to fix.

Visual Items

img

]]>
Starting Steps of Generative Art Sun, 29 Dec 19 19:14:17 -0600 Matthew Deig https://matrix.underhalls.net/post/2019-12-29_Starting_Steps_of_Generative_Art https://matrix.underhalls.net/post/2019-12-29_Starting_Steps_of_Generative_Art Why this road

I got inspire by my visit up to the Vintage Computer Festival Midwest with their talk on the computer that made the Death Star plans graphics. Then later on this year I saw this post Functional Christmas Article on Generative Art and I recently was picking up Clojure and was thinking that I could use this to do something like I saw at the Festival. Turns out it wasn't too bad to try to get something like it, because I found this video of retro computer graphics so I dug in.

First Attempt

I started out doing circles to get some polar coordinates down and some other functions but I ended up switching to lines and came up with this

Unfortunately I don't have the code that made that video.

My other experiments

A few more of my experiments.

My Final Experiment of the Day

While I was working on the lines I decided to add more lines to the animation. When I was doing that it started to look like a ship scanning something so I ended up creating what I was seeing.

I do have the code for that

``` (defn polar-conv-x [r x] ( r (q/cos x))) (defn polar-conv-y [r y] ( r (q/sin y)))

(defn parametic-fun-x [x] (+ (q/sin (/ x 10.5)) (q/cos (/ x 5.5))))

(defn parametic-fun-y [y] (+ (q/cos (/ y 2)) (q/sin (/ y 4))))

(defn setup [] ; Set frame rate to 30 frames per second. (q/frame-rate 30) ; Set color mode to HSB (HSV) instead of default RGB. (q/color-mode :hsb) (q/background 0) ; setup function returns initial state. It contains ; circle color and position. {:color 0 :t 0})

(defn update-state [state] ; Update sketch state by changing circle color and position. {:color (mod (+ (:color state) 0.7) 255) :t (+ (:t state) 0.1)})

(defn draw-state [state] ; Clear the sketch by filling it with light-grey color. (q/background 0) ; Set circle color. (q/stroke (:color state) 255 255) ; Calculate x and y coordinates of the circle. (let [t (:t state) x (polar-conv-x ( t 2) (parametic-fun-x t)) y (polar-conv-y ( t 2) (parametic-fun-y t))] ; Move origin point to the center of the sketch. (q/with-translation [(/ (q/width) 2) (/ (q/height) 2)] ; Draw the circle. (q/line x y ( -1 y) ( -1 x)) (q/line ( -1 x) ( -1 y) ( -1 y) ( -1 x)) (q/line x ( -1 y) ( -1 y) ( -1 x)) (q/line ( -1 x) y ( -1 y) ( -1 x)) (q/line x ( -1 y) ( -1 x) ( -1 y)) (q/line x y ( -1 x) y) (q/line x ( -1 y) x y) (q/line ( -1 x) y ( -1 x) ( -1 y)) ))) ```

]]>
Phone Sign Sun, 10 Nov 19 18:04:11 -0600 Matthew Deig https://matrix.underhalls.net/post/2019-11-10_Phone_Sign https://matrix.underhalls.net/post/2019-11-10_Phone_Sign Old Bell System phone sign

Old Bell System phone sign

]]>
2019 Call of Duty Modern Warfare Sun, 10 Nov 19 11:04:56 -0600 Matthew Deig https://matrix.underhalls.net/post/2019-11-10_2019_Call_of_Duty_Modern_Warfare https://matrix.underhalls.net/post/2019-11-10_2019_Call_of_Duty_Modern_Warfare Thoughts

I recently got the game Call of Duty Modern Warfare to play with some co-workers and a buddy. I'm normally not a Call of Duty fan. I always got frustrated with how the game plays and feels. I come from a more arena shooters that are much quicker than Call of Duty, and the each weapon was different from each other. In this version of Call of Duty I am having a blast. The multiplayer is less spamming of the kill streaks and more of actually shooting the weapons. Most of the weapons don't feel that much different from each others. Each weapons have different stats but they really insta hit shoot straight, but that is the nature of guns in real life.

The single player I haven't fully finish playing but I enjoy most of it. The story is about what you get in military story. The set pieces where great. I enjoyed the embassy part of the single player.

Overall I had a blast playing this game. It might be one of the Call of Duty's that I liked.

Highlight Videos

]]>
Blog Update - Themes and the Indieweb Sat, 09 Nov 19 15:36:44 -0600 Matthew Deig https://matrix.underhalls.net/post/2019-11-09_Blog_Update_-_Themes_and_the_Indieweb https://matrix.underhalls.net/post/2019-11-09_Blog_Update_-_Themes_and_the_Indieweb Update

I updated this blog yet again. I updated the theme because I didn't like how hugo dusk theme has changed, so I ended up using my theme from my tumblr blog. It isn't a 100 percent copy of the tumblr blog, but it is pretty close

I also set my blog up to be able to be Indieweb supported. It sounded like a neat idea to add to this blog. I don't have everything set up but I think I will have it soon so there will be another update to the blog.

Plans

Add more items for the Indieweb. I would like to add the POSSE on this site though it might be harder to do because this site is static without JavaScript and the fancy web stuff. I will try to add the web mentions as well just so everything will be in one place.

]]>
Some Spam HTTP Post Sun, 26 May 19 12:37:42 -0500 Matthew Deig https://matrix.underhalls.net/post/2019-05-26_Some_Spam_HTTP_Post https://matrix.underhalls.net/post/2019-05-26_Some_Spam_HTTP_Post I had this idea to checkup on my logs for a web server I'm running and see what type of requests that it was getting. I wasn't planning on writing it any findings up but recovering from my latest hiking trip. I figure I would do something.

What stood out to me when I was looking at the logs. It was getting hit by spam drive-by attacks. Some typical basic ones of getting the myAdmin pages and other unsecured servers might have. Though I found a couple of request that were interesting to me anyways.

SQL in the request header.

The first time this showed up in my logs was May 7th 2019, and coming from China. The url request from my server is usually a hexadecimal url string. What caught my eye the most was in the request header there was a SQL like query in there.

554fcae493e564ee0dc75bdf2ebf94caads|a:3:{s:2:"id";s:3:"'/*";s:3:"num";s:141:"*/ union select 1,0x272F2A,3,4,5,6,7,8,0x7b247b24524345275d3b6469652f2a2a2f286d6435284449524543544f52595f534550415241544f5229293b2f2f7d7d,0--";s:4:"name";s:3:"ads";}554fcae493e564ee0dc75bdf2ebf94ca

I'm not sure what their target was. It looks to me they where looking for a possible a name with ads.

The server I pulled this from doesn't have any databases hooked up to it so this request wasn't harmful to me.

Reconnect to my server?

The first time this request showed up in my logs was May 04 2019, and coming from China. The request has a string of encoded hexadecimal and at the end is http protocol url of server ip address. Why it caught my eye was that it had server ip in the request url. This one I'm not sure what is going on with it. I'm going to take a guess that it might be some type of buffer overflow.

Conclusion

I'm not sure why this are attacks. I did searches on the string to see if anyone was talking about them. I didn't have any luck. I just wanted to write about because I thought they looked interesting. I fairly sure that they are coming from an automated script to see if they can get an easy target, because they do show up in my logs often with other requests from the same place. Just some of my thoughts on these POST requests.

]]>
Hiking Thu, 24 Jan 19 22:08:12 -0600 Matthew Deig https://matrix.underhalls.net/post/2019-01-24_Hiking https://matrix.underhalls.net/post/2019-01-24_Hiking Background

I haven't done a lot of hiking but last year (2018) I did couple of trips to Shawnee National Forest. I ended up taking an afternoon on the week and head to a place called One Horse Gap Lake. My first time out I made it but ended up wearing the wrong shoes and got terrible blisters on my feet. The next day I tried to hike out but I got lost and my feet killed me, so I ended up getting a ride out.

My second time, I planned it out better. I had better shoes. I had more water but I ended up picking the wrong weekend to go. The weekend ended up being a really hot weekend in October. When I made it to the camp site I was wore out by the heat and called for a ride the next morning.

Thoughts

Even though I didn't finish the trip without outside help, I still enjoyed it. I enjoyed being out there in the woods by myself. What I felt out there was just me and nature without the stress of the real world. I didn't have to worry about things that was not about life endangerment stress. The only time limit I had was the time the day turn to dark.

With the new year, I will try to go out hiking a little bit more. It may not be always an overnight, but I will try to get out more and enjoy the nature of it all. I felt nice out there in the woods just me and the items in my pack on my back. Just a tiny stream of thoughts for this one no planning on this post.

]]>
Hurt Art Scene Mon, 26 Nov 18 21:22:55 -0600 Matthew Deig https://matrix.underhalls.net/post/2018-11-26_Hurt_Art_Scene https://matrix.underhalls.net/post/2018-11-26_Hurt_Art_Scene What is going on?

Evansville has lost a couple of artist hangouts this year. One was the wired and the other was PG. Though Wired still livers as The Hub, but there is no new PG at the moment.

Who does this effect?

It effects the local artist of Evansville. They lost a couple of places to show their art and music to the community. It also effects the people that are looking for that local art community and enjoy it.

Why does this matter to me?

It matters to me that I might miss out on the local music in Evansville. My first dive into the local music of Evansville was at PG at event called Little Sound Assembly. I went to the first one they held in 2014 shortly after I came back from China. Then I went to everyone except for one. I missed out for some reason.

My first time going to Wired was to see my friend Kaanvas. It was Kaanvas first time back into the music scene after a hiatus.

I went to many different shows and events at each place. Seeing different acts like Paper Sweaters, North by North, and many more. I had a great time. It allowed me to get out more and change to meet people.

Went to an art show that PG held and it was for a digital art. I didn't end up buying anything but it was fun looking at the art.

These was some great places, and they are going to be missed.

What now?

I don't know. Maybe someone will pick up after what they left or the art scene will die out.

]]>
New Blog Engine Sun, 25 Nov 18 23:40:59 -0600 Matthew Deig https://matrix.underhalls.net/post/2018-11-25_New_Blog_Engine https://matrix.underhalls.net/post/2018-11-25_New_Blog_Engine I'm switching over to the hugo blog engine so that I can have a working rss feed instead of my hacky version.

So welcome.

Old posts will be moved over

]]>
Rescue Thu, 23 Aug 18 00:00:00 -0500 Matthew Deig https://matrix.underhalls.net/post/2018-08-23_Rescue https://matrix.underhalls.net/post/2018-08-23_Rescue The Group

Tanbo Gustofferson, Dragonborn Bard Wheely Healy, Dwarf Cleric Fungal Scourge, Dragonborn Figter Davian Mongothsfeather, Aarakocra Ranger

Story So Far

After raiding the Red Band Ruffians. The group took one of the a Red Band as a captive, to find the hideout of the goblins that might have a map to find the magical mace. They made it thru the trail and traps and at the mouth of the cave to the goblin hideout.

Rescue

Our gang was discussing how to enter the cave that two goblins attacked them. The easy dispatched the goblins that they enter the cave and saw some wolves chained up to the wall and they high tailed out of the cave to discus what they want to do next. Our gang decide to take a rest for the night so they can be ready for the fight ahead. During their night rest they interrogated the Red Band to find out his name and become his friend after stripping his clothes, killing, and bring him back to life. They got his name but Tanbo changed it to Tim.

While the group is sleeping Tim crawls off into the woods. After a few hours of crawling a Bugbear grabs Tim and carries him off.

In the morning the group wakes up to their horror they find their "friend" Tim is gone. They look around the camp to find where he went off. They find his crawling tracks they went off into the woods. So they decided to go off into the woods looking for them. They running for few hours stumbling around a in woods they come to a clearing where they see the Bugbear.

Wheely Healy comes up with a plan to sneak attacked the Bugbear. The others agree, Wheely Healy was going to cast a guided missile, Fungal Scourge was going to rush in with his swords, Tanbo was going to rush in, and Davian Mongothsfeather was going to shoot his bow. They executed the plan but Wheely Healy's guided missile whiffs by the Bugbear's head, and while Davian Mongothsfeather's arrow just lands at the Bugbear's feet. Tanbo just stumbles out of the woods losing his footing. Fungal Scourge goes in with his sword but the Bugbear lifts up his arm that was carrying Tim and Fungal Scourge just slices Tim in half vertically, and with that their "friend" Tim was slayed.

The group swears revenge on the Bugbear that they nicked at the health of the Bugbear and the Bugbear was missing up til he was able to hit Davian Mongothsfeather with his mouringstar, which ended up making Davian Mongothsfeather coughing up blood. Tanbo was able to kill the Bugbear with his bow.

The gang heads back to camp to rest up for their adventure into the goblin hideout.

Edit

The names and classes wasn't accurate so I updated it

]]>
RSS Feed Tue, 06 Feb 18 00:00:00 -0600 Matthew Deig https://matrix.underhalls.net/post/2018-02-06_RSS_Feed https://matrix.underhalls.net/post/2018-02-06_RSS_Feed Well I added a hacky add on to pft to make an rss feed for this blog. When I mean hacky the text for the blog posts will not have any format to the text so it is terrible to read but the whole markdown version of the blog post is in the rss feed now.

Enjoy

]]>
Random Level Generator For Squidio Mon, 05 Feb 18 00:00:00 -0600 Matthew Deig https://matrix.underhalls.net/post/2018-02-05_Random_Level_Generator_For_Squidio https://matrix.underhalls.net/post/2018-02-05_Random_Level_Generator_For_Squidio Code
    function new_world ()
        obs = 0
        level_num_obs = level_num_obs + level_mul
        if new_game == 1 then
            starting_pixels = 350
            while obs <= level_num_obs do

                world_build_check = math.random() * 100

                if ( ( world_build_check - 40 ) < 0 ) then
                    new_block_speed = math.random(-1 * block.max_velocity, block.max_velocity)
                    if ( new_block_speed < 0 and new_block_speed > -1 * block.min_velocity ) then
                        new_block_speed = math.random( -1 * block.max_velocity, -1 * block.min_velocity)
                    elseif ( new_block_speed > 0 and new_block_speed < block.min_velocity ) then
                        new_block_speed = math.random( block.min_velocity, block.max_velocity )
                    else
                        new_block_speed = block.min_velocity
                    end
                    table.insert ( world, { ['name'] = 'block', ['x'] = math.random(block.width, love.graphics.getWidth() - block.width),
                                            ['y'] = starting_pixels, ['width'] = block.width, ['height'] = block.height, ['velocity'] = new_block_speed,
                                            ['sprite'] = block.sprite} )
                    obs = obs + 1
                elseif ( ( world_build_check - 50 ) < 0 ) then
                    world_build_check = math.random() * 100
                    if ( ( world_build_check - 30 ) < 0 ) then
                        table.insert ( world, { ['name'] = 'left_stream', ['x'] = love.graphics.getWidth() - left_stream.width,
                                                ['y'] = starting_pixels, ['width'] = left_stream.width, ['height'] = left_stream.height, ['velocity'] = math.random(left_stream.min_force, left_stream.max_force),
                                                ['sprite'] = left_stream.sprite} )
                    else
                        table.insert ( world, { ['name'] = 'right_stream', ['x'] = 0,
                                                ['y'] = starting_pixels, ['width'] = right_stream.width, ['height'] = right_stream.height, ['velocity'] = math.random(right_stream.min_force, right_stream.max_force),
                                                ['sprite'] = right_stream.sprite} )
                    end
                    obs = obs + 1
                end

                    starting_pixels = starting_pixels - 62
            end

            starting_pixels = starting_pixels - 124
            table.insert ( world, { ['name'] = 'goal', ['x'] = goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )
            table.insert ( world, { ['name'] = 'goal2', ['x'] = love.graphics.getWidth() - goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )
        else
            starting_pixels = -62
            while obs <= level_num_obs do

                world_build_check = math.random() * 100
                if ( ( world_build_check - 40 ) < 0 ) then
                    new_block_speed = math.random(-1 * block.max_velocity, block.max_velocity)
                    if ( new_block_speed < 0 and new_block_speed > -1 * block.min_velocity ) then
                        new_block_speed = math.random( -1 * block.max_velocity, -1 * block.min_velocity)
                    elseif ( new_block_speed > 0 and new_block_speed < block.min_velocity ) then
                        new_block_speed = math.random( block.min_velocity, block.max_velocity )
                    else
                        new_block_speed = block.min_velocity
                    end


                    table.insert ( world, { ['name'] = 'block', ['x'] = math.random(block.width, love.graphics.getWidth() - block.width),
                                            ['y'] = starting_pixels, ['width'] = block.width, ['height'] = block.height, ['velocity'] = new_block_speed,
                                            ['sprite'] = block.sprite} )
                    obs = obs + 1
                elseif ( ( world_build_check - 50 ) < 0 ) then
                    world_build_check = math.random() * 100
                    if ( ( world_build_check - 30 ) < 0 ) then
                        table.insert ( world, { ['name'] = 'left_stream', ['x'] = love.graphics.getWidth() - left_stream.width,
                                                ['y'] = starting_pixels, ['width'] = left_stream.width, ['height'] = left_stream.height, ['velocity'] = math.random(left_stream.min_force, left_stream.max_force),
                                                ['sprite'] = left_stream.sprite} )
                    else
                        table.insert ( world, { ['name'] = 'right_stream', ['x'] = 0,
                                                ['y'] = starting_pixels, ['width'] = right_stream.width, ['height'] = right_stream.height, ['velocity'] = math.random(right_stream.min_force, right_stream.max_force),
                                                ['sprite'] = right_stream.sprite} )
                    end
                    obs = obs + 1

                end
                starting_pixels = starting_pixels - 62

            end

            starting_pixels = starting_pixels - 124
            table.insert ( world, { ['name'] = 'goal', ['x'] = goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )
            table.insert ( world, { ['name'] = 'goal2', ['x'] = love.graphics.getWidth() - goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )

        end


    end

What does it do

This function for the game will generate new table objects for the level after the goal marker shows up on the screen. I wanted it to be a weighted random so I just did some random check and minus out the chance of it happening. Some of my older version used a range check on the random number, but the results were not desired of what I wanted.

It places the hit object, stream object, and the goal object. The player is spawn at the bottom of the screen. Then I take the starting pixel which is roughly the middle of the screen and go up the screen until I hit the maxium of objects for the level.

I feel the function is a little wielding but it got the job done.

]]>
Spicy Chicken Sun, 11 Jun 17 00:00:00 -0500 Matthew Deig https://matrix.underhalls.net/post/2017-06-11_Spicy_Chicken https://matrix.underhalls.net/post/2017-06-11_Spicy_Chicken What is needed

Chicken breast or any type of chicken Sriracha sauce Cider Vinegar Kansas City Steak Rub (This is a name of the spices from a local store brand but whats in it is salt, garlic, onion, paprika)

Pre-work

I let the chicken marinade in the Cider Vinegar and the Sriracha sauce. The Cider Vinegar is for tenderizing the chicken and Sriracha sauce is for the spice. For the cider Vinegar I put in just enough to bath the Chicken. Then Sriracha sauce I try to coat the whole chicken. Putting too much in would make it way spicy. I don't have a set amount for these I just eye ball it.

Then I let the chicken sit in the marinade for 15 to 30 minutes but it might even better to let it sit over night.

Cooking

I heat up the grill to something like 200 degree fahrenheit. I place the chicken on the grill then I put the Kansas City Steak Rub on it. Let it cook for a little while then flip the chicken and put Kansas City Steak Rub on it again. Then I just cook till it is done.

Picture

20170408_200400.jpg

]]>
Simple Sine Wave Thu, 01 Jun 17 00:00:00 -0500 Matthew Deig https://matrix.underhalls.net/post/2017-06-01_Simple_Sine_Wave https://matrix.underhalls.net/post/2017-06-01_Simple_Sine_Wave Simple Sine Wave

I have like the sounds of synthesizers. I like the electronic music and chipmusic. I own a few synths. They are more cheap portable ones. I have the gakken MKII, nebulophone, monotron delay, and the pocket miku. I also messed with some audio DAWs.

I figure I try to make my own software synth. Just to learn more how the sounds are made and learn some sound processing on the way. So far I took some source code snippets and paste together a small simple sine wave generator that will play ten note scale into alsa.

Something I learn that to go up the scale you mulply your scale modifier, to go down you dived it.

I think the next step of this exercise is to add some user input for the notes and make a few effects.

Simple sine wave will kick it off

]]>
My Computer History Thu, 30 Mar 17 00:00:00 -0500 Matthew Deig https://matrix.underhalls.net/post/2017-03-30_My_Computer_History https://matrix.underhalls.net/post/2017-03-30_My_Computer_History Why this

I was listening to a podcast they were reminiscing about their first computer. I was like I should do that, so that I can show it to my future self. Plus it will be on the Internet and nothing really gets deleted from the Internet.

Early Days

Back in my early childhood I was cruising an Acer 486 type computer with an Sound Blaster and DOS. I only used that computer to play Doom, Wolfenstein, and educational games. it did help me learn a few Spanish words. Nothing bad, just things like hat and water. I got that computer because of my mom. She didn't think it was harmful for me watching my dad play Doom vs me just playing. She was the one that taught me how to use DOS and the computer which at the time I was three years old.

I also logged into my Dad's BBS back when I was six. I didn't do much answer a few email and play games on it.

The most I did back then was play games. My bread and butter was Doom. I try to play it over doing my homework. I also had a friend that would call me up on the phone and talk about Doom and play it. We never did a network game.

Mid 90s

About this time when I was first introduced to programming. My mom bought this book/software called Interplay How To Program BASIC. I read through the book and tried to program a few games. I never finished anything. plus it was hard for me to stick with this since I didn't have friends that wad interested in computers or programming. I don't think they were interested in computer gaming.

I was still playing Doom but I branched out to some other games. I played this game called Urban Assault. Just RTS in which you can go into FPS mode with units. I had a racing game, and Microsoft Flight Simulator 95. I had a blast playing those games. At this time I didn't have a lot full games just tons of Shareware gamed.

I didn't use the Internet much at this time. I did use it for research papers once a while.

Jr. High school

In this part of time I just had a Celeron processor that was clock at a Pentium 2 processor with Windows 98. I played more demos than full games. I still programmed not much.

This is about the time I started playing consoles more than on the computer. I had a Sega Genesis and Nintendo 64 that we picked up in yard sales.

Nothing much about this era just played more console games, because I had to share the computer with My mother, and my sister.

High School

This era we picked up pre-built computers from Walmart the specs is more of eh, but still able to play games. I started to play some more computer games but it was about the same as the Jr. High school era.

My junior/senior year is what really kicked off my programming. I took couple of programming class. Two Java classes and one C++ class. It was great met some people that was really into programming and I learned quite bit from them.

The thing with my High School is that you had to get through two or three different computer classes. That just taught you how to use Microsoft Office suite, and tiny HTML making using frontpage. It was boring since I already knew how to use the applications. At this point I already had quite bit classes that we used word to write papers for.

College

This era was a lot fun for me for computers. I decide to take the Software route of Computers. I started out in a community college taking the Computer Programmer / Analysis path for the school. I got my own computer which was an Acer laptop with AMD Athlon X2 processor. This same era is when I first discovered about Steam. Man I really disliked Steam, because I had dial-up at this point. I just couldn't install Portal to play, because I had to download the data for the game which was something like 4GB in size. That would took me at least weeks or Months to download. I was upset about this. I sent an email or submitted a ticket to Steam and got a response back in within 2 days that you didn't need to download the game to play. The data was on the disc. Well that wasn't true. I had to wait till I could get to school and download it there.

Now at the Community College is when I started to learn about Linux. I thought it was pretty cool. I tried it out and set-up some file severs and stuff but stuck with Windows because school needed it.

In this same time I got back into Doom but I started to join the multiplayer side of the game. Since I was starting to have Internet not dial-up. This was some fun times. I joined up in a clan which was clan:45. I met a lot of cool people. I started to mod doom made some maps and instagib mod. I also submitted some patches to Odamex to fix some bugs and added a feature. I added the ability to record netdemos for the port. It was first time messing with open source projects.

Now I was going to a University for a Computer Science Degree. For this school I got an HP laptop with an i4. I was catching up on some old computer games that I missed out. I finally got high speed Internet with out data caps. I was getting more serious about Linux. I was thinking of going full time, but unfortunately this University was Microsoft friendly school so I just couldn't go full time. Towards the end of my time at the University I did switch to Linux full time because Steam went to Linux.

Now (2017)

Now I built my first computer. It has an i5 clocked at 3.9 GHz with 16GB of RAM. I'm also full time Linux playing games and watching YouTube videos with an 200Mbps Internet. Hosting game servers for my friends while we co-op, and deathmatch our way though games.

End of Blog

I had a lot of changes saw the BBSes, Early Internet, and Today's. I switched eight different operating systems. Played games, but the Doom has been the continuing game that I played all though my life. Few things changed. I still voice chat when I playing games. It just doesn't cost my family money now. Like it did in the past.

Things change but yet they don't

]]>
Update To My Blog Sun, 19 Feb 17 00:00:00 -0600 Matthew Deig https://matrix.underhalls.net/post/2017-02-19_Update_To_My_Blog https://matrix.underhalls.net/post/2017-02-19_Update_To_My_Blog Update

I went ahead did some simple changes to the color scheme and layout of my blog. Hopefully the colors are not too bad to look at.

Anyways small update

]]>
dirty_synctube Tue, 13 Dec 16 00:00:00 -0600 Matthew Deig https://matrix.underhalls.net/post/2016-12-13_dirty_synctube https://matrix.underhalls.net/post/2016-12-13_dirty_synctube Things you would need.

  • tee
  • youtube-dl
  • a media player that can read from stdin
  • netcat

I used mpv as my example for this

So on the main host that has tee command.

youtube-dl -o - | tee >(nc -l 9000) | mpv -

This will start downloading the file and netcat will hold up the buffer until the client connects then it will start playing the video

On the client side they need to type in

nc host 9000 | mpv -

or on windows

nc host 9000 > mpv -

I have only tried this on local lans so I have no clue how bad the latency will be over the Internet, but I feel it would be about the same as the ping between the clients. There might be a small chance for the videos not to match up correctly. This isn't too bad for a quick way to watch videos between people

]]>
pixel shift Tue, 13 Dec 16 00:00:00 -0600 Matthew Deig https://matrix.underhalls.net/post/2016-12-13_pixel_shift https://matrix.underhalls.net/post/2016-12-13_pixel_shift I wanted to play around with making a ppm parser. I also like the effects that pixel shifting looks on pictures.

You can get the script here pixel_shift

Only problem with it. It shifts all the RBG values so it will make the pictures a grandent fill from black to white. It was a neat practice. I learn little bit of the ppm file format. It is just plain text with the binary or ascii represtation of the RGB of the pixels.

This script isn't complete like I said above it is screws up the shifting since it is sorting all the RGB values instead of going by pixel level. It is extremely slow, so it works fine on small pictures not big ones. This uses a lot of magic numbers so you will have to edit to work with other types of pictures.

I did find it to be a fun challenge none the less

]]>
Hello_world Mon, 12 Dec 16 23:00:00 -0600 Matthew Deig https://matrix.underhalls.net/post/2016-12-12_Hello_world https://matrix.underhalls.net/post/2016-12-12_Hello_world Testing out this static site generator. Not quite sure what I put here maybe some of my command line snippets or my other little programming projects

]]>