Given the fact that C is such an old language (dating from the early 1970s) and lacks many of the features of more modern language (such as object orientation, garbage collection ¬ and even a string data type!) why is it still so widely used? In fact, C continues to be one of the most important languages for professional development.
I’ve written an article on the Udemy blog to try to explain what C is and why it is so important: “What is C Programming?” which explains a few important details about the c programming language.
I’ve just published a major update to my adventure game system for C# programmers. To get the code, sign up to my newsletter and I’ll send you the download link: http://www.bitwisebooks.com
The new BIFF C# (‘Bitwise Interactive Fiction Framework’) adventure game system now has the same feature-set as my Java framework (also available for free download). These frameworks are developed from the codebase created for my two books on text adventure programming, ‘The Little Book Of Adventure Game Programming in C# (and other languages)’ and ‘The Little Java Book of Adventure Game Programming’.
New features in the C# version of BIFF include:
Adjective matching
Parsed adjectives are compared with an optional list of adjectives stored in Thing objects so there might be three small rings, say, brass, gold and silver. If the player enters "take small ring" the game will ask whether the "small gold ring", the "small brass ring" or the "small silver ring" is intended.
Mass is associated with each object.
Here mass can be thought of as the combination of size and weight so that the player can only carry items up to a certain total mass. The mass of items is calculated recursively when things are in other things (so player can't ‘cheat’ by placing high-mass items into a low-mass container and then carrying the container).
The Thing hierarchy is extended
Descendants include generic things (non-interactive scenery such as trees, walls, dust etc.) and lockable things. A lockable thing can be opened using a designated object (e.g. a specific key object).
Other changes include:
Objects now have a Container property which stores a reference either to Room or to the container (such as a sack or chest) in which they are contained. Both the map and the list of treasures in the game are implemented as dictionaries. Special actions are now easier to implement (say, to take certain actions when the gold coin is put into the slot but not when the silver coin is put into the slot). You will find more documentation in the file NOTES.txt supplied with the code.
BIFF includes a simple sample game to get you started. The essentials of adventure game programming are explained in my two books on the subject:
The Little Book of Adventure Game Programming in C#
There are now so many different software packages for recording and editing screencasts (videos of activity on a computer screen) that I often wonder why I still use Camtasia? The answer, I think, is that it does the job it is designed to do – and no more. There are plenty of general-purpose video editors which provide basic screencasting as a small part of a huge feature-set for editing camera-recorded video. But Camtasia sticks to its original brief: while it can record webcam video, it remains fully focussed on screencasting.
In recent years, TechSmith has released a new version of Camtasia once a year. The last few releases have each offered a range new and improved features but there have been no really gigantic changes. The same is true of the latest version. The new things in Camtasia 2021 are mainly expansions of, or improvements to, its existing feature set. That means that if you have used Camtasia before you will be able to get started with the new release with almost no learning curve.
So, what are the new features?
Here the new 'exploding hexagon' transition merges two adjacent clips using an animation
Running the Windows version of the software, the first thing I noticed was the hugely expanded range of transitions. A transition is an effect that can be used to join together two video clips. In previous releases of Camtasia, the transitions were limited to fairly simple effects such as fades, slides and animated page-folds. In Camtasia 2021 there are over 75 transitions including bubbles, diamonds, waves, arcs and imploding hexagons. To use a transmission you select it in a side panel and then drop it onto the ‘join’ between two adjacent clips. When the video runs, the animation causes one clip to blend into the other using the selected animation.
A few visual effects have been added too. You can add motion blur to make fast action animations (text animations of headlines, for example) look more effective and you can round the corners of either the main recording or of a foreground element such as a video-clip superimposed over a screencast. You can also add background tints to clips to change the colour tone and you can add matte effects to (for example) create a silhouette or cut-out of a foreground element such as text or video. You could, for example, add a matte to a headline so that the background videos shows through the characters.
A matte has been applied to the text so that the animated background 'shows through' the letters
One new feature that I was looking forward to using was the Colour LUT (Lookup Table) capability. This lets you apply tonal effects to video clips to enhance the ‘warmness’ or apply subtle global lighting effects. You can see an example of this in the Camtasia demo video below. Sadly, when I looked for the LUT filters I couldn’t find them. On checking with TechSmith I discovered that Colour LUT is only provided in the Mac release of Camtasia, not in the Windows version that I’ve been using. I was assured, however, that it is coming to the Windows product and will be supplied in a forthcoming maintenance release.
Other new features in Camtasia include simplified creation of ‘assets’ such as titles and animations which can be stored for re-use in the Library panel; an ‘emphasize’ audio effect to make it easier to fade background music beneath a foreground narration; plus, various usability improvements have been made to help you work more easily with groups of clips and with multi-file projects. Once again, the demo video below provides more information.
In summary, as in the last few releases of Camtasia, the updates to this new version are mainly improvements to existing features or additions to the range of those features (particularly the hugely expanded number of transitions). The look, feel and core functionality of Camtasia are relatively little changed. This has the benefit that it will be immediately familiar to existing users while its straightforward user interface makes it simple for new users to learn too. Camtasia is still my screencast software of choice. However, as it increasingly faces competition from general-purpose video editing packages which often provide some screen-recording tools, at some time Camtasia will need to come up with a few more “must have” features if it is to distinguish itself from the competition. The addition of Colour LUT in the Mac Camtasia is certainly taking it in the right direction and I look forward to seeing that, as promised, in a forthcoming maintenance release for Windows.
As I write this, the sun is shining, the birds are tweeting
and I can see primroses in the grass outside my window. Here in Britain, spring
has finally arrived! And when spring arrives, I always feel it really is time
to start work on something new. I have a few new projects lined up, some of which
I’ll tell you about later in the year. But I’ve also just finished a book. My
latest release is called The Little Book Of Java and it should be the perfect
thing (I hope!) for anyone who wants to learn to program in Java quickly and
easily.
As always, I’ve tried to get right to the heart of the topic
without bombarding the reader with lots of information (class libraries, method
listings and so on) that you can easily find online.
The Little Book Of Java explains Object Orientation,
classes, methods, generic lists and dictionaries, file operations,
serialization and exception-handling, creating commandline and 'visual'
form-based applications. You can download the source code ready to run at the
commandline or load into an IDE (the free NetBeans IDE is recommended).
Topics covered include...
Fundamentals of Java
Object Orientation
Classes and Class Hierarchies
Variables, Types, Constants
Operators & Tests
Methods & Arguments
Constructors
Access Modifiers
Arrays & Strings
Loops & Conditions
Files & Directories
structs & enums
Overloaded and overridden methods
Exception-handling
Lists & Generics
Streams & Serialization
...and much more
You can buy The Little Book Of Java in paperback or for
Kindle from:
I've just uploaded the code of a fully-featured collapsible
outliner which I originally developed for my own use but I’ve now decided to
make publicly available. This lets you create lists or ‘trees’ of all kinds
of structure information: contacts lists, TODO lists, project plans, plot
outlines (for writers), a CD or MP3 database – whatever takes your fancy.
The project contains many thousands of lines of Object
Pascal code for Delphi. To download the zip file, sign up to my mailing list
and I’ll send you a link. In the meantime, here’s a short video overview:
If you need a quick way to learn Delphi, you can get a copy
of my book, The Little Book Of Delphi, on Amazon:
I’m pleased to announce my latest book which explains how to write a retro-style text adventure in Java using object oriented techniques. I already have a book on programming adventure games in C#. The new Java book explains all the techniques described in that book so that you can parse user commands (e.g. “put the sword into the sack”), take and drop objects, move around a map, save and load games and so on. But it also goes much further, to explore more advanced techniques.
For example, it can use adjectives to distinguish between similar objects. Maybe there are three swords here. The user says “take sword”. The game may now reply “Do you mean the gold sword, the silver sword or the Elvish sword”? Or the player may write commands such as “Put the small gold ring into the big brown wooden box.”
I also explain how to use recursion to ‘unwind’ networks of objects into linear lists. For example, if you have a sack containing three boxes and each box contains three treasures, you would need to navigate a network of objects to locate each treasure. You can either do that recursively each time the player wants to interact with the treasure or you can create a linear list of treasures so that your code can iterate through that list (for 1 to 10, say) instead of recursing down the network of objects.
And I’ve added a ‘mass’ property to objects. The mass is defined as a value that indicates how difficult that object would be to carry. It’s not really ‘mass’ as a physicist would understand it! So a huge but very light kite might have the same mass as a small but very heavy gold brick. Every time the player picks up an object, the ‘mass’ being carried increases until no more objects can be carried. And it’s no good cheating by putting massive objects into low-mass containers (say, a sack) and then carrying that container. Thanks to recursion, my code calculates the entire mass of containers and everything they contain!
The Little Java Book of Adventure Game Programming is available in paperback or Kindle format, from Amazon stores worldwide:
If you've subscribed to my YouTube channel you'll know that I have lots of lessons on programming C, Java, Delphi, Ruby and more. Over the past few months I've been posting a series of videos to help people get up to speed with C# programming. These lessons can be followed in order if you are new to C# or you can just jump in to watch whichever lesson is of interest. This is the latest video...
The complete course is called The Little Course Of C# and you can view all the lessons (more to be added later on) HERE.