Click here to Skip to main content
Click here to Skip to main content

Board Game Builder

By , 15 Aug 2013
Rate this:
Please Sign up or sign in to vote.

Please note

This article is an entry in our AppInnovation Contest. Articles in this sub-section are not required to be full articles so care should be taken when voting.

Board Game Builder for All in One touched based PC's

The unique feature of All in One PC's which allow them to be used as a large tablet on a flat surface make them well suited to family oriented board games or board style interactive applications. Rather than concentrating on fast arcade style play, this application would be designed so PC users can design community interactive forms of entertainment.

This application will target the Entertainment catagory for the All In One PC's.

Challenges

There are a number of challenges when designing such an application. First is the layout of the application. Because an All in One PC can be used from many different angles by a number of different individuals at the same time, the user interface needs to be dynamic and capable of changing to the needs of the user. Because the application is designed to allow creativity with many different choices, while also avoiding software bloat, there is a need for a more dynamic development system so that an extensive variety of user interface choices are available to the end user. The more limitless the user interface choices are, while using minimal hardware resources, the better the experience will be. 

The Goals

The software will be designed with a design mode and a play mode. The board games or interactive experiences created need to be sharable, so users can save them into a single file and them allow them to be shared with others. This means limiting the graphic resources significantly. Rather than depending upon a large quantity of "canned" graphics or content libraries, instead a more dynamic approach is needed so less resource intensive contents can be used and embeded into the users "Play" files. This will produce smaller, more easily shared play files (ie. send via email or downloadable). Of course some more extensive resources may be used when necessary.

Unique User Interface

This application will require a unique user interface, better suited to an All in One PC, especially designed for easy drag and drop use and dynamically changeable to the needs of the end user. Canned user interface controls will not suffice, since they need to be more dynamic. Coding the entire application for DirectX also would require too much work and would make the application too fixed, rather than dynamic and likely would be too resource intensive. There is a need for a user interface design which provides the flexibility needed but also performance on minimal hardware. The All In One PC being used in this contest is an expensive machine, likely with a good deal of performance. But consider OEM's who may create an All In One PC which is more affordable, in different sizes (screens) and with less expensive hardware, possibly based on the Intel Atom CPU. There is a need to create a user interface which is "fast and fluid" even on minimal hardware. Yet there is a need for features such as drag and drop, graphics, animation, image movement and the like.

Development system to be used

 This software would be developed using the PowerBasic compiler. It targets 32 bit Windows, especially Intel based systems. Performance is vital for an application like this.

Along with the PowerBasic compiler, a third party tool specifically designed for PowerBasic would be used for the User Interface and Graphics. The author of this article (and submission) is also the author of this Third Party tool. EZGUI 5.0 Professional will be used for the user interface and graphic design to provide a RAD environment and quicker development. The development environment provides a drag and drop environment for design of the user interface and also also a GUI engine (or framework) which replaces the need to call the Windows API directly. The GUI framework does not use dot.net or any COM components and is fully transportable (just copy the files, EXE and runtime DLLs, and run) so applications can even run from USB drives or even from a SkyDrive folder.

The GUI framework provides all the basic WIN32 controls, but also is designed for extensive customization. I will take advantage of its ownerdraw support to customize existing controls do they offer more unque UI features specific to the needs of the All in One device. If necessary, controls will be subclassed so their native behavor can be modified.

Next, there will be a need for extensive Graphic features in the application. I will be using the Canvas control extensively. The Canvas control was custom designed for working with double buffers in either DDB (device dependent bitmap) format or 16,24 or 32 bit DIBs (device independent bitmaps). When using DIB's the Canvas can be accessed directly at the pixel level (using pointers) for low level manipulation. There is also a proprietary 2D Sprite engine built in, which requires no special hardware (and no DirectX). Sprites can be shown/hidden/ moved (dragged also), flipped and animated using frame animation. Sprites can also be antialiased and alphablended (to each each other and the background). Performance is good even on minimal hardware. This application will likely use the Canvas control a great deal for many user interface elements. I will likely be using features like image filters, image rotation and scaling and alphablending per pixel.

Another control will be used for 3D Graphics, which is based on OpenGL 2.0, which is supported by most Intel SOC's (system on a chip). The 3D control is not simply a single full graphic window, but instead is a real window control class which can have multiple instances on a parent form. This would allow an OpenGL based control to be used as a moveable object in the design mode of this application. The OpenGL control has a built in 3D scripting language, which can be exposed to the end user in the application and has a built in 3D primitive language which allows 3D models to be defined using simple scripts, rather than depend upon complex 3D models. This will produce small "play" files for the application.

The OpenGL control used also can display planes which are themselves min-canvases which are drawable upon, so graphics can be drawn on 3D planes which can be rotated in full 3D motion. The OpenGL control also supports the STL 3D model format so complex, high polygon count models can be loaded and displayed quickly. STL models can be display with high quality and not even need a texture map.

To create the design mode of the application, it will be necessary to create a drag and drop interface. Rather than do this in a totally graphic mode, it would be useful to be able to drag and drop unique window classes as objects. I will be using the GUI frameworks drag and drop engine built in which can be used to build WYSIWYG style applications, similar to some graphic editors or programming language forms editors. It comes with its own drag handle control which can be defined for even larger than normal drag handles which would be useful for touch. This will enable the ability to drag and drop (and size) multiple Canvas controls, OpenGL controls and a number of other customize controls well suited to a large All in One touched based PC.

The GUI engine provides many of the complex UI elements necessary to create a unique software experience. The entire GUI framework which will be used totals only about 1 megabyte in size (and this includes all the graphic features, OpenGL and drag and drop). The GUI framework was developed using the WIN32 API's so performance will be very good since it talks directly to the OS's low level API's.

The Author

The author has been programming professionally since the late 1980's, with much of his early work on CPM and IBM compatible (DOS). He wrote his own compiler so he could build a game which was published in the Compute Gazette magazine for the Commodore 64. For over 10 years now he had been writing tools for use with PowerBasic, all developed using the pure WIN32 API. His customers have developed a number of commercial applications used in business and industry, using his tools. He has written a number of articles for Code Project about programming and also written articles for the online tech magazine Betanews.com.

Sample Downloads

Here is a small sample download which demonstrates a number of the basic features in the GUI engine I will be using for this application. I created it to test compatibility of the engine with Windows 8, but is currently mouse driven rather than touch (I am in the process of updating the engine for touch).

Win8 compatiblity test app

Here is another sample app which I quikcly created just for testing my 3D OpenGL engine. It supports STL format models and also the 3D primitive scripting language.

3D Model viewer

Note: If an STL file you use with the viewer does not display, it is possible it has an error in how the header is defined. The viewer may think the file is an ascii file when it is binary. To fix the problem with the file, simple change the file extension from .STL to .STLB which will force the viewer to load the model as a binary model. This viewer can handle model with millions of polygons. I have tested it with models with over 2 million polygons.

To build the application I propose in this article will require many of the GUI engine features I discuss above.

Using the code

Would you like to see the code for the 3D model viewer above ? You can download the source code here:

3D Model viewer code

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Chris Boss
Software Developer Computer Workshop
United States United States
Chris Boss is the owner (and programmer) of a small software development business in rural Virginia, called the Computer Workshop. For the last ten years or so he has been developing tools for use by Powerbasic programmers (see: http://powerbasic.com ). His main product called EZGUI (Easy GUI) is a high level GUI engine with Visual Designer and code generator. It is in its fifth generation now. He is an experienced Windows API programmer (more low level) and has experience in writing GUI engines (forms/controls), drag and drop Visual Designers, Graphics engines (printing and to the screen) and one of his favorites is a Sprite engine (2D animated movable images). His current project is version 5.0 of his main product EZGUI, adding such features as multi-monitor support, component engine, custom control engine, superclass engine and the latest project a 3D OpenGL based custom control. One of the goals he has is to push the limits of Windows software development, while making it easy, fast execution speed, small footprint (size of executables) and code reusability while providing a more graphic experience in user interfaces, while still being able to write software which can fit on a floppy disk (small footprint), use minimal amount of memory and able to run on multiple versions of Windows from 95 to Win8.

Comments and Discussions

 
GeneralMy vote of 5 PinprofessionalChed198016-Aug-13 0:03 
Sounds like a great idea! I used to make lots of board games in my youth, so I would be very interest to see this developed!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 15 Aug 2013
Article Copyright 2013 by Chris Boss
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid