Peter visual programming tool
by Gemtree Software
by Gemtree Software
Peter is a visual programming system developed by Czech programmer Miroslav Němeček and initially released on June 1st, 1999 for the Windows operating system. It was intended to be used as an educational tool for teaching the fundamentals of computer programming to children, as well as enabling advanced users to create more sophisticated programs and games in a visual environment. He worked on Peter for over a decade before ceasing development in 2011 due to a lack of interest in the software. He released his program for free in 2012, and then released the source code in 2013. The software is very similar to Game Maker, which was initially released a few months after Peter, on November 15, 1999.
src: http://www.breatharian.eu/Petr/en/about.htm / (archive)Gemtree Peter is a visual programming tool designed for a simple and fast generation of the programs for Windows 95/98/NT/ME/2000/XP/Vista. Its principal characteristic is the graphical presentation of the program structure. The program sections are assembled using the mouse like a jigsaw puzzle. Thanks to the justification check of the element combinations, carried out already at the time of the program generation, there is no chance of syntactic failure origination. The program presentation by means of a tree structure enables a considerable improvement of the program lucidity. The creation of the program is quickly becoming extraordinary easy and flexible.
Gemtree Peter is intended for a broad range of the users. By using it, even the children of the pre-school age are able to draw pictures and teach their little rabbit to move. On the other hand, there are a lot of powerful functions intended to use by skilled programmers. It is not Peter's goal to train programmers out of all users. Its objective is to make the program generation accesible to all who want to create. No knowledge in the programming or computer areas is necessary. Everything is covered by the numberless functions. This is an effective mean for training the logical thinking, imagination, and aesthetic feeling.
This archive includes the Peter tool as well as older versions, source code, unfinished example programs, graphics tools, documentation, tutorials and more.
A brief letter from Miroslav explains his motivation behind developing Peter:
src: http://www.breatharian.eu/Petr/en/welcome.htm / (archive)Welcome to the World of Peter Rabbit!
aka Introduction by the Author
Once, many, many years ago, one morning I was sitting and wondering what to do for my son, first-graders who would like programmed like me, but unfortunately all the familiar tools such as Karel and others like it seemed to be useless. Daughter came when she was ready to take her to kindergarten. She wore a pale blue shirt with a large picture of a white rabbit. I was so impressed that I quickly sketched a basic drawing of him. At that time ran on television series "The World of Peter Rabbit and his friends", according to the literary works by British writer Helen Beatrix Potter. And a new hero of programming world was born!
Soon he got a girlfriend. After all, two is better than one. First she named Petra (in Czech language it is like girl-Peter). But the names were confused and especially in English. So the couple Peter and Lucy was formed, like the eponymous novel by the French writer Romain Rolland. Petra still remained in the names of many internal program variables.
Peter was rapidly increasing, as well as growing son and with that his programming requirements. A very common image was then, son and daughter sitting at their PC and puttering something in Peter. The son is grown-up today and I go to him contrary to advice me, because it is now a much better programmer than I am. I wonder how much of his development has involved Peter? I think it had to show that since 8 years he was teaching logical thinking and algorithm development.
With regret I observe how real programmers disappear around me. Such those real ones, who understand how things work inside and what is XOR and who write programs in hex code. Today, under commercial pressure, people are switching to puzzle systems, although they are slow and cumbersome, and even the most primitive operations they solve through multistage XML parsers, because they do not see what is going on inside all those modules. With overkill the world becomes increasingly complex and yet it is so simple in fact. Just penetrate into the essence and try to make things as easy as possible. Sacrificing a little more of their own work and effort is needed just for the good feeling, that what I give to others, is really good.
One of the things that is sometimes criticized on Peter is his small versatility. Reportedly the object programming, true color, web applications are missing. The Other minds a rabbit puerility (of course, only the age group around "-teens" who no longer want to be children, but they are not parents yet). Peter is NOT universal programming tool and so well. Just that Peter knows A LOT and does not want to know EVERYTHING, because then all its advantages, based on simplicity would disappeared. Proper programmer uses what he has available, and he can use it fully. And if that's not enough, he adds something else. He does not care whether there running rabbit. Even the thought idea came to me that anyone who can not tolerant and adaptive view of the world, he/she can never be a good programmer.
The main purpose of Peter is: quickly and easily create simpler programs and simple games focused especially for graphics. May be used by children since preschool. And maximum limit - does not exist. I often using Peter myself, although otherwise I programming in other languages, because in Peter you can quickly throw together something and it‘s much easier than in anything else. Not only because of programming in icons, but mainly because of good functionality. I’m most using 3D graphics, I have never come cross to something similar and easily accessible 3D engine.
Someone has sometimes a concern that it will be useless to waste time studying tool which later stops using. He/she would start now "with something big." But this is the wrong approach. Art of programming is not about instruments and how much of them you can control (which is a common approach today - learning control of tools), but it is about how the programmer can think of. If you will learn think programmatically, then you don‘t not care in what you programming, because then it is always about just a little bit different syntax.
That is why Peter does not even deal with object programming. The main thing is to learn structured programming and logical thinking. And what is variable. But objects and classes - these are only structures and simplifying their using. It is a mistake to learn programming from "backward", as it often tend to do today and to exaggerate the importance of "massive tools". If one learns to understand the basics and logic, then it is easy to him to understand even the higher tools. Often he will not use them rather and he will choose his own, easier procedures.
I am grateful to all those who are committed to the promotion of Peter. Especially thanks to previous users, who for many years funded the development of Peter and brought him so to his present perfection ( ;-) ). Further developments would have harmed it and therefore it was released as freeware. I wish you let Peter to bring benefit and joy to you.
Despite the cute rabbit mascots and the very young target audience, Peter has very advanced features that nearly put it on par with Game Maker 8.0, which released in the same year that development for Peter had ceased. It had 3D graphics support 3 years before Game Maker did, sophisticated program flow control, advanced mathematical functions, support for configuration files, DLLs, memory pointers, file system operations, Windows dialogs, and much more.
Many programs developed by Miroslav and other users of Peter were included with the software to demonstrate the capabilities of Peter not just as an educational tool, but as a general purpose programming language for any kind of software project. Simple clocks, calculators, screen savers, word processors, audio players, to 3D shooters and racing games.
One of these sample programs reached meme status on the American side of the internet, in the early days of Youtube:
Along with the example programs initially packaged with the software, there is also hundreds of unfinished programs included in this archive. The unique thing about Peter is that the executables generated by Peter are also the project files -- you can open (almost) any .exe generated by Peter, in Peter, to edit and view the source code. Maybe you can finish the abandoned programs!
Here's a README for you:
Gemtree Peter 2.50 (for Windows 95 and later)
FREEWARE / PUBLIC DOMAIN
Author: (c) 1997-2022 Miroslav Nemecek
author's homepage: http://panda38.sweb.cz
author's email: [email protected]
alternative email: [email protected]
Author's homepage of the program Peter: https://www.breatharian.eu/Petr/en
Peter's official website (no longer maintained): http://www.gemtree.com and http://www.gemtree.cz
Programs and games created in Peter: https://www.breatharian.eu/Petr/en/program
community server: https://www.itnetwork.cz/pro-deti/petr
The Peter program can be used freely for non-commercial and commercial
purposes. Similarly, you can freely use and modify the Peter source code.
However, I don't recommend using the source code, because I've been
working on Peter I was just learning to program in C++ ;-) and there
are many things I would be doing today differently.
Peter is offered for use as is, without any no further support and no
further development or fixes.
Start the installation by running Peter250.exe (preferably as
Administrator) or by unpacking the ZIP without the installer.
Under Windows 10, add the following from the Help folder:
Peter.exe, PETER_CZ.CHM a PETER_EN.CHM.
- Under some systems, installation and uninstallation may not work, in
which case it may be necessary to use a version without installation.
Alternatively, uninstall by re-running the installer. The installer
usually works by running it under Administrator.
- Some antivirus programs may mislabel programs created by in Peter as
containing a virus (mallware). This is because Peter saves the edited
program directly to an EXE file. The EXE file contains interpreter and
the attached program in binary form. Some antiviruses consider the
interpreter's activity to be the manifestation of a virus. Typically,
these are programs stored in a non-executable form (without an interpreter).
- Help cannot be displayed under higher systems. It is necessary to either
install WinHlp32.exe from Microsoft website or copy the files Peter.exe,
PETER_CZ.CHM and PETER_EN.CHM (this is a modification of Peter by user
Jiri Peroutka) into the Peter folder from the Help directory. You can also
view the Help in HTML format using Help\HELP_EN\index.html.
- Some programs use MP3 sounds (e.g. ghost voices in the game "Thirteen
Ghosts"). If the sounds do not work, you may need to install an MP3 codec
Version with installer
Installation problems: when you try to uninstall it the standard way,
Windows XP (or higher) may report an invalid application. In this case,
use the Peter installer again to uninstall (the mini version is sufficient,
and delete the installation folder manually) or just delete the Peter
installation folder and the corresponding shortcuts manually. To install
on Vista and above, you may need to use the version without the installer
(just unzip it) or an alternative installer from the community server
https://www.itnetwork.cz/pro-deti/petr . Or usually just run the installer
Peter250.exe - Peter 2.50 full installation (400 MB)
Contains: application Petr, helps (Czech and English), about 160 sample
2400 pictures, 1000 icons (objects), 1500 sounds, 560 music,
400 sprites, resources for generating sprites.
Peter250mini.exe - Peter 2.50 mini installation (5 MB)
Contains: application Petr, helpy (Czech and English), sample programs
Maze and Tutorial, sample library files.
Peter241Lite.exe - Petr 2.41 Lite installation (5 MB)
Older version with limited features. May be useful for younger or beginner
users because it does not contain any dangerous features (such as file
and memory operations). Can be installed and used together with version 2.50
because it installs in a different folder.
Peter223LiteCZ.exe - Petr 2.23 Lite installation (2,5 MB)
An even older version with even more limited features. Help is only in Czech.
File descriptions (aliases) are in Czech, English and German - depending
on the chosen language. The language when running the sample programs
depends on the language selected in the Peter environment (if it is running)
or on the system language.
Version without installer
Peter does not require installation for its operation, it is enough to extract
the archive ZIP file to the installation folder (use WinZip or even better
WinRar to extract it). Thus, multi-user environment is not automatically
supported, i.e. when modifying the sample program, the program will change
in the installation folder. But this can be remedied by creating a shortcut,
and setting "Run In" to the user's working folder and "Destination" to Peter's
Peter250.zip - Peter 2.50 full, ZIP without installation (370 MB)
Peter250mini.zip - Peter 2.50 mini, ZIP without installation (4 MB)
Peter241Lite.zip - Peter 2.41 Lite, ZIP without installation (4 MB)
Peter223LiteCZ.zip - Peter 2.23 Lite, ZIP without installation, Czech help (1,8 MB)
Peter251_help.zip - Peter 2.51 help, ZIP without installation (6 MB)
A modification of the Peter by Jiri Peroutka, with help rebuilt in CHM format
for Windows 10. The original version of the Peter uses help in HLP format, which
was supported by older systems. Newer Windows systems no longer support the HLP
format and it is necessary to install HLP support from Microsoft's website - the
WinHlp32.exe program. Instead, this help in CHM format can be used. It can be run
either directly or from within the Peter using a modified version of Peter 2.51.
I wrote the Gemtree Petr program 25 years ago, when Windows 95 was the standard
operating system and the display had 256 palette colors. The functionality of
Peter is based on this. It only supports 256 palette color graphics (or possibly
limited True-Color in 3D graphics), and some features are now obsolete and
problematic in the new environment. And I just learned to program in C++ on
Peter, so the code looks like that. :-) I would have done many things differently
Peter's source code is a bit problematic to compile. (by the way, sorry to
foreigners - the comments in the code are only in Czech) It requires Microsoft
VC 6.0 compiler to compile, and Windows 95 or Windows 98 environment. Reasons:
1) Standard C libraries are excluded from the compilation, Peter handles
everything himself (e.g. as a memory allocation manager). However, this
requires that the code uses some workarounds to accommodate the compiler.
This makes it very difficult to adapt the compilation to another compiler.
2) The images in Peter are in compressed BMP format 256 colours with palettes.
The display must be in 16-bit color mode. The images are edited with the
internal editor MS VC++ 6.0. If the display was in more colors, the content
of the images was destroyed. And if a system other than Windows 95-98 was used,
the images were not compressed.
I've tried compiling the program on a current system with current MS VC++,
apparently it would be possible, but would require changes:
- enable linking of standard C libraries
- use standard C libraries (malloc) instead of the custom manager
- edit images with an external editor
- do not use math coprocessor rounding mode switching (solve differently)
- cancel initialization of global objects
I was eventually able to compile it, but it didn't work - it would have required
some reworking modification of the EXE files. :-)
How to compile:
Before compilation, run the commands "Setup\Res\Source\!Konv.bat", which prepares
images for the installer, and "HLP\Source\!Konv.bat", which prepares images for
help. The DOS utility alchemy.exe is used, so it is necessary to have enough DOS
memory, and Windows max XP is required, newer systems no longer support DOS
programs. Windows 98 can be run under the VirtualPC emulator on newer systems.
If VirtualPC is no longer supported on the system, you can first emulate Windows
XP in VirtualBox and then emulate Windows 98 in VirtualPC.
After converting the images, open the project in MS VC 6.0. For all projects you
must compile all variants of Release. The DelExe project must be compiled first,
then you can go alphabetically from top to bottom (Loader must come before Peter).
The environment should be Windows 98. When trying to run the compilation e.g. under
Windows XP, it will be necessary to run VC in W98 compatible mode. Peter's internal
images are edited by VC's internal editor, Peter is ready to load them (in 8-bit
BMP format with RLE). When editing the image, the display must not be set to
true-color, 16-bit color mode must be selected, otherwise the editor will corrupt
the image colors. Images must be edited under W98 and not under NT and higher, as
higher systems do not save images compressed and the programs are then much larger.
If you edit images with another editor, you must delete the *.aps files for the
compiler to load the new image. When changing the version number, correct the version
in the files Main.h, Setup\Main.h, HLP\Main_en.rtf, HLP\Main_en.rtf, HLP\Peter_en.hpj
Folders in the project:
DataInst is installer of data files (e.g. installer of sample programs), no longer
DelExe is utility to delete the installer after uninstalling Peter.
Gener is utility to complete the Peter's installer. It compiles contents of
subdirectories (installation groups) into package: "0"=main program with helps,
"1"=applications of the Peter, "2"=item library, "3"=picture library, "4"=sprite
library, "5"=sound library, "6"=music library, "7"=other libraries, "8"=sources
to generate sprites. Peter.exe file determines date and time of installed files.
HLP is a help (compiled from RTF files to HLP using HCW compiler).
Loader is interpreter of a program created in the Peter. Peter adds to it (into
EXE header) section ".petprg" which contains edited and executed program.
Interpreter at startup compiles it into pseudocode which is executed later - it
creates EXECITEM structures, which include addresses of functions to be called
fot the entries.
Loader0 is simplified loader. It does not execute the program and serves only as
header of the program to enable its distribution in non-executable form (to be
Pov2Spr is converter of pictures to sprites.
Setup is Peter's installer.