It’s the little things

Of course, since I went on for a few years without coding on the Genesis, there were simple things I forgot that was needed, to make some functions work. Let’s look at this small snippet of code:

;---------------------------------------------------------------
; Joy init
;===============================================================

moveq #$40,d0
move.b d0,io_control1
move.b d0,io_control2
move.b d0,io_control3

;---------------------------------------------------------------
; Misc
;===============================================================

move.w #$2300,sr ; Enable interrupt usage

Looking at the code above, let’s start from the bottom, loading 0×2300 into the status register. This is used to enable or disable interrupts, as detection of V-Sync was only needed at this time. Otherwise, 0×2700 would had been used instead, to disable them. I won’t go into details, as there are already many related sites that describe the status register.

Now, let’s go to the top, where the joypads gets initialized. This is needed, otherwise, joypad reading will not work correctly, or from what I understand, won’t work at all.

So, I indeed forgot those two things, which caused me to refer to my older code to figure out why functions are not working.

Custom object engine

Copied and cleaned up from my old code, the object system is now working, in the continuation with my development on the Sega Genesis/MegaDrive. This is something I created back over a few years when I was developing on the Genesis. By default, there can be a maximum of 64 objects, with 32 bytes of memory assigned to each object, with the first 4 bytes (which makes a 32-bit “Long-Word”) reserved for the address pointer, which will then execute code for that object. Of course, the maximum amount of objects, and the bytes of memory assigned, can be changed by editing a variable, for each option.

As for using the object system, I treat the first object (known as object 0) with priority, since it’s the first that gets to run code. This is what I use to control main functions of the game, including screens ranging from the title screen, to the main game. For the rest of the object slots, they are of course used for players, enemies, background elements and other little things.

The sprite system was also tied with the old object engine, in which I plan on not changing for this version. This has not been implemented yet for the current code, but is next on the to-do list. The sprite system will come with two functions. The main function, which controls the raw data for the sprites, and can be controlled by the objects. I use a buffer which then can later be used, to update the sprite table during the V-Blank period. Then there’s the object pattern system, which gets called to pull up a set of sprites from within an index table, which then creates a full image from multiple sprites. I’m sure there’s a better name for this, but that’s all I can come up with.

ss9519

Memory view of the object system on the Genesis

Note to self: Add comments to code… Often!

So, I’ve been focusing mainly on developing on the Sega Genesis/MegaDrive now. One issue when looking at some of my older code, is the lack of comments. A bad habit I got when I was young, thanks to memory constraints (8-bit computers). Also, when I was young, I saw no need in reminding myself what the code does, of course, never thinking I would leave it alone for years, and come back looking at it, thinking, “WTF is this all about?!”

This still applied before I left Windows, and did not get into the habit of adding code, to the simplest thing. Of course, now looking at code from a few years ago, I wonder to myself, “WTF is this all about?!” Well, I did try to convert some of the old code, to use with the current assembler, but somehow, I failed. So I’ll have to code the object, graphic and sound engine from scratch, and relearn alot of the video chip’s functions again, along with other system functions. However, I do code things much better after I restart from scratch, due to knowing what I need to code.

So the message of the day is: Add comments to your code, and do this very, very often. You WILL forget what that code does.

Anyway, I’ll leave you with my latest version, of a ‘Hello World!’… Er, ‘Hello Pac-Man!” test screen, for the Sega Genesis/MegaDrive.

segadev-120520

My version of a “Hello World” test screen

MF-Arena release on hold

For a while now, I had little to no motivation when it came to working on MF-Arena. The fact that not only is the Quake scene dead (IMO), but for the active players, they consist of 4 groups. The ‘Newbies’, the ‘Instant-Gib’ players, the ‘Clan Arena’ players, and the ‘Defraggers’.

The ‘Newbies’ are the players who start off playing, and the typical gametype of choice is Free For All (AKA Death Match). We all started here. Most will only come to one server, some will get bored and leave the game completely for another, and very few will wonder off to other servers or game types. For the players who wonder, they will most likely end up playing ‘Instant-Gib’ Capture the Flag.

The ‘Instant-Gib’ players are the ones that like the idea of using only one weapon (which is the Rail Gun), in which frags a player with one hit. The game type of choice is normally Capture The Flag. At this point, alot of the players got somewhat of an idea of strafe jumping, a technique that increases the traveling speed of the player, then what was meant to be allow. Also, since everyone has only one weapon, there is only one situational aspect that is only experienced. Therefor, you only need to know, you’ll have to aim, and shoot, nothing else to it. Many considered this game type to be nothing more than a ‘point and click’ game which requires no skill, a statement I can agree on. Some will get bored with this game type, and move on to other game types, while others will get sick of the players who tend to act like brats, and leave the game completely. I simply got bored of this game type long ago, and went on to play the normal Capture The Flag game type.

The ‘Clan Arena’ players tend to either come from different game types, or from clans (which is where the name Clan Arena came from). The game starts each player with all weapons, limited ammo, and max health with some armor. There are two teams, requiring each player to eliminate a player from the other team. When one team is eliminated, they’ll score a point, start over and repeat the process. This is done over and over until one team reaches the score limit. The main flaw, is that all players start with everything, and always have a solution to every situation. So it comes down to who spawns in the right spot, and able to get the first shot in. Another issue, is that when you are eliminated from the round, you’ll sit in spectate mode until the round is over, which can get boring real quickly. This is especially the case, when there are two players left, and they’ll hunt each other down, which can take up to 2 minutes, at least. I found this very boring, and a few others felt the same way, which is why some tend to stop playing.

The ‘Defraggers’ are players who focus only on maneuvering, which completely ignore fragging the other player. This requires the use of strafe jumping, and knowledge of flaws in the IDTech engine. The mod ‘Defrag’ is used, which removes the ability to frag the other player, and focuses on racing from one end of the map, to the other end. There are maps that were designed exclusively for this mod, and takes advantage of the mod. However, the mod itself is no longer developed, not to mention the main site is no longer up. Though, there is still a community for this mod, and they tend to only play this mod, and not in anyway interested in playing anything else. Since I use a crappy computer, I can’t get far in many of these Defrag maps, as I tend to get sick repeating the same section over and over after failing. So in the end, I lost interest in ‘Defrag’, which was a while ago.

Since I don’t fit into any of these groups, I find that there are rarely any other players to play against. This can get boring, and I simply find this a waste of my time. As for development, if I’m going to develop on something with not many players, I want to develop on something that I’m more familiar with, and easier. So this leaves MF-Arena out of the question. When I get into the mood again, I’ll continue development of MF-Arena. But for now, progress for MF-Arena will be limited.

Also, I noticed that there are some sites now linking to this blog, for the MegaFrag download. MegaFrag became MF-Arena, and will not work in OpenArena. So there is no longer any need for you guys to list MegaFrag as an OpenArena mod, and to link here. MegaFrag is dead, and MF-Arena is slowly being developed, if even at all. Bottom line, thanks guys, but you missed the party, sorry.

Rant about map names

Unlike Quake 3, I always found map names in games like OpenArena and such, to be confusing for some. By map names, I mean the file names, as opposed to the full name of the map, in which is not used when call voting the map. Some maps in OpenArena have a ‘CTF’ prefix attached to them in some way, while others don’t. So, if you’re new to the game, and on a server, you have no idea what map is the correct map for a certain game type. Not to mention, some maps can crash a server if the wrong game type is set.

Remembering a map name can either be easy or hard (if not impossible). A map named ‘MFDM18′ or ‘SPEEDYCTF’ will always be easy to remember. Let’s see the first example; ‘MFDM18′. Now the ‘MF’ is the first two letters of MFArena, the ‘DM’ stands for Death Match which is the game type the map is meant for, and 18 is the 18th map for that game mode. That was simple, and easy to remember. Let’s see the second example; ‘SPEEDYCTF’. We got ‘SPEEDY’ which either implies the name of the author, or just the type of game play to be expected, while ‘CTF’ indicates the game type to be used. Again, simple and easy to remember.

Now let’s see some bad examples. Here we have ‘CE1M7′, I assume the letters ‘C’ and ‘E’ are the initials of the author’s name, but what’s the deal with the lone number ’1′, and the ‘M7′? I can see the ‘M7′ being map number 7, but then, where are the other 6? Also, what game type is this for? Of course, call voting it on a CTF server, will have you trying to figure out where the flags are. Which in this case, ‘CE1M7′ happens to be a death match game type map. How about ‘AM_GALMEVISH2′? Well, that’s a big random name to remember…

Of course, when I started making maps for OpenArena, guess where I got my bad inspiration from. My first released map, didn’t have as much as a horrible file name as shown above, but still… Being named ‘MMP-PFORM-CTF1′ might be hard to remember, especially if there’s heavy use of dashes or underscores. Speaking of underscores, what’s the deal with the overuse of underscores in OpenArena? ‘OA_CTF4ISH’ really doesn’t need such, and can be trimmed down to ‘OACTF4′. Remove the pointless underscore, and we do get the point that this is a clone of ‘Q3CTF4′, so there’s really no need for the ‘ISH’ prefix, which quite a few OpenArena maps use for some reason.

So, if you wanted to know why MFArena uses the ‘MF[GameType][MapNumber]‘ naming format, now you know.

MegaFrag’s new name and removal of CPMA

I didn’t get many (good) ideas for the new name for MegaFrag, so I came up with “MF-Arena”. Really, just a temporary name, but I have no idea if I’ll ever come up with a good name.

Also, due to the lack of interest from players, and the fact that I’ll never really come close to emulating correctly, CPM physics is now officially removed from MFArena. Only a few players were even interested in CPM physics. Currently now, MPM physics replaces this mode.

The rule set modes were also rearranged, including accommodations of all the changes made. “MegaFrag” standards is now “MFArena” standards, “Metro-MP” standards is now “ProMode” standards (not related to CPMA), and “AfterShock” standards takes the slot of the removed “CMPA” standards.

MegaFrag name change and other things

MegaFrag has come a long way now, and is just about ready for a standalone alpha release. And, for a while now, I used MegaFrag as the codename for this game, which at first, was only a name for the server I ran for OpenArena, then later developed into a mod. However, at some point I will need to choose a proper name for MegaFrag. This was planned from the beginning, as the name is pretty common, and doing a search for MegaFrag, will bring up alot of different results. When I decide a name, I will announce that name here.

I’m sure many of you don’t know, but I do play other genres of games besides First Person Shooters. I’ve also made games years ago, but they never saw the light of day, even though they were close to completion. The alternative name I use for myself (m68k) should give a hint on what I’ve developed on as well, namely the Sega Genesis/MegaDrive. Years ago, when I still used Windows, I was heavily developing games for the Sega Genesis/MegaDrive, though, would be playable on an emulator since I no longer own a Genesis. Even years ago from that, I also made games using game engines, on systems ranging from the Commodore 64 to Windows. At some point, I made the switch to Linux, and lost interest in alot of things, including Sega Genesis/MegaDrive development. This was mainly due to everything emulation-wise being made only for Windows, so I had to drop development completely.

So, for the past month, I’ve been getting back into developing on that platform. Currently, I’m using a different assembler, and it is a bit more strict than the one I’ve been using for Windows. This leaves me to fix up the old code, and correct things due to the old assembler being loose on restrictions. I don’t mind this at all, since it’ll teach me to code correctly. After I get the engine working again, I can really start to work on this platform again. So expect to see some project for that old console in the coming months.

WIP build of the game code-named "Served"

Concept image of the game code-named "Served"

WIP build of the game "Dire Warning" in demo mode

MegaFrag standalone work, and instant-gib sucks

I’ve been working on modifying the IOQuake engine to fit the MegaFrag color table for the colored text (or escape colors). However, I just can’t get this to work correctly for some reason. So, colors will be disabled in the console for now, but will still show up in the game’s HUD. Also, the current protocol number is currently 68, but that will change.

The server browser had a long time issue, that was just fixed in MegaFrag. Sorting server by hostname, now works correctly. Really, something OpenArena should had fixed long ago. Now, not only do escape colors get ignored, but any character that’s not a letter in the alphabet gets ignored. This includes spaces, so no more bringing up the server to the top of the list, via spaces in front of the hostname.

Also, another thing I added in the browser, was showing servers running a Mod. By default, it’s off, and can be turned on freely. In the future, it will be locked out, until enough ‘play’ points are earned… Hm, ‘play’ points you ask?

Well, I want to force new-comers (to the Quake series) to play the single player training levels (note levels being plural), before they can play on any online servers. This should reduce the amount of players connecting, joining teams, and become sitting targets, just to figure out how to play the game. This was a method QuakeLive used (for a different reason), but changed for some reason. Of course, if you already know how to play, or just cleaned out your configs, you would be able to change a ‘cvar’, to be able to see the server browser. This is only meant to single out the newbies. Also, as I said earlier, a player would need to play a certain amount of games (for ‘play’ points) before they would be able to see the Mod option. This will give them a chance to understand the game a bit, before they venture on to the world of Mods.

On a final note, instant-gib will be blocked from running as a normal server, unless ‘fs_game’ is set to something. We don’t want ten full servers of instant-gib players, with two players on a normal server feeling lonely. As I mentioned in the past, instant-gib sucks. It’s a talent-less game mode. Period. If you want instant-gib, play OpenArena.

Instant-gib

Instant-gib players

Elimination and rule set changes

Sorry, Long time no post.  :P

I’ve made some changes to the rule sets, including Elimination (Clan Arena).  Quad damage is now 4 times the damage, by default, and is only set to 3 in Quake 3, Quake Live and AfterShock rule sets.  The higher item height is now default, and only is reverted back in the Quake 3, Quake Live and Newbie rule sets.  In Elimination (Clan Arena), start ammo amounts for weapons were changed, as followed:

  • Machine Gun… From 200 to 100
  • ShotGun… From 30 to 50
  • Grenade… From 20 to 25
  • Rocket Launcher… Remains at 50
  • Rail Gun… From 20 to 25
  • Lightning Gun… Remains at 200
  • Plasma Gun… From 150 to 100

Also, the standalone alpha test release of MegaFrag will be delayed until next month. There are still many things I need to correct, and adjust.

CPMA and colors

After a long time, of not attempting… I’ve managed to get the CPMA mod working on my computer. Doing that now allows me to compare things between CPMA and MegaFrag’s CPMA mode. What I found, is that MMP mode is more closer to CPMA than the CMPA mode in MegaFrag. First thing I changed, was the armor tier break point values, to match the break points in CPMA. I also found that the item height is the same as in AfterShock (if not higher). The ramp jumping from AfterShock was also incorrect in MegaFrag, in which doesn’t require a double jump. Not to mention, the ramp jump is also in CPMA. So, I have alot of adjustments to make.

Also, for a while, I’ve been planning on changing the color table (used for the text) in MegaFrag, which currently uses the color table from AfterShock. I’ve decided to change the color table to match the CPMA mod, but with the exception of the lowercase letter character codes (a – z). The table from the uppercase letter character codes (A – Z), will be copied over to the lowercase side, but with half the resolution of the uppercase table, ran twice (a – m, n – z). The first rotation will be a brighter version of the Uppercase colors, and the second will be a darker version. This should allow for some nice shades of color applied to names and text. Note, this has already been added to MegaFrag, so expect this change in the standalone release.

colorCMPA

CPMA color table

colorAS

AfterShock color table

colorMF

MegaFrag color table

Follow

Get every new post delivered to your Inbox.