Hallow[Online]

Development Blog!

Archive for the ‘Programming Development’ Category

SourceForge Application Submitted!

leave a comment »

I took some time today to apply for a SourceForge project page, so that I may put my currently (nowhere near completed) source codes up for download. As soon as it’s approved, if they approve it, I’ll start sharing my sauces with the world! The first releases will all be tagged with “[Dev]” in the file names, so that you’ll know they’re development releases…. IE: Releases made during development before the beta release of version 1.0.0! I’m warning the world right now! THIS IS NOT GOING TO BE AN ENGINE! IT’S A GAME! So don’t complain to me. You’re welcome to remake the game in your own image, but I’m not redesigning it to suit your development needs.

What is under the hood and why!
irrLicht.NET (No longer supported or being developed)

irrLicht.NET is no longer supported or being developed, but I like it. It’s simple and does everything that I need it to do. I was able to make a managed scene system that is based around the irrLicht.NET wrapper.

irrKlang (Not open source…)

irrKlang is not open source but like irrLicht.NET it’s simple and it works. If you want to make a commercial product out of Hallow[Online], then you’ll either have to buy the license for irrKlang or redo the sound system to work with something like OpenAL… which I didn’t feel like being bothered by. I’ve managed to make sure that you can easily redo the sound system.

MySQL Connector (for connecting to MySQL)

I preferred MySQL over MsSQL. I wanted to use PostgreSQL, but I still don’t know how to use it too well. SQLite wasn’t in the cards because it’s not good for the website side of the deal.

Hallow[JS] (Written in JScript….)

I admit it… this IS a bad move on my part but it’s the only way I feel safe with parsing JSON. I’ve looked at some of the C#.NET libraries and they just don’t do what I want. I considered XML too. I prefer JSON over XML because it’s not as bloated.

Some of the other things I’ve probably done wrong deal with the packets themselves. I anticipate having to fix the loop where all the ASCII characters that are decoded and strung together. I’ve noticed some things in that area that I can’t test properly at this point in time. I’ll be able to bench it when I have more done.

The entire logic behind my organization…. I’ve posted about this before. I very much fancy Flash AS2. I love the entire scene management and I want this to somewhat resemble it without being FLASH! The GUI has been split up and setup with functions that make it possible to manage the GUI and everything else that is rendered with it, in different classes that are separate from the GUI class. Making it easier to read and manage.

When programming this, I’ve always kept in mind about what’s efficient and how. Not using something native to C#, like DirectX, is potentially damaging, but at the same time, using irrLicht.NET is not very damaging. It renders fast enough to be usable. My standards have been to answer all 3 of the following questions as “Yes”:

  • Easy to use?
  • Easy to read?
  • Preformance loss is not noticable? 

Written by FuRom

October 8, 2008 at 2:39 am

Hallow[Online] Restructured…

leave a comment »

After careful consideration, I’ve completely restructured everything that I’ve had working. It’s all in an attempt to be more organized…. Yes… I rewrote it all in the process.

It is now:

  • Cleaner/Well organized
  • Easier to read
  • Easier to comprehend 
I still need some pimping art help, as requested back in my post “In need of GUI, Character, and Font Artists.

Written by FuRom

October 7, 2008 at 8:03 pm

The reason I made the C# JSON.NET wrapper!

leave a comment »

The reason I created the JSON.NET wrapper for Hallow[Online] is because I knew it would be simple and I needed managable packets. I wanted more than just one command being sent at a time to be possible as well. Curently I have the packets being parsed through REGEX like HTTP headers almost, not to mention how I was using String.Split() to tear all the data apart in the packets on the server side. 1 packet would be 1 command + pure string data. Now that I’m parsing JSON, it’s a usable object of commands that I can loop through and read the data of. Here’s a textagram of how it worked.

1 Packet (old way)
COMMAND, DATA
The data would look like: “value1|value2|value3″

1 Packet (new way)
COMMAND, DATA
COMMAND, DATA
COMMAND, DATA
COMMAND, DATA
The data now looks like: ‘Data_Name’ : ‘Value’, ‘Data_Name’ : ‘Value’

Written by FuRom

October 3, 2008 at 11:05 pm

Posted in Programming Development

Tagged with , ,

JSON.NET [Updated]

leave a comment »

I’ve decided to start work on a JSON reader/writer wrapper so that I can pimp out the packets that I sent to/from the server. It’ll be simpe to use and I’ll release it here when it’s complete.

UPDATE
The JSON wrapper has been MADE! It’s simple as hell. Written in JScript, it’s a .NET wrapper that is accessible by any and all .NET applications. It’s a good idea to use Microsoft.JScript to manage the JSON objects. The download is licensed under an MIT license. The README.TXT file explains how it works in C#.

Download: Rapidshare (5kb) Hallow[JS].ZIP

Written by FuRom

October 3, 2008 at 7:24 pm

Posted in Programming Development

Tagged with , ,

Eye Gouging Sounds…

leave a comment »

Today I realized that I needed SOUNDS! I couldn’t make DirectSound work the way I wanted. Not to mention the size of the DirectX SDK (which was greately unappreciated). In the end, I settled for a non-open source sound wrapper. irrKlang is what I settled for. It’s easy to use and free for non-commercial use. It’s pretty sad though. Not all of Hallow[Online] will be open source anymore but I’m able to back up irrKlang. They don’t care if you don’t buy their license until AFTER you’ve made money off your product. Not to mention that the licensing is pretty cheap.

I considered XNA for the development but I’m not fond of making users download the XNA framework on top of the .NET 3.0 framework that I’m forcing upon them. Also other options flickered across my computer screen, I just didn’t like them. irrKlang won, the end.

Also, I’d like to mention, Hallow [Online] WILL come with the irrKlang dependencies, so that people can compile the source from the fresh download.

Written by FuRom

September 30, 2008 at 11:56 pm

MySQL Connector/NET is EVIL!

leave a comment »

Well, I finally got around to figuring out how to sterilize the SQL queries. Originally, I was under the assumption that MySqlCommand.Parameters.AddWithValue() would do it without me having to edit too much in my SELECT statement but thanks to the POOR documentation on sterilizing the query, it took me HOURS to figure it out. Now that I’ve figured it out, I’ll help out EVERYONE that has ran across the SAME problem by just SHOWING and example below.

MySqlCommand mysqlCmd = new MySqlCommand("SELECT * FROM accounts WHERE (username = ?username) and (password = ?password)", MySqlConnection);
mysqlCmd.Parameters.AddWithValue("?username", "MY USERNAME");
mysqlCmd.Parameters.AddWithValue("?password", "MY SECRET PASSWORD");
mysqlCmd.Prepare();
MySqlDataReader mysqlReader = mysqlCmd.ExecuteReader();
while (mysqlReader.Read())
{
// Reader stuff here...
}

Written by FuRom

September 26, 2008 at 9:09 pm

The SceneSwitch() Riddle!

leave a comment »

Today I started development with 2 overall goals.

  • Make User Login Possible
  1. Add Login GUI form elements
  2. Add easy access controls for GUI form elements
  3. Upon login, switch from LOGIN -> GAME_MAP (they’re GUI scene titles).
  4. Add MySQL check on serverside.
  • Detach connection from client and reserve it for after the login is established.
After I had ALL of that accomplished, I had to test everything thouroughly, like always. I had GUI test elements in GAME_MAP scene. It was the chat box. You press the return/enter key to access it (gain focus to it). The problem was that, after login, pressing enter would crash the game. I assumed the issue had to be with the new elements I added. I tried to retest the way I had it before it messed up. I just removed the elements and left a button to switch scenes from LOGIN -> GAME_MAP.
It worked PERFECTLY like it originally did. So what was the problem? After hours of messing with line after line of codes I finally figured it out. Irrlicht.NET has a problem with IGUIElement focus! If you have an element in focus and just send it into oblivion without removing it’s focus, you can’t just use device.IGUIElement.SetFocus() again for some reason. I redid my SceneSwitcher() function to make sure all the elements that I have in the GUITable (hash table) is removed from focus if it is focused on.
This one single problem prevented me from ever getting to reserving the connection for logged in users only. That’ll only take 5 mins to implement though.

Written by FuRom

September 25, 2008 at 10:46 pm

Scene Changer & Event Handler

leave a comment »

Today I had 2 goals with Hallow [Online]! 

  • Create an easy to manage Scene Switcher that can switch between the following Scenes: Login / Character Selection / Character Creation / Game Play – Explore / Game Play – Turn Based Battle.
  • Create an event handler that switched in sync with the current scene.
Both of these goals WERE accomplished. They were also simple to acheive. I ended up making switches run inside of the irrlicht rendering device and the primary event handler. All the objects that are rendered are accessible in a hash table. I had trouble deleting all the elements because I had IGUIElements in the hash table as well as IGUIFonts in it. I just used a comparison of the data types to IGUIElement to filter out the excess crap. IGUIFonts and such was removed by clearing the device scene manager. Now that is accomplished, I can take an actionscript 2.0-like approach to making this game.

Written by FuRom

September 24, 2008 at 11:43 pm

Follow

Get every new post delivered to your Inbox.