Archive for the ‘Programming Development’ Category
SourceForge Application Submitted!
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?
Hallow[Online] Restructured…
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
The reason I made the C# JSON.NET wrapper!
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’
JSON.NET [Updated]
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
Eye Gouging Sounds…
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.
MySQL Connector/NET is EVIL!
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...
}
The SceneSwitch() Riddle!
Today I started development with 2 overall goals.
- Make User Login Possible
- Add Login GUI form elements
- Add easy access controls for GUI form elements
- Upon login, switch from LOGIN -> GAME_MAP (they’re GUI scene titles).
- Add MySQL check on serverside.
- Detach connection from client and reserve it for after the login is established.
Scene Changer & Event Handler
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.