Previous Blog Next Blog
Prev/Next Blog
by date

Dev-Diary #3 - A single player action-RPG

Dev-Diary #3 - A single player action-RPG
Name:Matt Huston
Date Posted:Oct 28, 2006
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Matt Huston

Blog post
It has been a really long time since my last post. I have been quite busy with different projects and I also moved a few weeks ago as well. I was recently working more on my action-RPG bits and just now was finishing up converting everything over to 1.5. Just want to say congrats to GarageGames on the release, from a presentation standpoint, the engine really comes off with a very polished look with the new artwork and particles in the starter.fps, racing, and demos.

I have been doing a lot of work in TGB over the last couple months but was feeling I wanted to do some personal stuff in TGE again as well so went back to my action-RPG code and decided I wanted to implement SQLite code instead of using XML or my own text-based format. I have really found the power in doing so. I have rewritten my conversation/dialog code from scratch, now implementing a GUI editor. I had seen Gareth Fouche's about a month ago, we both have taken some queues from the Neverwinter Nights Toolset, which is probably the best RPG dialog editor out there, so the best one to duplicate.

So I implemented my own GUI editor and I like the power and ease it has created for me. Another key thing is a application that can view a SQLite database outside Torque. Thanks to the people over at MyDreamRpg.com, they mentioned SQLite Browser for this. It works as much as you'd need it for a game and is free.

So what would a blog be without some screenshots.






Recent Blog Posts
List:04/19/08 - Back to the future
07/06/07 - Resource Dump - GuiAnimatedCrosshairHud, guiObjectSelectionHud
04/30/07 - ModMaker, TGB, TorqueX and More
11/19/06 - Dev-Diary #4 - Action RPG :: Talking Heads
10/31/06 - Persistent Items and Mission Objects
10/28/06 - Dev-Diary #3 - A single player action-RPG
07/31/06 - TGB RPGness Part 1 (Inventory)
07/06/06 - TGB Gaming Goodness

Submit ResourceSubmit your own resources!

Timothy Aste   (Oct 28, 2006 at 17:50 GMT)
Slick stuff Matt, I like the editor

Robin   (Oct 28, 2006 at 20:21 GMT)
the abilitie to specify a sound file to each dialog would make it perfect :)

nice work Matt !

Adam deGrandis   (Oct 28, 2006 at 20:23 GMT)
Pretty awesome Matt

Anton Bursch   (Oct 28, 2006 at 20:57 GMT)
Sweet!!

Rob Parton   (Oct 28, 2006 at 21:19 GMT)
Wow, awesome. I've been working on a few RPGish things and I agree SQLite is really the way to go with it, if only for the ease of use. I didn't know about the Browser though. Awesome!

Christian S   (Oct 28, 2006 at 22:36 GMT)
Nice work, keep up the spirit!

T Squared (Thanhda Tie)   (Oct 28, 2006 at 22:52 GMT)
looks awesome. any chance of wanting to make that a res? :)

Andy Hawkins   (Oct 28, 2006 at 23:00 GMT)
Where can I find out more info on using SQL for storing dialog like you have? I'd like to implement this system myself.

Matt Huston   (Oct 29, 2006 at 08:51 GMT)
@Robin

Yep, I was going to implement this, though I probably won't use it as I don't have any voice actors, but the functionality will be there :)

@Andy

I used John Vanderbeck's SQLite resource and Dreamer's New SQLite Integration Tutorial (All Platforms). In SQLite and making a single player game, there are 4 commands that are important, "CREATE", "INSERT", "SELECT", and "UPDATE". You might want to find a SQL tutorial and read the first chapter or two. Luckily what we need for SQLite in Torque is very basic compared to creating a real database with hundreds of users.

Vanderbeck's SQLite resource does have an example but I created one for you as well. It creates a database (CREATE) called NPCs and it has a unique integer and a text field. I then insert into it some data (1, Matt), 1 being the unique identifier (primary key in DB terms) and the NPCs name. I then run a select (SELECT) query that returns me the NPCs name from the database and I echo it out. Making RPG dialog is not much more than an elaborate version of this.


new SQLiteObject(sqlite);
sqlite.openDatabase("rpg.db");

// Create NPC Table (if it doesn't already exist)
%query = "CREATE TABLE IF NOT EXISTS NPCs ("
@ "Id INT(12) NOT NULL PRIMARY KEY,"
@ "Name VARCHAR(255));";

%result = sqlite.query(%query);

%query = "INSERT INTO NPCs (Id, Name) VALUES ('1','Matt')";
%result = sqlite.query(%query);

%query = "SELECT * FROM NPCs WHERE Id=" @ 1;
%result = sqlite.query(%query);

%name = sqlite.getColumn(%result, "Name");

echo("The NPCs name is" SPC %name"); // Should return "The NPCs name is Matt"

Edited on Oct 30, 2006 09:46 GMT

T Squared (Thanhda Tie)   (Oct 29, 2006 at 17:32 GMT)
@Matt
So, you are pretty much, calling values from a data base, and echo them out to the screen. BTW, what Dreamer update are you talking about?

Gareth Fouche   (Oct 30, 2006 at 06:58 GMT)
Nice going Matt. Always good to see another developer working on an RPG.

Welcome to the SQLite side of the Force btw ;)

It can take a bit of effort to get a nice editor going, but its so worth it when its done, adding content becomes a snap.

Matt Huston   (Oct 30, 2006 at 09:43 GMT)
@TSquared

Here you go, it's just a newer version than Vanderbeck's implementation, but you will need to implement his first before you do this one.

Dreamer's New SQLite Integration Tutorial (All Platforms)
Edited on Oct 30, 2006 09:56 GMT

You must be a member and be logged in to either append comments or rate this resource.