May 31, 2007

Creating a GUI Module

Posted in Game Content, Media, Progress, Thoughts and Ideas at 5:34 am by mothmanbr

First of all, I’m not sure if this has been done already by someone in the BlitzMAX community, since I didn’t search for one. It’s very likely that it exists, but even so, I decided to create my own GUI module that will work inside the game itself, not as a separate window like I did in beta 0.4b. What will I use this for? Showing the user profiles; creating, editing, deleting profiles; main menu buttons; options menu; some in-game menus; and on and on… Well, I won’t make a complete module for this, I will only add what I will need in this game. In the future, if I need something else, I’ll just add. This will be a very personal module, without any documentation or explanation of the features, only designed for my own personal use.

I started working on it tonight, and things have been good so far. Until now, I only created three types: the basic entity, the window and the menu types. I won’t even explain the “features” since this screenshot shows it all:

The windows are drag-able. The window focus is not manual, it is controlled by the program. So, you won’t be able to select a window by clicking the title bar; if I want you to see a window, you’ll see that window πŸ˜› At first this sounds as a limitation, but there are no cases in the game where this will be needed. For example, when you click the “New Profile” button, this happens:

I don’t want people to be able to drag the “Create New Profile” window away and mess with the main profile window. Of course I could just disable manual focus in this case, but like I said, there are zero situations in the game that will need a manual focus.

As for how things work, I was thinking about making the button emit a event when it is pressed, same for the window when it is dragged, but I realized that I would still need to make the event be emitted manually(unless there is a reason to do that automatically that I don’t know of), so having some code to detect where the mouse is and what it pressed so then the event can be emitted and another part of code to check if an event was emitted, who emitted it, and then execute the action would just make things larger. So this will be like that unless I find a better use to the events.

I have also worked on the game a bit, as you can see up there. In addition to this neat window, I also made several changes to the game itself, added new buildings and weapons, and kinda made things more challenging πŸ™‚

Until next time.


May 26, 2007

Progress and screenshots

Posted in Game Content, Media, Progress at 4:31 am by mothmanbr

Below you’ll find two screenshots, the first is the game running for 10 hours πŸ˜› The second is the newest version of the game, also running for a while. Unfortunately, my computer broke and I wasn’t able to work on the game or post in those last few days, but it’s fixed now and I’m back to work.

Oh well. Soon I may have a new video for you guys, showing how the game is this time. Right now I’m just coding some useless things to make the game look better, like rearranging the building menu, making the main menu and options menu, etc. After that is done, I’ll rewrite a code to make the enemies spawn in waves, just like it was before. But this time, between waves you’ll be able to research or buy upgrades πŸ˜‰ I’m stopping here today, even though it’s early. I’ll get some rest now because my whole body is aching.

May 21, 2007

Another Screenshot

Posted in Uncategorized at 8:18 am by mothmanbr

I’m back baby!


As always, just click to enlarge. It’s 5 am so I’m heading to bed. Tomorrow I’ll explain all the new things you see above πŸ˜›

May 20, 2007

New Screenshot

Posted in Uncategorized at 7:31 am by mothmanbr

I have worked on the game tonight more than this whole week. I hope this means I’m getting back to work just like before. What’s new? A larger play area, a construction menu, the AI towers, and the building placement thingy. Here in the screenshot, you can see two towers shooting at a moving enemy while I place the third tower(the red means I can’t place it there because it overlaps the main base).

Click to enlarge

Β Like it? πŸ˜›

May 16, 2007

Codename: Calculi

Posted in Off-topic, Progress, Thoughts and Ideas at 4:08 am by mothmanbr

Well, as you may have noticed, I don’t update this in ages. There is a reason for that: friday night, feeling a terrible, terrible pain on my stomach, I was rushed to the hospital where I was diagnosed with a kidney stone. I stayed there for 3 days, taking a lot of pain medication and dying of boredom, and in the couple of hours I wasn’t sleeping, I was thinking about the game. In the few minutes my thoughts weren’t “Damn I wish I could be making the game right now”, I thought about the gameplay and realized that it could be better. So I changed it. Almost completely. I think the game is way, way better now. I also affectionately codenamed it Calculi.

I got back from the hospital changed: with a very clear view of the finished game, knowing exactly what has to change and be added and knowing how it feels like to give birth to several babies. So, no new screenshots or demos or anything for a bit. I still am not able to work in the game like before since I still feel unwell(probably from the painkiller overdose), but I am working on it. I will try to post some screenshots or videos tomorrow.

I have also decided that the game will have a last public beta, which will be just like a full game. I won’t tell you what will have on it, and this time I’m not saying it because I don’t know what it’ll have πŸ˜›

In some unrelated subject, I bought a book to read in the hospital called Sharpe’s Tiger, and I have to say it is really good. I have read more pages today in the bathroom than I did in those 3 days in the hospital(no, I didn’t spend hours in the bathroom, I just didn’t read in the hospital. Damn painkillers), but I am loving it. The author’s style is very simple and if you wrote like him you would make your literature teacher frown on you, but the author gets it just right. The book is by Bernard Cornwell by the way, and there are like thousands of books in the Sharpe series(gladly).

Anyway, I will go back to the game now. And before I forget, my deepest thanks to the Blitz Basic community that is always willing to answer my questions. You all have been a great help so far πŸ™‚

May 11, 2007

Working on the AI

Posted in Uncategorized at 6:59 am by mothmanbr

So, I have now started to work on the enemy AI for the game. And well, unfortunately I have almost no experience in AI. Most of my experience are the times I programmed a robot in a program called AI Wars or something like that. You had a small bug and you coded his AI, and put him to fight against other bugs. I really enjoyed it, and I thought I also would enjoy making the AI for the game. But so far it has been only annoying me(less than the editors thankfully πŸ˜› ).

Anyway, I tried to make it so the enemy turned around if he saw an object in front of him, then fix his position to reach the player again. But that didn’t really work as expected, so I thought about pathfinding, but before I implemented it, someone at the blitz community pointed me to something called Steering Behaviours, which will work perfectly for my game. Someone already made a module for BlitzMAX that contains that, but instead of using his module I will make my own with only the things I need. I think this is better than reading his code over and over again to find what I need, since this way I will know the methods and functions because I created and named them.

I wanted to make a video of the working AI, but I think this will take longer than I thought it would. In any case, I will keep you updated πŸ™‚

May 7, 2007

Lunar Defender 0.5b Released!

Posted in Game Content, Media, Progress, Releases at 7:20 am by mothmanbr

As promised, here is the newest version of the game πŸ˜€

The biggest change is that the game is now in stages, not the “survival” gameplay style that the last one was. Like I said, I wanted to change more in the graphics part, but unfortunately I wasn’t able to. The main campaign is very difficult even for me, and the extra campaign is almost impossible. So, if the gameplay doesn’t anger you, at least it’ll keep you stuck for some hours until you find a way to beat the stages. The main campaign has a “story”, told before a mission begins in the briefing screen. I didn’t put much thought to it, and it is not connected at all to the story of the final version of the game. It’s just there as a filler. The extra campaign is just a series of hard stages where you have to be careful about spending your ammo, or destroy the enemies fast. I recommend only trying the extra campaign after you beat the main one, or after you grow tired of it. Oh and now we have a background music, made by a friend.
Enjoy πŸ™‚ As always, comments and criticism are appreciated. Contact me if you find any bugs or just want to talk. I fixed all the bugs I could find, but I’m sure there are a lot more just waiting to be discovered.

Click for full size

Download: SendSpace [3069 KB]

1 – select pistol;
2 – select smg;
3 – select shotgun;
4 – select quad;
ENTER – selects menu option or starts game;
ESC – quits the game or returns to main menu;
Mouse – aims and shoots;
P – pause the game.

1. Unrar all files to the same folder;
2. Run lunardefender.exe;
3. To uninstall, delete the game folder.

New Features:
– Game now divided in scripted stages;
– Two campaigns with 5 levels each;
– Each level is able to load its own enemy database and tileset;
– Menus added(main menu, options menu, new game menu, etc…);
– Scoring system added;
– Briefing and mission completed screens added;
– Death and weapon change sounds added;
– Background music added;
– Health bar now under the player base;
– Weapons highlight to show which ones are available or selected;
– Pixel-perfect collision added;
– Enemies now stand and attack the player instead of disappearing and causing damage.

Bug fixes:
– Game auto-selects the a graphics driver your system supports.

Code Optimizations:
– Code completely restructured and commented, making it more organized and clear;
– Several fixes to improve performance.

May 6, 2007

Good And Bad News

Posted in Game Content, Media, Off-topic, Progress at 7:34 pm by mothmanbr

Well, like I said, I have good and bad news. I guess we should start by the bad ones.

My current pixel artist has quit, and while I already am looking for another one and talking to a couple of other candidates, I won’t be able to add the new things I was planning for the next release. So, one of two things: either this next one won’t be the last public beta because I really would like to show those other things before going private, or you will only see the new things in gameplay videos and screenshots.

As for the good ones, I am aiming to release the next beta tonight. I’ll have to leave out a couple of things, not because I’m hurrying to release it, but because I can’t get art for the things I wanted to do in time. So unfortunately the game will look practically the same as before, except that now it is divided in missions.

Here’s a screenshot of the current main menu:

So see you later today πŸ™‚

May 5, 2007

Back to work

Posted in Off-topic at 12:17 am by mothmanbr

So, after some time of (unplanned and unwanted) inactivity, I’m back to work πŸ™‚ That’s a delay I wasn’t counting on, so now I have a lot of catching up to do.

May 2, 2007

I’m on fire! Well, my hand is…

Posted in Off-topic at 2:06 am by mothmanbr

To complete the bullshittyness of this weekend plus holiday, my right hand just got soaked in boiling chocolate milk, for reasons unknown. So now in addition to my coughing and dizziness that was keeping me from programming, I now have my hand hurting, and a lot. I better not even touch the source code while this black aura is surrounding me, who knows what might happen.

I’m setting the release date for the next public beta for next weekend, in the best scenario. In the worst one I have all my source code and online backups replaced with a poem about bunnies written by a 2nd grader named Timmy.