• Home
  • About
  • HORIZONS EBOOK
  • EBOOKS
    • SCRAPBOOK DREAMS
    • HAIKU & SHORT POEMS EBOOK
    • ABROJOS EBOOK!
    • POSTERS EBOOK!
    • TAROT EBOOK !
    • THE BRIDGE EBOOK!
  • MY BLOG POSTS
  • VISUALS / ART WORK
    • GRAPHIC DESIGN
      • ILLUSTRATIONS
  • Haiku
  • POETRY
  • PHOTOGRAPHY
    • Fall
    • Nature
  • HORIZONS POSTS
  • HAIKU & SHORT POEMS POSTS
  • THE BRIDGE POSTS
  • TAROT POSTS
  • ABROJOS POSTS
  • POSTERS
  • Translations
  • #Flash Fiction
  • MISC ITEMS
    • MISC WRITINGS
      • #Flash Non-Fiction
      • FOLK MUSIC
      • #Prose Poems/#Short Fiction
      • STOP TPP!
    • POSTCARD ART
  • VIDEOS
  • SOFTWARE
    • SOFTWARE-TO-GO
  • BOOKSTORE
  • BOOKS / REVIEWS
    • Book Reviews
  • PRINTS

Phil G's Blog/Website

~ Art, Photography, Poetry, Life

Phil G's Blog/Website

Category Archives: SOFTWARE

Ping Pong Is Here!

31 Saturday Oct 2015

Posted by philsblog01 in SOFTWARE

≈ 3 Comments

Tags

Development, Phil Gennuso, Ping Pong, Software

pingpongsingle

10-31-2015
Phil Gennuso

New Release, Pingpong Game!

About 5 weeks ago I released my new website, 2.0.
It included a work-in-progress pingpong game which was largely a sampler, a prototype.

Now I have released the next step, a more sophisticated set of pingpong games, one for a single player, and one for two players, both with controls for ball and bounce speeds, which will give
you an opportunity to adjust the game to suit your desired difficulty level. The singles games is more developed, more finalized.

I have used the latest technologies, HTML5, CSS3, Javascript, and the latest browsers, IE 10, Chrome, Firefox. My test browser is Chrome. I am having trouble with the Firefox browser. The paddles do not seem to work correctly. If you do click one of the controls, while the game is in progress, this seems to correct the problem but I cannot verify this will work for everyone. Chrome and IE seem to work fine. I will try to get the Firefox debugger plugin and see if I can figure out what the problem is .

The size is about 1350×620 pixels and this general size is ideal. There is scrolling available for smaller screens, and there is some flexibility but it is not a completely responsive web design (at this point). You can play the game with a smaller screen, but you have to use some ingenuity.

I would appreciate any suggestions about the setup and game in general. Some of the options make it almost impossible to do much, the ball will just move too fast, but at this point, this is still in a developmetn/prototype stage and I wanted to give options.

Keep learning and growing!

The singles game:
http://www.pgtestsoft.com/pingpongsingle.htm

The doubles game:
http://www.pgtestsoft.com/pingpong.htm

My site:
http://www.pgtestsoft.com/index.htm

Using The HTTP Get Method To Pass Values Between HTML Pages!

01 Thursday Oct 2015

Posted by philsblog01 in SOFTWARE

≈ 5 Comments

Tags

CSS3, HTML, HTTP GET, JAVASCRIPT, Phil Gennuso, Software, Web

SOFTWARE BLOG GET METHOD

I have just posted a short article on how to use the HTTP GET method to pass variables between web pages. In my application, which you can see on my site, I wanted the user to click on an image and be taken to another HTML page with a larger version of the image and places for text and perhaps other images if desired.

The web page is:

http://www.pgtestsoft.com/software.htm

The web site address is:

http://www.pgtestsoft.com/index.htm

If you go to the web site you can just click on the software link, or the software image/link down the page.

My site also has art work, mazes, and one game if you would like to look around!

Let me know what you think and if you find this article useful. I wrote and posted this article because I wanted to know how to code this and could not find all the information in one spot.

Keep growing and learning!

Maze Game Version 03 Is Now Ready !!!

14 Sunday Sep 2014

Posted by philsblog01 in SOFTWARE

≈ Leave a comment

Tags

HTML5, JAVASCRIPT, Mazes, Phil Gennuso, Software

screen for maze games, click for full size

screen for maze games, click for full size

Back in July, I released my first version of a Maze game, a 15 by 15 grid. This is now my third maze, and for this I used a web program I wrote that allowed me to manually create this maze. It uses a 20×20 grid, same as Maze 02, but I believe this will be a bit trickier!

You can find my maze games, along with other software at my site:

http://www.pgtestsoft.com

Once you reach my site just follow -> Mazes -> Maze Game 03

If you just want to go directly to this third Maze try this link:

http://www.pgtestsoft.com/PlayMazeGame03.htm

I have made some changes to the layout of my site to make navigation easier, so it might look a bit different from you last visit.

There are now three maze games available, also a version of Mastermind, and an application, Create Maze DFS, that will create a depth first maze for you!

I always appreciate any feedback and/or comments.

I have several more maze projects on the deck. Certainly I will post at least one more maze, possibly a multi-dimensional one. Also I may release my web software which allows you to manually build your own maze.

Stay tuned!

Software: Create Your Own Maze! (Using The Recursive Backtracking Algorithm)

31 Sunday Aug 2014

Posted by philsblog01 in SOFTWARE

≈ Leave a comment

Tags

CANVAS, HTML5, JAVASCRIPT, Mazes, Phil Gennuso, Software

Opening Screen, Click For Full Size

Opening Screen, Click For Full Size

This is my continuing project to build software games, board games, mazes, and the like.

The technology I am using is HTML5/Canvas and JavaScript, important tools for anyone working on the Web.

This particular application is perhaps more geared towards developers and computer scientists than general users but if you really like mazes you might enjoy watching how a maze gets automatically generated, right before your very eyes! And if you like you can delve into the algorithms either by reading here, looking at the code, or looking online.

If you would like to jump to the page where this particular application is use this link:
http://www.pgtestsoft.com/CreateMazeDFS.htm

If you would like to go to the web site and then link to the maze creating game use this link:
http://www.pgtestsoft.com

To create a project that is more than trivial, yet simple enough to understand, I have chosen a 15×15 size matrix for maze creation.

Ok, so just what is the Recursive Backtracking Algorithm? Quite a mouthful you might say, particularly if you have never studied Computer Science. But actually it is relatively simple to understand and something we probably all have done in our lives.

Consider talking a walk in the forest, along a trail, and you are looking for some destination at the end of that trail but you are not sure of the path you need to take. As you walk along, every time you come to a junction, where there is at least one and perhaps a few choices to make, you remember that point, then you chose one of the paths and follow it until it either reaches the goal or ends up as a dead end. If it reaches the goal, than great! You have won. If it is a dead end, you go back (backtrack) to the last point where you had to make a choice about which path to chose. Then when you get back to that junction point you mark off the path you took which was a dead end (so you don’t go over it again), and you try another path.

That’s it! Well almost. That is the backtracking part. The recursive part is how you get back to that path, in a computer. Computers have what is called a stack, like a stack of plates. So after you make your choice of a path you put each new step you make on that stack of steps, in this case. Then, if you hit a dead end, you just “pop” each step off that stack and go back (backtrack) to where you made a choice of paths. Then you mark the failed path and strike out in a new direction!

Of course, what I described is how you would search using paths that already existed. Here we are creating a path that does not yet exist in our grid. The logic however is pretty much the same, kind of like turning your socks inside out and wearing them. Here again, in the forest, you create a path, until you finally run out of paths to make. At that point, one of the paths will be correct.

That is the high level view. For those interested in the high level view of the coding and data structures you can follow from here.

First we need a few data structures. A grid of cells, in this case a matrix, 15×15, of unconnected cells. My representation is a matrix, in this case of 225 cells, with each cell represented by an array size 4, where the value can be either 0 or 1. So [1, 1, 1, 1], starts with the left wall of the cell, the top wall of the cell, the right wall of the cell, and the bottom of the cell. If the value is 1, then there is no link in that direction, if the value is 0, then there is a link (or path) in that direction. So for cell [1], the second cell in the matrix, row 0, column 1, a value of [0, 1, 0, 1] would mean the left wall isn’t there, the top wall is there, the right wall isn’t there, and the bottom wall is there. Of course the values for the adjacent cells must match up.

Next, we need a stack that contains all the cells not yet visited. We need a stack of cells that have been visited. For debugging purposes, I have included a separate, static stack of cells, that have been visited.

When we begin the program we must load the stack of not visited cells with all the cells in the matrix, or in this case 225 cells. We initialize the stack of visited cells to null.

Now we are set to begin. We must chose one of the cells as the start point, the current cell. I typically use the cell in the top left corner of the matrix, [0,0].

while there are more cells that have not been visited
–>find all neighbors (adjacent) cells that have not been connected to the current cell
–>if unlinked neighbor(s) are found
—->choose one randomly
—->connect this cell to the current cell
—->remove the current cell from the not visited stack (if it has not already been removed)
—->push the current cell onto the visited stack (this stack is used to backtrack)
—->make the cell we just connected, the current cell
->else (no unlinked neighbors found)
—->if the visited stack is not empty
——–>pop this stack, make that cell the current cell
—->else (the visited stack is empty)
——–>choose a cell (randomly) from the not visited stack
——–>make this the current cell
—->end if (visited stack not empty)
–>end if (unlinked neighbor found)
end while (more cells not visitied)

Please note, this is a general high level view. The basic algorithm is the same but you can used different types of data structures to implement the details. The important thing, from a CS point of view, is this is a variation of depth first search, using a recursive stack, and random choices when confronted with more than one path. In essence we are turning DFS inside out, using a DFS to carve out a set of paths that at some point, will connect to the end of the maze, or the goal.

This algorithm will create a maze for you with a guaranteed path, but typically you will want to fine tune the matrix to make the game a bit more interesting. The path from start to finish, usually takes many twists and turns, but there may not be all that many junctions that you face along the way. So you will have to use the arrow keys and go left, right, up, down, etc, many times, but you will not face all that many points where you have to ask, “which path should I choose?”.

There are other interesting questions here, like are you guaranteed to create a path (you are, at least after running this 100s of times, I have always created one), for example, and how would you prove it? Also, are there other ways to create a maze automatically, and yes there are.

This is just to whet the appetite and get you started!

I always appreciate any comments and suggestions.

Maze Game Version 02 Is Now Ready !!!

13 Wednesday Aug 2014

Posted by philsblog01 in SOFTWARE

≈ Leave a comment

Tags

Maze Game, pgtestsoft, Phil Gennuso, Software

screen for maze game version 2, click for full size

screen for maze game version 2, click for full size

Back in July, I released my first version of a Maze game, a 15 by 15 grid. This is a bit more complicated with a 20 by 20 grid. I also added the use of arrow keys if your system is so equipped, so you can now use either the button controls or the arrow keys to navigate the maze.

You can find my maze games at my site:

http://www.pgtestsoft.com

If you just want to go directly to this second Maze try this link:

http://www.pgtestsoft.com/PlayMazeGame02.htm

There are two maze games available, also a version of Mastermind, and a simple version of Craps.

I always appreciate any feedback and/or comments.

For folks who are more deeply interested in mazes, both creating mazes and programming them, I am preparing release of a small app that will create a maze right before your very eyes, using the backtracking algorithm!

Stay tuned!

Maze Game Is Ready!

20 Sunday Jul 2014

Posted by philsblog01 in SOFTWARE

≈ 1 Comment

Tags

Maze Game, Phil Gennuso, Software Release

MazeGameScreenFinal01

Ok my maze game is ready for those who like mazes or are interested in HTML5/Canvas/JavaScript programming.

Check it out:

http://pgtestsoft.com

Just click Maze Game.

You can also try Guess Codes (Mastermind) if you like!

Have fun!

Comments and suggestions are always welcome.

Guess Codes / Mastermind Board Game Software

01 Tuesday Jul 2014

Posted by philsblog01 in SOFTWARE

≈ Leave a comment

Tags

Board Games, Guess Codes, Mastermind, Phil Gennuso, Software

help screen by phil gennuso

help screen by phil gennuso

As some of you may know, last week I released a link to my software web board game, Guess Codes / Mastermind. The game was fully tested on my Windows 7 notebook, using IE 11, but as I discovered, when using HTML5 and Canvas (and javascript of course), new technologies, the cursor positioning can be different across platforms. As such, people had trouble activating the buttons to play the game.

Well I went back to the drawing board, and changed the way I do the positioning, and have tested the game using IE 11, and the latest editions of Google Chrome, and Mozilla Firefox. All three platforms work fine, according to specs. However that is for my laptop. I still don’t know how things will work for different size screens. One gentleman did test the application with Google Chrome on a large screen successfully.

Here is the new link: pgtestsoft.com

The game is Guess Codes, and there is a help screen Help For Guess Codes.
If you get a chance and just go into Guess Codes, and try to click a few buttons, the HELP button, some of the colors on the right, etc, just to see if there is some response, and let me know.

I would really appreciate it. It is a bit frustrating for me as a programmer because everything is working fine on my machine but I don’t have access to different size machines.
Please let me know if you have any questions.

If this goes well, I will be happy to share what the process was originally and the corrections made. HTML5 Canvas is certainly a promising technology so there might be some general use.

Thanks,
Phil Gennuso

← Older posts

Cover by Phil Gennuso Arts

RECENT POSTS

  • Touching (#Nature #Haiku #ThursdayMemories) March 30, 2023
  • Impromptu Wetlands (#NatureWednesday #Haiku) March 29, 2023
  • First Crocus! (#Nature #Spring #Haiku) March 28, 2023

Top Posts & Pages

  • HOME PAGE
  • Dahlia (#NatureWednesday #Quatrain)
  • Red Maple (#NatureWednesday #Haiku)
  • Winter Twilight (#Haiku #GraphicArts)
  • Spring Is Coming ! (#NatureWednesday #Flowers #Haiku)

Blog Stats

  • 72,533 hits
Follow Phil G's Blog/Website on WordPress.com

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 1,709 other subscribers

STATCOUNTER

wordpress com stats

META DATA

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

RIGHTS RESERVED

ALL RIGHTS RESERVED!

Categories

Archives

Blog at WordPress.com.

  • Follow Following
    • Phil G's Blog/Website
    • Join 1,060 other followers
    • Already have a WordPress.com account? Log in now.
    • Phil G's Blog/Website
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...