Jump to content

  • Log In with Google      Sign In   
  • Create Account


Continuing the conversation

Posted by , 30 June 2010 - - - - - - · 254 views

Worked a bit more on the conversation editor. Line links can now be established and broken, the "l" button and the "b" button. Lines can also be moved up and down on the same level using the left and right buttons. And I also made it so that NPC responses are colored in red and links in violet.

There are also some more visual changes like icons for most of the buttons and the three main areas, the conversation list, the tree and the line editor can be resized.

Starting a conversation

Posted by , 30 June 2010 - - - - - - · 275 views

I am working on a rpg in the style of Baldur's Gate and Dragon Age. An important part in these kind of games is the conversation system. The conversations are not just simple one liners but they branch and repeat in various ways so it is important that the conversation system is flexible enough to handle all of this.

A conversation is a line that may have several lines or responses. It may also have an action script that is executed when the line is activated. There can also be a condition script and if it evaluates to true then the line is visible. This means that there can be several roots in a conversation and the one that is used is the first one whose condition evaluates to true.

A line can also be a link to another line which means that the conversation jumps to that line instead, this can be great for conversations that repeat.

This is what I got so far:

class ConversationLine {
Guid ID;
Guid Link; // optional
string Condition; // Optional
string Action; // Optional
string Text;
List<ConversationLine> Lines;

typedef List<ConversationLine> Conversation;

I made an editor for this conversation system in C# and I will probably implement it in the actual game as soon as I have got the GUI up and running. I have attached a screenshot of the editor below.

Adventures in the land of Linux

Posted by , 23 June 2010 - - - - - - · 223 views

I have started to port my current project to Linux. I began yesterday by installing Ubuntu, Xmonad and configuring vim. I resumed today by installing Code::Blocks (I'll probably use cmake for project configuration once I have got it all to compile) and checking out the latest version of my project. I created a new static library, added all source files and hit build ... *boom*. The first few errors were simple to resolve, just a couple "#ifdef WIN32" but the later problems were a bit more interesting.

DataMap::const_iterator iter = ... // Expected ; after const_iterator
I tried the following but to now avail

std::map<std::string, DataPtr>::const_iterator iter = ...

I came up with the following working solution after a visiti to google
typedef typename DataMap::const_iterator DataMapConstIterator;
DataMapConstIterator iter = ...

A couple of compilation units passed successfully until we entered the magical land of GameMonkey. Got a gmConfig_p.h for gcc that solved most problems but there were some code that required the program to be compiled as 32 bit. So I added the "-m32" flag and got a fancy error message "gnu/stubs-32.h no such file or directory". "sudo apt-get install libc6-dev-i386" killed that one.

Getting the Ogre include files to compile did not prove to be much of a problem, just had to download a couple of files that were not included in the Win32 sdk.

There were only a couple of small errors after that, some include paths had case errors (Linux is case sensitive, Windows is not) and TinyXML required "TIXML_USE_STL" to be set. Everything compiled after that so now I will have to actually compile all dependencies so that the linker can get to work. But that will probably have to wait until after the weekend.

Bachelor project - almost finished

Posted by , 01 June 2010 - - - - - - · 218 views

Just finished the presentation of my bachelor project, a Haskell Interpreter in javascript. It went pretty good but it could definitely gone better, a bit of stuttering on my side, we rushed through some parts and most of the crowd did not know what Haskell was. So now it's time to grade my coworkers, have a grading discussion with our mentor and await the final grading. I might just get a VG (Very Good, "Väl godkänt" in Swedish) grade at least with a bit of luck.

/ Johan

RymdspeletHD - New beta

Posted by , 31 May 2010 - - - - - - · 210 views

Just finished a new beta version of my addicitive space asteroid shooter RymdspeletHD, it is available at http://www.rymdspelet.net as usual.

I'll probably have to polish it for two or three versions more before it is ready to get out of beta and be released for "real". And if I manage to get my friend to actually to compose something then there might actually be some awesome music in the next version.

* Explosions are finished before end of level text is shown
* Ship rotation controls are a bit less sensitive
* Top 10 highscore is shown on main menu
* Various graphical improvements

A haskell interpreter in Javascript

Posted by , 18 May 2010 - - - - - - · 351 views

The report for my bachelor thesis has just been completed, a Haskell interpreter written i javascript. We were four people working on this project and my main responsibility was to make the parser, this meant stripping comment, applying the layout rules, parsing the actual grammar and generating the abstract syntax tree. Most of the language as it is specified in the Haskell 98 online report can be parsed, but we have not tested everything yet so there are probably a lot of bugs. The layout rules are applied correctly in most cases but some things like let expressions in list comprehensions does not expand correctly as we do not keep track of invalid and valid parsings for let expression, just of matching 'let ... in' expression do get the basic stuff working.

The simple lexer and the complete parser was made using a parser combinator library called JSParse and it worked out fine except that it does not keep track of line numbers, columns or which parser that failed so it is really hard to get any good error messages. There were also a couple of bugs in the butnot-parser and in the caching for the choice parser. I managed to fix both of them and the functioning version can be found at our git repository.

We do not support type classes at the moment but we will most likely fix that in the two coming weeks as we really want them in the final presentation of the project.

The source code for the whole project can be found at our git repository, feel free to clone it. http://github.com/johang88/haskellinjavascript

I have also put up an online demo at http://hiji.tinyrocket.se that works in firefox and chrome but internet explorer remains untested. The demo has a small part of the standard prelude library the definition of which can be found here http://hiji.tinyrocket.se/hs/Prelude.hs

Have a nice day

/ Johan

First post

Posted by , 17 May 2010 - - - - - - · 261 views

So I just got a GDNet+ subscription, payed for a whole year, just to show my appreciation for this site. Figure that I might just as well use this journal for something, but that will probably have to wait as I am busy writing a report for my bachelor thesis, a Haskell interpreter in javascript. You can probably expect some more information about that project in the future.

In the meantime, why don't you check out the beta version of my awesome asteroid space shooter RymdspeletHD

/ Johan G

October 2016 »

23 242526272829

Recent Comments

Recent Comments