tar on a directory mydir will archive hidden files and hidden subdirectories, but tar from within mydir with a * wildcard will no
mydir
*
You can use:
tar -cvpzf test.tgz * .??*
But, this works only for hidden files with names > 2 (to prevent '.' and '..')