Introduction to Modding

From Open Surge Wiki
Revision as of 02:07, 4 August 2020 by Alexandre (Talk | contribs) (Hacking other game contents)

Jump to: navigation, search

Introduction

If you're an absolute beginner and want to start hacking Open Surge, this place is for you.

Open Surge is an open source game developed to allow user created content as much as possible. The modding scene has been around since the early 90's when people hacked games, found out how the content was generated and substituted its content with their own.

In Open Surge, it is fairly easy to modify any game content you wish. It ranges in difficulty from replacing sprite files and adding images to actually modifying the source code to add functionality to the engine. A popular way of adding new functionalities to Open Surge is via scripting.

Open Surge is highly modifiable. Early modifications (a.k.a. MODs) made by our users ranged from simple sidescrollers to platformers with ninjas and RPG elements. Although the engine is focused on platformers, other types of games, such as racing games or even space shooters, can also be made. You just need to imagine something, study the engine and work to make your idea become a reality.

This wiki contains documentation on how to modify Open Surge. Besides the documentation, it's useful to study the modifications other users make, so you can learn from them. The place they can be found is in our community.

Study guide

There are many ways of hacking Open Surge. We'll subdivide the hacking mechanism into a series of steps: from the most basic to the most advanced ones.

Step #1: the level editor

This is your starting point: learning how to use the level editor is the most basic skill to be used in Open Surge.

We recommend reading: How to make a level

Step #2: hacking the built-in game content

Hacking the sprites

Once you learn how to edit existing levels and how to make new simple ones, you can take one step further and learn how to modify the built-in sprites. In order to simplify the speech, we define sprites as the graphics of the objects of the game: characters, items, etc.

We recommend reading: Sprites

Hacking other game contents

Not only sprites are modifiable. Other game contents such as sounds, texts and characters can also be hacked.

We recommend reading: Quests, Characters, Translations & texts, Fonts. Additional readings: Sound effects, Musics, User Input.

Step #3: advanced level making

Creating new scenery

You already know how to use the level editor and how to modify the built-in game content, but what if you want to create whole new worlds? This demands a bit more of studying than the previous two steps.

We recommend reading: Bricksets, Backgrounds. Additional readings: Groups, Level specification

Creating levels like a pro

Creating levels that are fun and engaging is a mixture of art and science. There are sound principles behind the level design process that are highly beneficial to your game. Getting to know these principles will take your levels to the next level ;)

We recommend reading: Level Design Document

Configuring level entities

Many level entities (items, baddies, bridges, bosses, and so on) are configurable: each on its own terms. Get a longer bridge, make a tougher boss, invent your own combination of things. The possibilities are endless!

We recommend reading: Setup scripts

Step #4: scripting

As you're hacking and creating new content, you're getting to know the engine. However, the best is yet to come: you are about to discover that Open Surge is truly unlimited.

Ancient prophets have told about a pearl of great price that would give great power to those who discovered it. Contemporary scientists have been enquiring: were they talking about scripting? That's a reasonable theory. Research shows that scripting gets you into a state where your creative juices explode with so much possibility!

The sky is the limit with scripting. Let your imagination flow freely and create completely new elements, including but not limited to: enemies, items, bosses, special abilities, weather effects, cutscenes, custom user interfaces, non-playable-characters, and much more! Scripting demands more study, but it really pays off.

We recommend: Learn SurgeScript, Video tutorials

Step #5: beyond scripting

Beyond scripting, the only way to change the way the game acts is to modify its source code directly. This is fairly difficult and requires knowledge of programming, so it isn't recommended for the faint of heart. Be aware that this approach implies on licensing (GPL) and multi-platforming issues. Not only that, but by modifying the source code you may break compatibility with the official version of the Open Surge Engine. Still, if you want to try it, you can find the sources in the src/ folder in your game directory. After you modify the source code, you will have to recompile the game to make your changes take effect.

Regular users need not worry about the source code, as the mechanisms we talked about in the previous steps give enough power to make a wide range of games with ease. Open Surge is an open source game & engine written in C language. Programming experts may want to hack the source code directly to see how it works and to add new features to it. Those who want to port Open Surge to diverse hardware systems must also deal with the source code.

Additional reading: Compiling the Source Code