Jump to content

Erik Leppen

Member Since 25 Jan 2007
Offline Last Active Mar 02 2016 11:04 AM

#4952785 GMC Death Pool

Posted by Erik Leppen on 16 February 2016 - 09:47 AM

Don't worry. It will happen "soon".
  • 1

#4951206 Is it true that Game Designers tend to be eccentric?

Posted by Erik Leppen on 13 February 2016 - 09:11 AM

Nowadays, half the kids I meet have some emotional or psychological "disorder"

To me, "disorder" is merely a word to describe the natural variation that comes with our species, and a society that is tailored to a specific kind of person, resulting in the other varieties running into problems they didn't ask for.
  • 1

#4942062 How do you feel less bored?

Posted by Erik Leppen on 26 January 2016 - 04:05 PM

Make new games.

After all, you're on a game dev place. ;)

But jokes aside, I experience that creating things never gets old, as long as you have the creative energy. Whatever it is you enjoy, make it. It helps if you do different things. I do LEGO building, music making, drawing, and even then I quite frequently resort to playing some games if I'm out of creative energy :)
  • 1

#4941990 Relationship Discussions

Posted by Erik Leppen on 26 January 2016 - 11:22 AM

I have very little to add to the discussion that hasn't already been said, but I do want to say that the discussion itself is wonderful, so thanks for that :)

That said, though, one necessary ingredient for any relationship is self-confidence. You cannot expect another person to love you if you don't love yourself. In real life I have long been a shy guy (this has changed a lot over the last three years) that didn't go out a lot, and I wasn't very self-confident. The internet however, is a way to conceal this, and show the world those parts that I am confident about, without having to show your weaknesses.

However, to be loved as a person (as a whole) you have to show your weaknesses, to allow the other person to love your entirety and not just part of you. If you only have online contact, you're always looking at a filtered view of the other person. You're never experiencing the whole person. You can fill in many things with your own ideas about the other, but those are in fact just fantasies. Of course, IRL there's also a filter, but I think it always shows more. Humans are evolved to interact IRL, so that's where we get the most information about people. Not to say online relationships aren't real, but they are different. What you're loving is a subset of a person.

I have the idea that online relationships are about rationalizing love. Personally, I think that in a real-life relationship, the physical aspect is an essential part. It might not be rational, but love is never rational. It's a very touchy-feely subjective thing.

That said, though, what do I know? :)
  • 2

#4939084 Mike daily created the lemmings ?

Posted by Erik Leppen on 21 January 2016 - 10:36 AM

Mike didn't create lemmings. He just built a game world and accidentally opened a gateway to another dimension, and then suddenly dozens of those little buggers came marching in and ruined the place.

No, that's the GMC you're talking about.
  • 3


Posted by Erik Leppen on 20 January 2016 - 09:04 AM

By the way, if the forum will be frozen, maybe it's a good idea to change the news header that now says to change passwords, because it doesn't look like the best possible message to put there forever :)
  • 3

#4931761 Worst job you've ever had?

Posted by Erik Leppen on 08 January 2016 - 11:39 PM

Administrator of the GMC.

Grossly underpaid, wasted the best of my years, not worth the deep scars and trauma it left.

On who? ;)
  • 1

#4927670 Help: i need to store 270k variables

Posted by Erik Leppen on 01 January 2016 - 09:45 AM

I have made a word game before with about 200,000 words in it. What I did was only load the words I need. I used GM to build a tool to separate the word list into about 400 small files, one for each starting letter and word length. So I have words_a_6.txt for all six-letter words starting with A. There won't be more than about 5000 words in the same file, and many will be about 1000 or less (depending of course on your glossary).
Then, I have a few arrays:
  • loaded[starting_letter, length]
  • list[starting_letter, length]
all lists start empty, and all loaded[] start false. Then, when I need to check a string for a word, I first load the list for that string's starting letter and length, and then I do a binary search through the array (I make sure the array is sorted by having the source text files sorted). Searching for a word in a 5000-item sorted array this way is very fast. The idea behind binary search is that when the array is sorted, when the array yas 5000 elements, check the 2500th entry first. If it is larger than the sought item, dismiss the first half and check the 3750th entry, otherwise, dismiss the second half and check the 1250th entry.

This way, you don't have to load 200,000 words on startup, but load 5000 or so words at various moments during play, which is fast enough to not stall the game.
  • 1

#4913824 Design Patterns and Principles in GameMaker (or: "Organising Code")

Posted by Erik Leppen on 01 December 2015 - 02:24 PM

How do all of you keep your projects from becoming overly complex and unmanageable?

I wish I knew.

As a professional software developer, I shall not allow any of such monstrosities in my code base, not even for a hobby project!

Yes, that's the ideal world. However, as I have learned, many (if not most) professional code environments do not work that way. Far from that. I know a place that violates almost every rule, and no, it's not a GameMaker project. Really, compared to that place, the Turmoil codebase is a neatly organised, shining transparent diamond of code that reads like a novel. However, standing by itself, I feel that the best way to dscribe how Turmoil is organised, is: "well, it works".

Anyhow, things I do to try to organize code... The post below is a bit of a random collection of ideas, and it by itself already not really organized...

Visual documentation.
My documentation looks like this:
This scheme shows all rooms (and all possible room transitions), all objects and where they are created, all global variables, all instance variables, all constants, all events, all actions, and the logical if-then structure of some routines. Many scripts and resources are not shown.

As you can see, it's... not... really... structured...

Thing is, I don't see how it can be structured. After all, there are variables that many parts of the game need. Almost every ingame object needs to know which upgrades the player has researched. There has to be a way to get that information from the campaign towards the ingame objects, no matter whether directly or via intermediate stops in other instances. While playing, a copy of this data is held inside the game object, so that I can use the game object without needing the campaign (for the single levels).
I created a "gameinput" object which works as a varibale container for the game. Something in the menu or town room creates the gameinput, puts the required data in it, and calls a room_goto. Then, in the game room, the game object pulls the data from the gameinput and destroys it. At the end of the round, the game creates a "gameoutput" before ending the room, so the menu can get the data from there.

This way, I don't have to make the game object persistent and can still carry data beyond the borders of a room :)

Creative use of English to name things
The word "level" is a dangerous term, because it can mean anything. And you're in for trouble if you use the same word for two different things. So I try to avoid the word, and use words like "plot", "world", "estate" or "storey" for the level you're in (depending on the project), "tier" for the upgrade level of a structure, "occasion" for the current level number in the campaign, etc. When I made a prototype for a game about trains, I deliberately used the word "quay" for the platforms, because in gaming, "platform" unfortunately already has two meanings. This way, I minimize the risk of confusion. I try to use metaphors for things, and I often use Google Translate to find a good word for something. I may get an unusual word, like "wharf" for "load or unload" but at least loading wagons will not be mistaken for loading files.

One object, one responsibility
This is hard. Turmoil has an invisible object "bill" that does everything related to money. It determines the starting money, it can take loans, and the stats object pulls the financial data from it. I also have a persistent object "pricing" that does nothing but hold all variables related to pricing. (If GML had array constants, I would have used those instead.) This keeps thing separate, as much as possible.

What I keep finding difficult is thinking about the responsibility of objects over other objects. That's probably why my scheme is such a mess, but which object is responsible for the creation and destruction of a certain object? Ideally, one should define this for every object.

Everything related to the bill starts with bill. bill_borrow, bill_can_repay, bill_repay, bill_landlease_value_remaining, those kinds of things.

I usually don't do extensions, except for things I can use in many games, but usually I just have a set of scripts. For example, localization, where everything starts with lz_.

All my variables have, implicitly, a type. I don't mean, real or string, I mean, this variable holds a province, that variable holds a wheel, this variable is an orientation, that vairable is a hud item, etc. Except for the value undefined, variables won't change type. I use constants for the type's values, although enums would have been better (were it not for syntax coloring). I have constants
  • province_desert
  • province_forest
  • province_island
  • province_none
  • province_snow
  • province_temperate
and every variable that holds a province, is not allowed to hold anything else than one of these constants. There's almost always a "none" value. Also, there's many scripts to convert one data type to another, or to make smiple computations.
  • province_before(province), province_after(province), province_is_earlier(province1, province2)
  • province_name(province), province_named(name)
  • province_tooltip_colour(province)
  • province_spillage_fine_factor(province)
  • province_occasion_first(province), province_occasion_last(province)
Constants, constants, constants. (Well, macros.)
At the time of writing, Turmoil has 409 constants, many of which are merely indices, or "type values" such as the provinces above. But many constants are there to avoid magic numbers, e.g.

Also, I use many instances as variable containers. For example, Turmoil's 14 characters each have a walking sprite, an array of talking sprites, a portrait, a label, a colour. At game start, I create 14 persistent invisible instances of the "guy" object (because "character" already has another meaning in code) and put their ids in global variables (e.g. global.guy_anthony). I made 14 constants whose values are the global variables. I can then use _g_anthony.talk[0], where _g_anthony will be syntax-coloured and is in autocomplete whenever I type _g.

Dummy sprites for all objects
All objects get a 16x16 dummy sprite for easy recognition in the resource tree, and persistent objects usually get a spearate sprite. Next to persistent objects, I also usually have a separate category of omnipresent objects, meaning instances of those are created at game start and never destroyed or created anywhere else during play. Except things like "settings", these are usually merely "data holders". I prefer instances and constants to data structures for structuring my data, because of syntax coloring and autocomplete.

Not sure this is the kind of organisation you mean, but all of this helps me a lot. It gets me beyond 20,000 lines of code and I can still find things. I do notice though that development is slower than in the beginning, but that can also just be because many small things do need to be fixed and this is simply more work than adding new stuff.
  • 2

#4904638 Making Comics for College Students

Posted by Erik Leppen on 10 November 2015 - 03:40 PM

I have no experience selling comics (or whatever) but I would say, get the money out of your head. Do what you like. Start as a hobbyist. Just make the comics. Show them to friends. See how they react. If they like it, thank them. Basic social stuff.

Act on what happens. Life is an organic process. Creating things and bringing it to an audience is also an organic process. It has to grow.

So, to answer the question what you should do with your door. Pick a nice comic and stick it on your door. Passers-by might notice it, stop and read it, laugh if it's funny, and remember if it's memorable. If you put a smile on someone's face, that's a huge reward. It will motivate you to continue.

Then, everytime you create a new comic, put it on your door, and take the old one off. This will create scarcity - if someone doesn't visit your door, he'll miss your comic, and it won't come back. Too bad. If you put some sort of a sequence in your comics, where things are clearer if you follow them in the right order, this creates the desire to not miss comics.

Also, number your comics. Someone seeing a comic is one thing, someone seeing a comic with #23 on it, can figure out there will be a #24, #25, etc. in the future.

After a while, more and more people may find out that your door is a place where new funny/interesting comics pop up every now-and-then (IF your comics are good). If they are liked, people will, some day, tell their friends that there is a certain door where funny comics pop up. IF your comics are a good idea whose time has come, the buzz will build up gradually over time.

ONLY then could you eventually consider selling your comics as a collection. Put all comics that have hung on your door from day one, into a little good-looking booklet and have someone create a nice cover design. People will remember the old comics (and different people will know different ones), and be glad they're now back as a collectible.

And if not, then at least you enjoyed drawing stuff and sticking it on your door.
  • 1

#4902695 Dumb Questions

Posted by Erik Leppen on 06 November 2015 - 09:59 AM

- I was once asked how the game was designed to keep the player in the center of the screen.

Why is this a 'cute' question? GameMaker has a mechanism for it, yes, but if you're not aware of it and think you're on your own to program it, it may appear challenging. Same for painting stuff black if you're unfamiliar with drawing using a scripting language.

No, no. The guy didn't assume that the camera needed moving with the player. The guy assumed the player was static and asked how to program the entire world to move around the player to make it seem like the player was moving. He wanted to move the entire game world rather than just the player and camera.

Game programming is primarily about problem solving, if you can't figure out that moving the smaller parts is going to be a much simpler task than moving the entire game then you're in for a rocky road indeed.

But the player is static on the screen, and the world does move around it, and it does appear that the player is moving in a world. So he was totally right, and it makes complete sense to ask how to make such a thing.

That GameMaker has a shortcut for that, called "views", is part of the answer, not part of the question :)
  • 1

#4898024 I got bored and drew a picture

Posted by Erik Leppen on 27 October 2015 - 02:48 PM

I think it's worth taking it with a grain of salt when people say "my game has 20,000 lines of code". Could very well be code like this :P
  • 1

#4884804 Bad Suggestion Box

Posted by Erik Leppen on 02 October 2015 - 09:20 PM

The first beginner's tutorial should tell users to put
in the Step event so people will forever remember who made this software.
  • 2

#4884053 Religion. (caught in a tangled mess 2.0)

Posted by Erik Leppen on 01 October 2015 - 09:31 AM

The likelihood of a god existing cannot be measured.

The rest of your post is beliefs, assumptions and unsupported claims.
  • 1

#4883061 Good Advice for starting on indie games?

Posted by Erik Leppen on 29 September 2015 - 09:54 AM

Here's another one: Get GMS.
You simply won't make any kind of real profit with games made in GM8 now. They crash on Windows 8 and 10 when more than one sound is played at a time. And if you are taking the casual route, the spotlight has moved from Windows to iOS/Android a long time ago.

While getting GMS is a good deal just for the workflow alone (and because GM8 is deprecated anyway), the rest of your advice is only of value for people who have any financial ambitions.

If you want to do this purely as a hobby, then the only thing that matters is whether you enjoy what you're doing. Just get GMS and toy around with it and do what you like. I do advice to start small indeed, because that way you're more likely to finish, and having a finished game out there is very fulfilling.
  • 1