Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

OHRRPGCE goes GPL (source code!)
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Soapbox
View previous topic :: View next topic  
Author Message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Feb 25, 2005 8:33 pm    Post subject: Reply with quote

NeoTA wrote:

UPX :
http://www.upx.org/


I am extremely suspicious of that site. It looks fake. I think the real site is http://upx.sourceforge.net/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Feb 25, 2005 9:48 pm    Post subject: Reply with quote

It turned out to be really easy to remove battles, and it removed about 90kb from the exe (I haven't looked at removing globals yet). I've left everything else in, eg. foemap checking, because it can be useful for script triggering. Now I'm playing around with the interpreter.

James, is there any reason I can't change script loading so that recusive scritps are only loaded once, by pointing all copies to the same offset in the buffer?

Conincidentally, I was also looking at pushw. I found it in stack.asm, and worked everything out there (knowing assembly helps). Which is cool, because just a week ago I was wondering why I couldn't succeed (or had ever heard of) in my attempt to make some interpreter stack overflow : P

RPGCreations wrote:
What somebody needs to do is add an option to make the main menu (ie, quit, bam volume) completely invisible or completely solid, or even an option to not show the BAM volume (it doesn't effect the music when you are using VDMS)


I plan to try customising the user menu sometime, making the appearance of all options changable (or to appear/disappear on tags) or allow unselectable options, show globals like textboxs do, ability to add new options that link to plotscripts, change the colour of the text and box, make the box solid, checkered, not there, or backdrop etc.

I'm not sure if I should create a new lump to put everything into, or put it into gen and global strings, or what.

Ysoft_Entertainment wrote:
1) Jame's programming style is almost like mine, maybe a little bit better(he indents, I don't)


I feel incredibly at home in this code : ) (what a bad thing)
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
NeoTA
Idiomatic Nomenclature




Joined: 15 Mar 2004
Posts: 165

PostPosted: Fri Feb 25, 2005 10:12 pm    Post subject: Reply with quote

TMC: actually, with what you are mentioning, i think an overhaul of the save system should come before any mods like that.. because with the current save system, it's easiest (and ugly and inappropriate) to stick such stuff in the GEN lump (SAV files have one!)

what needs to be done at the least:

* Save only the few bits of GEN that are relevant to saves

* Introduce a size tracking mechanism, so you can add your extra prefs and thus increase savefile size without breaking savefile format. basically just a bytecount for the "miscellaneous sundry items" that are stored there.
Earlier versions could safely ignore this; and it could grow up to 16000 bytes[1] (but who would use 8000!! misc datas anyway)

* increment savefile version (of course)

[1] this is due to the size of buffer()

james will probably agree with me that these things should happen; it is just a question of when these changes should take place.
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Feb 25, 2005 11:18 pm    Post subject: Reply with quote

The Mad Cacti wrote:
James, is there any reason I can't change script loading so that recusive scritps are only loaded once, by pointing all copies to the same offset in the buffer?


I can't think of any reason why that wouldn't work off the top of my head-- it would be a good optimization. It'll require testing to make extra sure.

The Mad Cacti wrote:

I plan to try customising the user menu sometime, making the appearance of all options changable (or to appear/disappear on tags) or allow unselectable options, show globals like textboxs do, ability to add new options that link to plotscripts, change the colour of the text and box, make the box solid, checkered, not there, or backdrop etc.


I have always intended that the menu should be customizable, just never got around to it. -- and not just plotscript customizable, there should actually be a "Edit Menu" screen in CUSTOM.EXE

The Mad Cacti wrote:

I'm not sure if I should create a new lump to put everything into, or put it into gen and global strings, or what.


definitely a new lump as opposed to gen (although global strings usage may be appropriate)

The Mad Cacti wrote:

I feel incredibly at home in this code : ) (what a bad thing)


*Laugh*
I'm going to hell for making people look at this code :)

NeoTA wrote:
TMC: actually, with what you are mentioning, i think an overhaul of the save system should come before any mods like that..
...
james will probably agree with me that these things should happen; it is just a question of when these changes should take place.


Yes. A .SAV format update would be great. I see that as post-quaternion work (which is not to say don't think about it now, I just mean I'm not thinking about it yet myself)

A SAV format update is not required for a good implementation of a customizable menu. There is actually no reason a customized menu even needs to touch save-game data.

See the code for the BINSIZE.BIN and ATTACK.BIN lumps for an example of the best way to create new non-crappy lump formats. (why would you need a record-size for the menu definition? Why to support multiple menu definitions in the same game, of course ;)

Menu customization development is something I want to be very involved in, so if anybody writes any code for it, let me know so I can keep up.

Dang it, you guys! You are getting me excited about coding again. This is really going to cut into my sculpting time ;)


Last edited by Bob the Hamster on Fri Feb 25, 2005 11:30 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RPGCreations
E Pluribus Unum




Joined: 18 May 2003
Posts: 345

PostPosted: Fri Feb 25, 2005 11:27 pm    Post subject: Reply with quote

Remember that I haven't looked at the source yet, but:

is the "Loading..." text when you load an RPG file via renaming it or dropping a file onto GAME hard coded into GAME.EXE or could a defineable string be included with the other defineable strings to change it?
_________________
Back to top
View user's profile Send private message
NeoTA
Idiomatic Nomenclature




Joined: 15 Mar 2004
Posts: 165

PostPosted: Sat Feb 26, 2005 9:30 pm    Post subject: Reply with quote

I just compiled this.
here is a 'how-to-compile" guide. it should work for you, but i haven't tried it elsewhere than this machine.
If it works for others too, it could go on the wiki..




Preparing (you only need to do these things once)


1. Have quickbasic 4.5.
2. Go into the support/ directory. unzip the nocom.zip there. ( i don't know if this is required)
3. Edit env-set.bat so that the
"SET OBDIR=" and
"SET OHRRPGCE="
point at the directories these things are installed in on your system.
(by default they are set to C:\qb45 and C:\ohrrpgce respectively)


Main (you need to do this every time you want to compile)
1. Change to the ohrrpgce directory
2. Run "env-set" (you only need to do this once per dos session, so if you do multiple recompiles without quitting your dos box, you don't have to rerun this.)
3. Run "compile"
4. If you don't have "grep" installed, be momentarily puzzled by the error message after the compile finishes.
5. Notice that anyway, custom.exe and game.exe compiled ok.
6. Try them out, and rejoice!

I compiled in DOSBox under linux (http://dosbox.sf.net). It took ~4 minutes to compile.
In an actual dos prompt under windows, it should go much faster.
But, you should consider running under dosbox anyway.. because it gives you lots of free conventional memory (i had 637k free). this is important for compiling.
Back to top
View user's profile Send private message
RPGCreations
E Pluribus Unum




Joined: 18 May 2003
Posts: 345

PostPosted: Sat Feb 26, 2005 11:47 pm    Post subject: Reply with quote

Can't you set up the enviroment variables from DOSBOX's config? I used a slew of commands for OHRBOX to automatically configure things, then switch the virtual drive to C then clear the screen.
_________________
Back to top
View user's profile Send private message
NeoTA
Idiomatic Nomenclature




Joined: 15 Mar 2004
Posts: 165

PostPosted: Sun Feb 27, 2005 12:47 am    Post subject: Reply with quote

sure. but i'd rather make my own batch file that just consists of:


CALL env-set
compile


also, i just finished debugging basclean.py. it works 100% for all ohrrpgce .bas files now. hopefully, due to that bascleaned files will get committed to the svn repository soon.

http://neota.castleparadox.com/basclean.py
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sun Feb 27, 2005 12:54 am    Post subject: Reply with quote

No need to unzip nocom.zip, handled by compile.bat

For some reason under winXP, env-set.bat doen't work - QBDIR and OHRRPGCE are treated as local variables. Also, the link to the prompt won't run env-set. Win XP is batty. I moved the SETs into compile.bat

I can only assume that grep prints out compile.out and/or deletes it. I just removed that instruction.

Freelink gets around the memory problem by swapping to disk. Any advantage to be had by compiling through DOSBOX then?

4 minutes? Wow. It compiles in 2 seconds on my machine : P
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
NeoTA
Idiomatic Nomenclature




Joined: 15 Mar 2004
Posts: 165

PostPosted: Sun Feb 27, 2005 1:24 am    Post subject: Reply with quote

the compiler is what is prone to running out of memory.
Back to top
View user's profile Send private message
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Sun Feb 27, 2005 7:57 am    Post subject: Reply with quote

under winme I couldn't get any of the bat files work that had to do with the exe files(the variables weren't set, so I went into each bat file, and manually changed the directories, now I am able to compile the project.
_________________
Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
phyrfox
Avid Player




Joined: 20 Feb 2005
Posts: 96
Location: New York, USA

PostPosted: Sun Feb 27, 2005 6:45 pm    Post subject: BINSIZE.BIN & ATTACK.BIN Reply with quote

Alright. I'm looking at the source code here, and it's not making the most sense. Probably because my machine code language usage is a bit rusty (and I was never really that good anyway)...

What is ATTACK.BIN used for? BINSIZE.BIN I have deduced from previous look-sees as something that defines a record-size for the other BIN files (although, I've never seen the values be anything different). I suspect that ATTACK.BIN has something to do with defining attack animations (which I haven't seen documented elsewhere, thus far).

Can anyone point me in the right direction? I've done a bit of test-hacking with the SAY format already, so I know I'm headed in the right direction. It seems there's so much more to uncover before I can make something that's fully compatible with the RPG format.

I'd like to thank James Paige for making the default Font and Master Palette separate files; that's made it a lot easier to embed the information into the source code (and thus, as part of the executable instead of as separate files that might get lost).

What other discoveries await me during this most eventful journey of writing my very own (ported) engine? I don't suppose somebody could help me out with documenting the various undocumented portions of the source? My time is unfortunately short-handed, more often than not.

~= phyrfox =~
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Sun Feb 27, 2005 9:16 pm    Post subject: Re: BINSIZE.BIN & ATTACK.BIN Reply with quote

phyrfox wrote:

What is ATTACK.BIN used for? BINSIZE.BIN I have deduced from previous look-sees as something that defines a record-size for the other BIN files (although, I've never seen the values be anything different). I suspect that ATTACK.BIN has something to do with defining attack animations (which I haven't seen documented elsewhere, thus far).


ATTACK.BIN contains extended attack data. See GAMENAME.DT6 for the rest of the attack data.

Like most of the lumps, GAMENAME.DT6 is fixed-length binary records without any data-directed way of increasing the record size. I needed to make more attack data, but did not want to have to break backwards compatability, so I added ATTACK.BIN. ATTACK.BIN's record size can be increased without risk to backwards compatability because of BINSIZE.BIN

As for attack animations, that is fully hard-coded into bmod.bas.
Very bad :(

phyrfox wrote:

I'd like to thank James Paige for making the default Font and Master Palette separate files; that's made it a lot easier to embed the information into the source code (and thus, as part of the executable instead of as separate files that might get lost).


You are welcome :)
But actually, thank ThorBrian. That was his idea.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
phyrfox
Avid Player




Joined: 20 Feb 2005
Posts: 96
Location: New York, USA

PostPosted: Mon Feb 28, 2005 1:53 am    Post subject: Re: BINSIZE.BIN & ATTACK.BIN Reply with quote

James Paige wrote:

ATTACK.BIN contains extended attack data. See GAMENAME.DT6 for the rest of the attack data.

Like most of the lumps, GAMENAME.DT6 is fixed-length binary records without any data-directed way of increasing the record size. I needed to make more attack data, but did not want to have to break backwards compatability, so I added ATTACK.BIN. ATTACK.BIN's record size can be increased without risk to backwards compatability because of BINSIZE.BIN


I see. I was wondering why there'd be two of them (two attack-data lumps). So, BINSIZE.BIN determines the arbitrary size of ATTACK.BIN's record sizes. That makes sense now. So the value contained in BINSIZE.BIN (it's just one 16-bit signed number) is just for ATTACK.BIN? That's the impression I'm getting...

James Paige wrote:

As for attack animations, that is fully hard-coded into bmod.bas.
Very bad :(


Well, not bad, just not as workable. Looks like I'll be updating the RPG's file version at some point anyway, then.

James Paige wrote:
You are welcome :)
But actually, thank ThorBrian. That was his idea.


In that case... Thanks ThorBrian. By the way, does anyone else want that converted source? It only takes a few minutes with some basic commands, but it might be useful... I actually took a hex-dumper that was already available, dumped it to a text file, and ran a few regexp's against the file to get it to come out in a completely C-compatible source format. Then, I added a simple conversion routine (which I think I deleted since I need to re-think how I'm going to do things in SDL) to get it to work in my engine.

~= phyrfox =~
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
NeoTA
Idiomatic Nomenclature




Joined: 15 Mar 2004
Posts: 165

PostPosted: Mon Feb 28, 2005 5:56 am    Post subject: Reply with quote

To be official! i am writing a program to autotranslate OHRRPGCE's routines from QBASIC to Python.
Here is my plan:

1. QBASIC lexing (100% done)
2. QBASIC parsing ( 2 % done)
3. Translate parsed QBASIC phrases into Python lexes* (0% done)
4. Python unlexing ( 0% done, trivial)**

* a lex == one lexical unit.
** unlexing == converting a set of tokens into textual source code. I wrote a QBASIC unlexer already; it's a mere 24 lines long!

#2 will probably take longest; many rules to write.

Special about this project is that it is designed to accommodate translation between any two languages.
If anyone wants to translate ohr to another programming language, they would only have to do the equivalent to steps 3 and 4 for their intended language.

I need to finish this quickly so i can finish this somewhat-secret picture more quickly.

I will post a link when the translator is ready.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> The Soapbox All times are GMT - 8 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group