Visual Novel Engine

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Message
Author
User avatar
Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

#16 Post by Blue Lemma » Sat Aug 30, 2003 1:34 am

Here are some random things I thought I'd contribute:
Besides fading in, some games have the character come in from the side of the screen. Being able to set the coordinates for a character might also be good instead of just having middle, left, and right character coordinates. A three-space system like that also leaves centering problems if there are two characters on the screen instead of one or three.
I haven't seen anything about menus for game settings yet. You'll probably also want functions like EnableSave, DisableSave, RestartGame, and that sort of thing.
I noticed you guys talking about concatenating strings, like inserting the player's name in some text. However, what about if you want to put a number in there, like what date it is or how much money you have? The way things are now, it looks like it would require multiple functions. I suggest this: designate escape sequences in the strings that the program will recognize and replace with appropriate values. For instance, in Tales of Lemma 1, I made ~P get replaced with the player's name. Or you could have ~M get replaced with player's money. The engine would take care of the appropriate replacement steps in the string-reading code, saving a lot of scripting. All you'd need is a function to associate these escape sequences with the variables, and bingo! :)

Well, there's my two cents for tonight. :lol:

KOE
Regular
Posts: 44
Joined: Thu Aug 21, 2003 10:37 am
Location: Canada
Contact:

#17 Post by KOE » Sat Aug 30, 2003 1:46 am

Okay, I have started the engine with a nice usuable part for other engines as well as my VN. It's basically a library for parsing scripts with a C-like syntax (similar, but more simple). I will be using my scripts to control the game-flow.
You guys given me lots of idea. Basically, the scripting engine will be able to call C-functions, and do various string concat as Blue Lemma decribed.
Something on the line of this:

var playername = "Me";

DIsplayText(playername + ", how's it going");

BlackSpider
Regular
Posts: 133
Joined: Fri Aug 22, 2003 1:08 pm
Location: Wroclaw, Poland
Contact:

#18 Post by BlackSpider » Sat Aug 30, 2003 3:05 pm

Well it sure would be great if the character could just come in from one side of the screen, but it requires so much work (I mean the frames for animated sequences) that IMO only commercial companies with dozens of graphicians can be that extravagant :-). We could of course slide the character from left or right (without showing their legs) but I don't really think that with such a simplified approach the required result would be achieved.

Now concerning the three space system and centing. As to my taste it's better to leave the centring work to the engine. Eg when two characters are visibe the engine knows it and centers them appropriately. The same goes for one and three characters. But leaving the possibility (just in case) to modify the default character coordinates seems like a good idea. It would be especially useful if someone had more frames for a character and wanted to achieve some special effects. BTW I recently figured out that three characters visible at the same time on the screen make too much mess, that's why I'll only use two.

Menus and game settings are as much important as the game itself. IMO without a good interface, the game loses much of it's value. As for the save/restore function, when the program starts I'm checking the 4 available slots if saved games do exist. If they do, I set the appropriate flags for each slot as TRUE. Then when the user decides to save a game, the slot where he saves his game also changes to TRUE. I think there's no much sense in provideing a delete game option when the user can just overwrite a previously saved game. A good idea would be to check if the saved game has the correct size (just in case). BTW I recently decided that I'll encrypt my saved games with a 256 byte key sequence (that's a very simple formula). Yeah, I hate those amateur crackers and their hex editors :-).

Oh, one more thing. These escape sequences are a very good idea!!! I could use them at least for the player's name and perhaps for the player's money. Implementing more would complicate my code too much. I mean with 10 characters and at least 20 features to control for them would easily make 200 escape sequences :-).
Anyway, thanks a lot for the idea.

User avatar
Blue Lemma
Forum Founder
Posts: 2005
Joined: Sat Jan 25, 2003 2:32 pm
Completed: ToL, Shoujo Attack!, Lemma Ten
Projects: [RETIRED FROM FORUM ADMINISTRATION - CONTACT PYTOM WITH ISSUES]
Contact:

#19 Post by Blue Lemma » Sat Aug 30, 2003 6:06 pm

Well it sure would be great if the character could just come in from one side of the screen, but it requires so much work (I mean the frames for animated sequences) that IMO only commercial companies with dozens of graphicians can be that extravagant . We could of course slide the character from left or right...
That's what I meant! :lol: Although I agree, it's a bit weird. I'm looking forward to playing your game when it's done :)

User avatar
chronoluminaire
Eileen-Class Veteran
Posts: 1153
Joined: Mon Jul 07, 2003 4:57 pm
Completed: Elven Relations, Cloud Fairy, When I Rule The World
Tumblr: alextfish
Skype: alextfish
Location: Cambridge, UK
Contact:

#20 Post by chronoluminaire » Sun Aug 31, 2003 5:09 am

Just a couple of thoughts on KOE's plans:

The variablename syntax looks impressive. It can be quite tricky to parse input lines with strings and so on, but it would be great if you can do it.
If you're going for such a powerful and impressive line-syntax, then why restrict your users to 2 variables (playername and money)? It would be very little more work to give them, say, 10 or 26.
You could make the script parser understand escape sequences from ~A~ through to ~Z~. Of course, if you're allowing string concatenation ( playername + ", how are you?" ) then it's not so important.

And I thoroughly agree with you about the interface being important. It does make a large difference to how the game is perceived, the fact of how well it plays. Popular options in commercial visual novels seem to be a way to skip through text fast if you've seen it before, and saving at any point. Although I don't think there's a problem with providing the EnableSave() and DisableSave() functions :)
But if you're so concerned about the interface (and you should be), then why limit the player to 4 save slots? From the player's point of view, it feels irritating to be constrained so. More recent games have allowed 10 (Tokimeki Check-In), 30 (Snow Drop or Kana Imouto), or unlimited (Casual Romance Club, which opens up a standard Win32 file browser to let you select a filename to load or save).

Similarly with displaying 3 characters at once. I'd suggest make the engine allow it. If your users designing games want to use it, then let them sort out the mess :)

Things are looking great so far! Let us know if you need any help with debugging, beta testing, or things like that!

KOE
Regular
Posts: 44
Joined: Thu Aug 21, 2003 10:37 am
Location: Canada
Contact:

#21 Post by KOE » Sun Aug 31, 2003 6:13 am

I think Lemma's ~P and ~M were just examples. I'm sure he has more.

The work of having a slightly more complicated scripting system led to the reason why I am making a reusable library out of it. I figure I should write this component so that I (or other people) can reuse it in the future.

As for multi-characters on screen, I plan for the engine to be flexible enough for as many characters on the screen limited by memory and speed. Simple animations will be supported. I'm thinking of implementing something like the Flash motion-tweening: specify 2 points, attach an effect (translate, rotate, frame switch, etc..), and execute animation.

I am getting close to finishing the scripting engine library. Once that is complete, then I will start building on the actualy VN engine which I will be requiring you guys help. : )

BlackSpider
Regular
Posts: 133
Joined: Fri Aug 22, 2003 1:08 pm
Location: Wroclaw, Poland
Contact:

#22 Post by BlackSpider » Sun Aug 31, 2003 6:52 pm

Yes, the VN engine core. That's the biggest problem. And here comes the main question. What graphics library to use to be compatible among many operating systems and at the same time produce a program that runs fast enough on any machine. Talking about graphics libraries, I don't mean something that provides you a platform independent set of functions similar to DirectX under Windows. What would be needed is a complete 2D system that could handle any 2D effect including animations, scaling, rotation, blending, special primitives rendering, a platform independent font system engine, etc. Writeing all those functions from scratch could take many months or even years if somebody considers programming his hobby :-). It would be good if the engine supported as many graphics file formats as possible. Especially direct support for animated GIFs is a good idea, since there are so many public domain GIFs out there :-). I'm sure there are many freeware 2D engines 'somewhere' on the NET. The only thing is to find the one that has it all. BTW I'm going to release mine too, but I need to make some important bug fixes first. This could take months since the 'Town Heat' project has top priority right now.

As for the sound engine it's much easier to find a good one. IMO FMOD at http://www.fmod.org is the best and most stable I could find for the Win32 platform.

There was also a discussion about saved games. As for me, their number is not a problem. The real problem is how to show them on the menu :-). I'm using an independent interface that switches the graphics mode to fullscreen (DirectX), therfore I have to handle all the menu creation functions in a special way (not via WinAPI menu commands). Of course I could use the standard WinAPI choosing file functions for loading saved games, but as a matter of principle (it wouldn't look too good) I won't do it :-). That's why the easiest way out was to use only 4 slots. They fit so well with other menus and I don't want to waste more time doing list boxes by using graphics functions. I guess I'm just too lazy :-).

BTW Can't wait to play Tales of Lemma 2. It looks like it's going to be very interesting.

KOE
Regular
Posts: 44
Joined: Thu Aug 21, 2003 10:37 am
Location: Canada
Contact:

#23 Post by KOE » Mon Sep 01, 2003 6:04 am

As for graphics primitives, I plan to write those from scratch : ).
The font system will be handled by freetype (http://www.freetype.org/), which is platform independant. For graphics file formats, BMP is supported by SDL already. I plan to use libjpeg (http://www.ijg.org/) for loading jpeg files. GIF files is something I will consider due to the fact that GIF is covered under patents. If support for GIF be available, it will come as a separate component. As for sound, I was thinking of lame, libvorbis, and libmikmod. But if fmod is a good solution, I might use that.. but is it compatible with GPL?

Yes, I am also looking forward to ToL2 : )

BlackSpider
Regular
Posts: 133
Joined: Fri Aug 22, 2003 1:08 pm
Location: Wroclaw, Poland
Contact:

#24 Post by BlackSpider » Mon Sep 01, 2003 5:00 pm

Ah yes, I forgot again about those (USA) GIF patents, which btw do not apply to my country :-). At least that's what I heard. But considering that my game language will be English I decided to write a GIF converter (to my own file format) to be safe. IMO that's the best way out if I finally decide to use those public domain GIFs.

I think I should also try libjpeg, because I didn't implement the JPG format in my library yet and compressing true color photos with RLE produces really big size images :-(.

As for the sound engine I think I'll also have to find something different than FMOD. Yes, I actually read the FMOD licence today and I was quite surprised. I could swear that when I downloaded this sound system a year ago it had a more liberal licence. Anyway at least if I write freeware apps I can use it for free, which is fine for the moment :-).

I guess that in the future I should look for a LGPL sound library. I'm sure there are many. The only problem is to find a good one.

Zero
Newbie
Posts: 10
Joined: Wed Jul 09, 2003 7:43 am
Contact:

#25 Post by Zero » Mon Sep 01, 2003 5:31 pm

The GIF patent expired several monthes ago, didn't you get the memo?

BlackSpider
Regular
Posts: 133
Joined: Fri Aug 22, 2003 1:08 pm
Location: Wroclaw, Poland
Contact:

#26 Post by BlackSpider » Tue Sep 02, 2003 10:17 am

Very good news :-) I didn't know that, but anyway I've already written a GIF converter to be safe from any patent infringement.

Zero
Newbie
Posts: 10
Joined: Wed Jul 09, 2003 7:43 am
Contact:

#27 Post by Zero » Tue Sep 02, 2003 6:14 pm

Besides, GIF sucks too much, PNG is the way to be.

Guest

#28 Post by Guest » Tue Sep 02, 2003 8:01 pm

true.. but PNGs are notorius for being HUGE...

unless you use very compressed ones

KOE
Regular
Posts: 44
Joined: Thu Aug 21, 2003 10:37 am
Location: Canada
Contact:

#29 Post by KOE » Wed Sep 03, 2003 6:19 am

I think I need to clear up the myth of PNG's being too big compared to GIFs. Most people don't realize that GIFs only support 8-bit indexed colour, whereas PNG's supports 24-bit RGB colour. Therefore, if you save a 24-bit RGB PNG vs the 8-bit indexed GIF.. I wouldn't be suprized that the PNG file would be huge! Now if you save the PNG under the same specs as the GIF file (8-bit, indexed), PNG outperforms GIF in compression size.

I think I will include PNG support for the engine.

BlackSpider
Regular
Posts: 133
Joined: Fri Aug 22, 2003 1:08 pm
Location: Wroclaw, Poland
Contact:

#30 Post by BlackSpider » Wed Sep 03, 2003 7:03 am

But AFAIK PNGs do not support multi page images, so they can not really be an alternative for the GIF format. As for background images, JPG compression is a much better idea.

It is really a big pain when you have to load frame by frame 10 files with 30 frames of animation each. Moreover additional animated objects could also require loading.

BTW, there's also the TIFF format, which is multi page.

Post Reply

Who is online

Users browsing this forum: No registered users