![Cool 8-)](./images/smilies/icon_cool.gif)
Nester Dc?
Super Famicast?
Dream Script?
put my thirst for knowledge aside...
I'm actually trying to get dialup PPP, but am having large amounts of problemsscherzo wrote: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.nevets934 wrote:no dont get rid of net play. there arent any homebrew netplay stuff if u make 1 maby others will 2
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?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.
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.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.
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: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.
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) {
// ...
}
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.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).
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.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.
Weird, isn't it?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.
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.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.
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.Is DCBASIC object oriented or purely functional?
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)
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)
Code: Select all
sprite.setPositionX(320)
Code: Select all
sprite.X = 320
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");