[discussion] Do you use helper utilities?

When I’m working on my Blender game engine projects I often find that I need to enter a lot of data.
For example making a world map or dungeon. Entering monster stats in to a database to be loaded in game. Writing dialog for an adventure game. I often make quick helper utilities with Blender to make this chore much easier:

This utility for example allows me to draw prefab segments for my dungeon generator. I have another one for general purpose data entry. They are works in progress so it’s not possible to save with them yet, but I’ve done it successfully in the past for other projects, using dictionaries written to a text file with the pickle module. It’s easy to then load the data for use in my games using code like this:

filename = 'color_dictionary.txt'

unpicklefile = open(filename, 'rb')

picked_contents = pickle.load(unpicklefile)

own['team_colors'] = picked_contents


How about you? Have you ever tried making a helper utility to speed up development of your games? If so, what did it do? Did you use blender or another program? I’m curious. :slight_smile:

No I did not.

I was trying to create a graph editor for an FSM, but this didn’t worked, so I stayed with my text based FSM description.
I used some third party tools like the resource bundle editor for eclipse to edit multi-language properties files. I do not use it much as my projects never went into a state that I need it ;).

I have never made a utility which had the sole purpose of speeding up development on my end. In an older “simulator” that I made I have created a level editor, but this was more of a feature for the end user, though it did help speed up the creation of levels.

I think games go through a couple of stages of development, the first being concept demos and then prototyping, and finally content creation. Since a lot of Blender projects stay at or around the first two stages most people don’t need to create a lot of content. Content creation can include making art assets but also giving all your monsters stats, creating weapons and other items and setting the stats for them too, as well as creating the rules for how they can be used or combined. It includes making levels and dialog trees for in game dialog if you have that.

When I have got to that stage in the past I usually used a spread sheet and manually entered data but it was slow and painful. I spent 2 weeks just entering data for an old project. :frowning:

Here’s a look at the prototype of the data entry helper I’m working on:

The plan is to make it flexible so you can change the boxes around, change what they are recording, add other things like displaying the model along with the animations being assigned so you can check how they will look. You’ll also be able to shift the screen up to get at a list of already written entries. These can be loaded up for editing with just a click. I want to add a function for autocomplete for existing animations or game objects, and spell checking. I was looking at this interesting blog today for ideas on how to improve my data entry helper. It’s actually amazing what can be achieved with the tools we have right here with python and blender.

I think helper utilities are very useful and I’m interested to know what other people do with them, or would consider doing with them. I might share a couple of mine once they’re finished.

Actually when I first started out with Blender I set the attributes of monsters and weapons by changing the value of properties on the in game objects. This was the worst way to do it because I couldn’t remember who had what stats, I couldn’t compare them without taking notes in a spreadsheet, and it took way too much time to navigate around the 3d view, find the character or weapon, scroll though the endless properties to find the one I want and then change it. After that I learned to make a setup script which would get attributes for a particular entity from an external dictionary.

I wish you could copy and paste logic, and properties, it would make helpers as simple as a “holding zone” for data to copy paste.

(I recently had to copy / paste over prop 36 times, and rename 36 empties by hand for a paid gig. it took more time then coding it!)

You could write a Python addon to do this, might be a fun and useful challenge.

While I agree this would be a nice feature, it is questionable if you really need to copy logic around. Any developer will tell you that replicated code is bad style and results in hard to maintain and often buggy code.

Well, I can create properties at runtime, but then you need an external debugger, (text object or print() etc)

in ‘Init’ not in own:

but then I sill need to pull the data from a target and I usually store data in properties.

you can do copy logic bricks , but not copy object properties, (it’s a data block just like anything else right?)

I think you should come back to topic. The question was what helpers we use rather than what helpers we which to have.

Yes, I write helper utilities. For the now deceased DEEP Space, I wrote two modules that added to the blender interface to create various objects for interactive purposes (ie enemies had a couple of buttons and sliders to tweak AI).

I haven’t really done any big games since DEEP Space since I have less time these days, so I haven’t written any helper utilities for a while. That said, the latest unstable build of Blender appears to have fixed one of the bugs with my lighting manager, so maybe that counts (manages the number of lights in a scene at any given time using distance from the player)

I’m pretty sure you can copy properties materials and logic by selecting multiple objects and your target object last and then choosing copy ______ to selected. press space and type what you want to do if you can’t find it in the menu.

It overwrites, rather than inserts the properties and logic bricks.

It would probably be better to write them to use the blender UI I agree. I don’t know much about python outside of the BGE though and the few addons I’ve tried using often felt a little clumsy, like it was easy to lose the contextual menu halfway through doing something, and often unexpected things happened. Sometimes I didn’t know if the operation had been a success or not.

Also my programming skills are probably not really up to the task. :slight_smile:

I have written scripts before for making a mesh to a particular specification (like when I wanted the verts in a special order) or other things like that, but they were mostly fire and forget script. Just run them and they’re done. I’ve never done anything that had sliders or optional input.

Anyhow, I like writing these helpers in the BGE. I like how everything is central, not peripheral. I like being able to visually represent things. With the level designer in the first post the code for displaying the sections of the dungeon is exactly the same as that for adding sections of the tileset in to the game. That means if something looks bad here, or fails or returns an error, I can be sure it will behave in a similar way if I try to use it in game. It also means I can play around with the display code as I work on the helper, trying to get something that works how I want.

I don’t even mind really that they have a hideous windows 3.11 vibe to them. :slight_smile: