your nightmare returns... Scherzooooooo

This forum is for discussion pertaining to homebrew and indie software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
karsten
Mental DCEmu
Mental DCEmu
Posts: 463
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Dec 07, 2002 3:19 pm
Location: ITALY!
Has thanked: 0
Been thanked: 0
Contact:

your nightmare returns... Scherzooooooo

Post by karsten »

just wondering what you're up to 8-)

Nester Dc?
Super Famicast?
Dream Script?

put my thirst for knowledge aside...
I'll create a monument to non-existance! -Kefka, FFVI
Image
http://www.auritech.com
Strapping Scherzo
DC Developer
DC Developer
Posts: 2285
Joined: Fri Feb 21, 2003 7:37 am
Location: Chicago, IL
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Strapping Scherzo »

I did a little work on Dream Script over the weekend. I'm not so sure how feasible it will be to have a Flash powered UI for NesterDC SE. So, I'm working on Dream Script.

At this point, I'm almost tempted to throw theming away for NesterDC SE. I really want to finish it. On the other hand, I don't want to release a half-assed job. Lately I haven't had the free time or concentration necessary to program at home. Whenever I try, I get so little done. It was easier when I had a job with more flexible hours. But now, I have a strict 9-5er (8-5 on mondays).

Hobby programming is ME. I'm not quitting. It's just moving sloooooowly. I definitely guarantee that I'll release both DreamScript and NDCSE by X-Mas.
Image
ethoscapade
Insane DCEmu
Insane DCEmu
Posts: 280
Joined: Wed Mar 17, 2004 4:45 pm
Has thanked: 0
Been thanked: 0

Post by ethoscapade »

i'm all for you throwing away theming (and netplay) for nesterDC SE.
Alexvrb
DCEmu Ultra Poster
DCEmu Ultra Poster
Posts: 1754
Joined: Wed Jul 17, 2002 11:25 am
Has thanked: 0
Been thanked: 0

Post by Alexvrb »

I second that. Menu has to be 1) Functional and 2) Not ass-ugly. After that I am perfectly happy. Besides, just because you release a version doesn't mean the project has to be shelved forever. But this way people get to play with your work in the shorter term as well.
If you have twenty monkeys,
banging randomly on typewriters,
they will in twenty minutes produce the complete source code to World of Warcraft.
User avatar
nevets934
Insane DCEmu
Insane DCEmu
Posts: 164
Joined: Wed Aug 04, 2004 8:52 am
Has thanked: 0
Been thanked: 0

Post by nevets934 »

no dont get rid of net play. there arent any homebrew netplay stuff if u make 1 maby others will 2
Strapping Scherzo
DC Developer
DC Developer
Posts: 2285
Joined: Fri Feb 21, 2003 7:37 am
Location: Chicago, IL
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Strapping Scherzo »

nevets934 wrote:no dont get rid of net play. there arent any homebrew netplay stuff if u make 1 maby others will 2
I'm sure once someone makes a homebrew or emu with netplay then lots will follow. The main thing is to get dailup PPP working over the modem.
Image
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5666
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Post by BlueCrab »

scherzo wrote:
nevets934 wrote:no dont get rid of net play. there arent any homebrew netplay stuff if u make 1 maby others will 2
I'm sure once someone makes a homebrew or emu with netplay then lots will follow. The main thing is to get dailup PPP working over the modem.
I'm actually trying to get dialup PPP, but am having large amounts of problems :? ...
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

I definitely guarantee that I'll release both DreamScript and NDCSE by X-Mas.
Christmas should be good then. That's when I'm aiming to release DCBasic and a new version of Genesis Plus.
doragasu
DCEmu Cool Poster
DCEmu Cool Poster
Posts: 1048
Joined: Thu May 16, 2002 5:01 pm
Location: Madrid, Spain
Has thanked: 0
Been thanked: 0

Post by doragasu »

I'w awaiting both christmas presents from you both Scherzo and BlackAura!

Definitely christmas will be great for DC.
impact135
Insane DCEmu
Insane DCEmu
Posts: 220
Joined: Mon Nov 25, 2002 3:32 am
Has thanked: 0
Been thanked: 0

Post by impact135 »

well if you must.. but having a customizable theme is one of the things that makes nesterdc so great
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY
Has thanked: 0
Been thanked: 0

Post by OneThirty8 »

impact135 wrote:well if you must.. but having a customizable theme is one of the things that makes nesterdc so great
Themability is a cool feature (or, it is if themability is a real word), but the ability to play all of my favorite old games is what makes NesterDC great. :wink:
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

Writing a themable UI is actually a lot harder than writing a non-themable one, especially as the interface becomes more and more complex. It sounds like NesterDC SE and the planned UI for Genesis Plus are pretty much comparable, and both offer a lot of extra stuff that no other emulator thus far has included.

Let me put it this way... The existing releases of NesterDC and Genesis Plus / DC both have very similar themeing systems. To do a theme, you basically need some background images, and that's about it. GP/DC also allows you to change the font, and some of the colours and positions by editing an INI file. Neither are terribly complex - they're simple 2D drawings. That kind of theming support adds almost no complexity at all, because you're just swapping out a few files.

The menu system I'm working on is actually in full 3D, and uses an embedded scripting language to add animations and interactivity. Most of the menu code is actually in those scripts, so you could create a completely different menu system if you wanted to. The problem there is that the basic theme would consist of a set of scripts, a load of images and textures, some 3D models, sound effects, and music. That's not exactly simple anymore.

It also has to cover the main menu, options screens, theme browser, file browser, game browser, game information screen (which uses a lot of extra content, such as screenshots and box art), in-game menus, transitions between menus and to/from the game, multiple languages and region settings, and probably a load of other tiny little details.

The point is that writing such a complex menu system and making it completely themable is pretty difficult. Scherzo's approach is a little different than mine, using a Flash player instead of a scripting language + simple 3D system, but it's still going to be pretty hard to do. I understand why he might want to drop it for the moment. Doing a decent job of it is pretty difficult.

Oh yeah... At some point (although not right now), I'd probably need some help creating a decent default theme for GP/DC. Needs graphics, 3D models, sound effects, and music. Possibly two themes, actually.

Scherzo - How far have you got on Dream Script? I actually scrapped most of the stuff I had on DCBasic, and started again using a newer version of the interpreter. At the moment, I've got basic graphics working properly again on the PC version, and basic graphics without texturing support working on the Dreamcast version. Might be a good idea to exchange some ideas.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

BlackAura wrote:The menu system I'm working on is actually in full 3D, and uses an embedded scripting language to add animations and interactivity. Most of the menu code is actually in those scripts, so you could create a completely different menu system if you wanted to. The problem there is that the basic theme would consist of a set of scripts, a load of images and textures, some 3D models, sound effects, and music. That's not exactly simple anymore.
That sounds very interesting. Do you think there's any way you might make a side project to come up with a BIN loader with a similar UI?
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
Strapping Scherzo
DC Developer
DC Developer
Posts: 2285
Joined: Fri Feb 21, 2003 7:37 am
Location: Chicago, IL
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Strapping Scherzo »

BlackAura wrote:Scherzo - How far have you got on Dream Script? I actually scrapped most of the stuff I had on DCBasic, and started again using a newer version of the interpreter. At the moment, I've got basic graphics working properly again on the PC version, and basic graphics without texturing support working on the Dreamcast version. Might be a good idea to exchange some ideas.
The actual interpreter was easy because all I did was port KJS, the JavaScript engine from KDE. I have dreams of one day writing my own implementation of ECMA script, but KJS is so nicely written and makes exposing an API very easy.

As for the API itself, I have 2D graphics and input via the controller and mouse just about finished. All I really need to get a menu system working is font loading and file IO (for saving configs).

That's cool that your script is capable of 3D. I've been thinking of doing some too. I'm just not sure how much power I want to give to the user; just the loading of models or full blown triangle strips.

I don't have a windows version yet. :?

It's definitely spooky that we're both writing the same kind of thing at the same time. And the way past messages played out, I know neither of us prompted the other one to do it.

What if we combined and had something like .NET where the programmer chooses which language he wants to use but both have the same available objects, classes, and functions? I personally really like JavaScript and don't care to much for BASIC. It's really just a syntax preference. But I know many people are the other way around.

So if we could come to an agreement on the API, I think that would be cool.

Is DCBASIC object oriented or purely functional?
Image
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

The actual interpreter was easy because all I did was port KJS, the JavaScript engine from KDE. I have dreams of one day writing my own implementation of ECMA script, but KJS is so nicely written and makes exposing an API very easy.
I wish wxBasic were even half as well written as KJS. It's one huge chunk of C. Although split up into multiple files, the main file looks something like:

Code: Select all

#include "file1.h"
#include "file2.h"
#include "file3.h"
#include "file4.h"
#include "file5.h"

#include "file1.c"
#include "file2.c"
#include "file3.c"
#include "file4.c"
#include "file5.c"

int main(int argc, char **argv) {
    // ...
}
Not fun. It takes ages to compile on my system, and I have to do a "make clean" every time I change any of the interpreter. And I have to change the interpreter itself to hook anything new into the interpreter at the moment, because interfacing with the interpreter from outside the main file is almost impossible. Adding anything requires going in, finding the tables that specify what you're trying to add, inserting it in there, and then coding little functions to call the appropriate C code. Adding objects is worse - you need to write a chunk of code to describe the object to the interpreter. Getting any kind of meaningful debugging or error information out of it isn't exactly easy either.

Still, it's a lot neater and easier to work with than the other two open-source BASIC interpreters I've seen.
As for the API itself, I have 2D graphics and input via the controller and mouse just about finished. All I really need to get a menu system working is font loading and file IO (for saving configs).
You're further ahead than I am then. I have basic 2D graphics working, and system interface stuff working. So, although you can't read the controller yet, you can tell the interpreter to reset the Dreamcast when the user presses A+B+X+Y+START.

That said, I think my PC implementation is more advanced than yours at the moment. It's also more advanced than my DC implementation...

For the PC implementation, I'm just using OpenGL for the graphics, and SDL (with some addons, like SDL_image or SDL_mixer) for everything else. Except for the low-level drawing stuff, it's much easier to do than the Dreamcast version...
That's cool that your script is capable of 3D. I've been thinking of doing some too. I'm just not sure how much power I want to give to the user; just the loading of models or full blown triangle strips.
Different script, actually. The GP/DC menus are capable of 3D, but they don't use BASIC at all. They also have a much more limited scope, and they're just calling a few functions in the menu code. Or they will, once I get rid of the hard-coded bits and put the script engine in place.

I was trying to design the 2D video system of DCBasic so that it can incorporate 3D though. Essentially, we'd need to include a full 3D pipeline (stuff like matrices), and some other stuff like viewports, and probably a few other things. From there, it probably wouldn't be too hard to add 3D objects of some kind, which you could manipulate as sprites. Just call some function to drop into a 3D perspective transformation, instead of a 2D orthographic one, and draw the model. Or let the interpreter do it for you (better). That'd also let you use the 2D primitive drawing commands to draw 3D shapes if you want.
It's definitely spooky that we're both writing the same kind of thing at the same time. And the way past messages played out, I know neither of us prompted the other one to do it.
Weird, isn't it?
What if we combined and had something like .NET where the programmer chooses which language he wants to use but both have the same available objects, classes, and functions? I personally really like JavaScript and don't care to much for BASIC. It's really just a syntax preference. But I know many people are the other way around.

So if we could come to an agreement on the API, I think that would be cool.
Certainly would. There's probably a few differences in the way we've done things already, or differences imposed on us by the language / interpreters we're using, but it doesn't sound like either of us has a huge quantity of code beyond the interpreter anyway.

Oh, and I prefer JS to BASIC as well, but quite a lot of people don't. I did consider using JS instead, but at the time the only JS engine I knew of was the Mozilla one, which isn't really small or easily portable.
Is DCBASIC object oriented or purely functional?
It can be either. wxBasic is quite a lot like Visual Basic in terms of syntax, so you can have objects of a sort. I think you can define your own classes too, but I've not worked that out yet. The documentation for wxBasic is crap too.

At the moment, I'm only bothering with object-like interfaces, but I was planning on doing function-like interfaces. So, loading a sprite, and putting it in the center of the screen, rotated 45 degrees, could look like:

Code: Select all

image = New Image("image.png")
sprite = New Sprite(image)
w = sprite.getWidth()
h = sprite.getHeight()
sprite.setHotspot(w / 2, h / 2)
sprite.setPosition(320, 240)
sprite.setAngle(45)
or

Code: Select all

image = ImageLoad("image.png")
sprite = SpriteCreate(image)
w = SpriteWidth()
h = SpriteHeight()
SpriteHotspot(sprite, w / 2, h / 2)
SpritePosition(sprite, 320, 240)
SpriteAngle(sprite, 45)
Personally, I prefer the top one. The second one is clunkier, but a bit more BASIC-like, and very similar to some other game-oriented BASICs. One thing that is kinda annoying is that I can't find any way to actually get and set some variable in an object directly, so you have to use getXXX and setXXX methods. Shame, because that would make things a lot easier to write. Instead of doing:

Code: Select all

sprite.setPositionX(320)
you could just do:

Code: Select all

sprite.X = 320
I'm still not completely happy with this BASIC interpreter though. If anyone can find one which is less of a pain in the backside, please let me know...
Strapping Scherzo
DC Developer
DC Developer
Posts: 2285
Joined: Fri Feb 21, 2003 7:37 am
Location: Chicago, IL
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Strapping Scherzo »

Here's what my current test script looks like:

Code: Select all

var x = 0;
var y = 0;
var angle = 0;
var scale = 1;

var angle_speed = 0.02;

var numpoints = 5;

var points = new Array();
for (var k = 0; k < numpoints; ++k)
{
	var temp = new Object();
	temp.x = Math.random() * 640;
	temp.y = Math.random() * 480;
	temp.z = (Math.random() * 50) + 10;
	points.push(temp);
}

var background = new Image();
var thingy = new Image();
if (background.load("/cd/gene19.jpg", IMG_OPAQUE, IMG_FILTER_BILINEAR, IMG_ALPHA_NONE) &&
	thingy.load("/cd/smb12.bmp", IMG_PUNCH_THRU, IMG_FILTER_NONE, IMG_ALPHA_KEYED))
{
	print("filename = " + thingy.getFilename() + "\n");
	print("width = " + thingy.getWidth() + "\n");
	print("height = " + thingy.getHeight() + "\n");
	while (true)
	{
		pad[0].poll();
		if (pad[0].joyx)
			x += pad[0].joyx / 64;
		if (pad[0].joyy)
			y += pad[0].joyy / 64;
		if (pad[0].a)
			angle += angle_speed;
		if (pad[0].b)
			angle -= angle_speed;
		if (pad[0].x)
			scale += 0.05;
		if (pad[0].y)
			scale -= 0.05;
		
		/*
		mouse[0].poll();
		x += mouse[0].dx;
		y += mouse[0].dy;
		scale += mouse[0].dz * 0.05;
		if (mouse[0].lbutton)
			angle += angle_speed;
		if (mouse[0].rbutton)
			angle -= angle_speed;
		*/
		
		Video.frameBegin();
		background.drawWH(0, 0, 640, 480, 1, 2);
		for (var k = 0; k < numpoints; ++k)
			thingy.drawRotated(x + points[k].x, y + points[k].y, scale, 1.0, points[k].z, 0.5, 0.5, angle);
		Video.frameFinish();
	}
}
else
	print("load failed\n");
Your hotspots members are the same as the two 0.5 values being passed in to drawRotated, except that 0.5 defines the middle of the width or the height.

I'm pretty sure I won't be implementing a Sprite class natively. I'll probably have an include file for a sprite class and have one of my tutorials show how to extend that class for specific use.

I have a question for you... I'm trying to implement some diagnostic functions. One of them is a function that returns the amount of free system memory. The only thing I could find in KOS is mallinfo(). The fordblks member on the struct it returns is supposedly the number of total free blocks of memory available. However, I couldn't find any obvious place that gives the size of a block. Do you know? Or do you know of a better way. I'd really like to know how much memory the scripting engine is taking up.
Image
jjoepr
Mental DCEmu
Mental DCEmu
Posts: 375
Joined: Sun Jul 27, 2003 10:09 pm
Location: My Living Room Couch
Has thanked: 0
Been thanked: 0
Contact:

Post by jjoepr »

It will be a great christmas :D with lots of goodies from our Devvers :cheers:
Image
karsten
Mental DCEmu
Mental DCEmu
Posts: 463
Joined: Sat Dec 07, 2002 3:19 pm
Location: ITALY!
Has thanked: 0
Been thanked: 0
Contact:

Post by karsten »

jjoepr wrote:It will be a great christmas :D with lots of goodies from our Devvers :cheers:
i quote :roll:
I'll create a monument to non-existance! -Kefka, FFVI
Image
http://www.auritech.com
qatmix
Mental DCEmu
Mental DCEmu
Posts: 393
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 0

Post by qatmix »

Frankly I think themable FE's are a waste of time. They are not worht worryign about. Obvioulsy the actual FE itself should be easy to use and intuitive. but it dont care if it can have the backdrop changed etc.
impact135
Insane DCEmu
Insane DCEmu
Posts: 220
Joined: Mon Nov 25, 2002 3:32 am
Has thanked: 0
Been thanked: 0

Post by impact135 »

i just wanted to know if you were any closer in fixing the glitch in nesterdc7.1 where the screen is all messed up in the far right of the screen as in games like super mario bros 3 and little nemo the dream master. I hope you know what im talking about i believe i have talked to you about this problem before.

Is the glitch even fixable? I have noticed that this same glitch is in PC NES EMULATION... as well as nesterdc.. isnt there any way to fix this... its very annoying to see the screen all messed up on the right.

I wanted to know if im crazy or does anyone else notice this glitch??
Post Reply