I Suck at Drawing

I’ve never been good at drawing. Art has never been my forte.

This has been a problem for my game development. Having an amazing game can make up for not so great art. Having great art can make up for a not so great game. Unfortunately for me, my mediocre games don’t benefit at all from my lousy game art.

I’ve tried to do better. Since I really can’t draw, I’ve attempted to do more pixelated style game art. All of the games I’ve developed thus far, have had really bad art. Just take a look at the examples littered around this page.

Now, I’m not one for resolutions. I don’t see why there is one time of year for making changes. I just happen to be doing this at the beginning of the year. I’ve decided I want to improve my drawing skills. I’m watching videos, and following tutorials. What I’m really hoping will help the most is that I’m trying to practice for a bit EVERY day. Just drawing, and accumulating some experience.

I’m looking for resources that help with understanding elements that make up different art styles. I don’t expect to ever be drawing photo realistic portraits. I’ll never be van Gogh. I’m OK with that. I just want to make some artwork for my games that doesn’t make me cringe to look at. I mean, if I don’t want to look at it, why would anyone else?

My first goal is to learn some techniques for drawing simple art styles. I plan on doing some research about different art styles used in games. I’ll try to learn some techniques for drawing this art. I’ll attempt to practice daily.

Something else I plan to do is utilize my practice art to make simple game-like objects. Basically, I’ll drop some of this art into Unity and practice making animations, and interactions. This way, I’ll be exercising my art skills, and getting in some Unity coding practice as well.

Now, I’m a gearhead. No doubt about that. So I am using some fancy tools to try to help my progress. I got myself a Wacom smart stylus, and an inexpensive drawing app for my iPad. Now, the rest is up to me…

How to Ping from Python

Here’s a quick tip on how to Ping from Python!

Today, I had a need to do a quick ping test from a Python script. It took me a bit of searching to figure out how to do it properly. Most of the examples I saw in the wild ended up displaying results to the screen (or stdout), which is not at all what I was looking for.

Here is what I ended up with:

#!/usr/bin/python -tt
import platform
import subprocess
import sys  # This import is only needed to get command line arguments.

def ping_test(host, ping_count=1):
  
  #
  # Some systems use different parameters for ping count
  # Linux and MacOS use -n, Windows uses -c
  # Adjust this as necessary for other systems
  #
  count_param = '-n' if platform.system().lower() == 'windows' else '-c'
    
  #
  # subprocess.Popen takes a list of parameters, starting with the command to run
  #
  command = ['ping', count_param, str(ping_count), host]
  
  #
  # When calling subprocess.Popen, we are redirecting stdout and stderr to PIPE
  #
  # This will cause the proces to return a tuple of (stdout, stderr) when communicate
  #   is called
  #
  # We do this even if we don't want or need the results, so it doesn't display to
  #   screen while executing
  #
  process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  result = process.communicate()
  
  # Use the Popen variable (i.e. process) to get the return code.  The output from the
  #   command is held in result, as described above.
  #
  # In this example, we are only looking at stdout.  We could also get stderr as result[1]
  #   if that were interesting to us.
  #
  return (process.returncode, result[0])
  


#
# This function is just to get command line arguments, and demonstrate how to call
#   The ping_test function.
#
def main():
  args = sys.argv[1:]
  
  if len(args) < 1:
  	print 'Usage: %s host-or-ip [count]' % sys.argv[0]
  	return
  
  return_code, result = ping_test(*args[:2])
  
  print 'Ping Successful' if return_code == 0 else 'Ping Failure'
  print result

#
# Standard boilerplate to call the main() function.
#
if __name__ == '__main__':
  main()

2018 Holiday Break

Every year, in December, I end up taking some much needed vacation time. During this time, I often work on projects and spend time with the family. 2018 was no different. This time around, I had a few objectives.

I decided it’s finally time to learn Python. I took a look at it a few years ago, and pretty much just shrugged it off. I’ve been programming in C/C#/Java/Swift and similar languages for a LONG time. It’s been pretty easy to switch between them, as they all have a basic structure. Blocks are defined by curly braces {}. Declare strongly typed variables. You know, the basics.

Then, along comes Python. Where are my curly braces? No variable declarations? WHITESPACE MATTERS?!?!? What gives?

Well, I finally got some time to give it a try, and I have to say, I’m liking it. I’m still not sold on the structure, using indenting instead of curly braces for blocks. I also struggle with not declaring variables, as I often can’t figure out what variable types are. Then I learned about the slice. Such a simple, elegant thing. How much Java code would it take to print the last 6 letters of a string reversed? I’m sold!

I started dabbling in machine learning. It’s a fascinating topic with many real-world applications. I’m just beginning to learn the fundamentals. I have a long way to go. I do have several ideas that I want to purse, so I’m sure you’ll see more here in the future.

I also launched this website. I’ve been wanting a place where I can share ideas, projects, nonsense, etc. I finally decided to just get this thing going. So, here it is!

I’ve got to go read up some more on multiple linear regression, and K nearest neighbors. Wish me luck!

Hello!

#!/usr/bin/python -tt

def main():
print('Hello World')

#Standard boilerplate to call the main() function.
if __name__ == '__main__':
main()