Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

A good way to learn GUI programming is to pick a library set that supports GUIs and go with it. Build a couple of applications with that library then try another. Pick a library that functions at the level of the graphics stack where you want to work and that's fitting for your target system.

There are CPAN modules for Tk, Wx, SFML, IUP, and Prima all of which are fairly straightforward. Tk isn't very pretty but is fairly simple and multi-language (it originally comes from the TCL community). Prima is Perl-specific. Wx is cross-platform and multi-language but is a bit more involved than Tk. IUP is cross-platform as well. There are some Windows GUI modules too.

Then there are the desktop environment types of libraries. Gtk and Qt are widely used on Linux and work on other platforms (including Windows and Mac) well if the right libraries are installed. Gtk is the graphics library used by Gnome and Qt is used by KDE. Gtk, Gtk2, Gtk3, QtCore4 and its associated modules, and more are available.

Any of the above are designed for windows, widgets, controls, all those things that a desktop GUI does. Then are the libraries actually focused on games and multimedia like OpenGL, SDL and the SDLx libraries, and the like. These could be useful for a word game with tiles, but may be overkill.

The X11 family of modules are for lower-level access to X11 services. Those are probably not what you're wanting, but it's good to know they are available.

Then there are the less conventional ways to do this. If characters are okay, you could go with Curses or Curses::Application maybe with Curses::UI. You could make it a web app and play it in a browser (using a local little web server for local games). You could make it hundreds of different ways.

I think worrying about how the game rules work first is a grand idea. Get an engine that represents your board, tiles, players, tile draws, and plays. Have a good idea how you want to move data in and out of that. Then build whatever UI to send and receive data from outside the engine, either as separate modules or even separate programs.


In reply to Re: How to build a scrabble type of game with perl by mr_mischief
in thread How to build a scrabble type of game with perl by Demeter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-05-23 18:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (82 votes). Check out past polls.

    Notices?