 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Blue Pixel SPY SAPPIN MAH FISH SANDWICH

Joined: 22 Apr 2005 Posts: 621
|
Posted: Sat Feb 10, 2007 2:44 pm Post subject: |
|
|
yes! now i wont have to use npcs for overlaps! _________________
 |
|
Back to top |
|
 |
Mike Caron Technomancer

Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Sat Feb 10, 2007 7:04 pm Post subject: Re: New feature |
|
|
James Paige wrote: | EDIT: ... oh... you already did... last night.... *sigh* we only had two ubersetzung blockers left. Well I'm not going to back the layers patch out, but I hope it is a good implementation, cause if it ain't, we will be paying for it in backcompat hacks for voxhumana |
It's a damn fine implementation, if I may say so myself. I didn't even have to resize any records!
The only possible source of problems might be in Custom, with the wallmap issue just mentioned. I'm not exactly sure how to deal with this problem. _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sat Feb 10, 2007 7:11 pm Post subject: |
|
|
You could probably prioritize the layers. It would do layer 0 first, then make walls based on layer 1, ignoring layer 1 tiles that do not have any wall flags, then finally do layer 3 wall mapping. |
|
Back to top |
|
 |
J.A.R.S. In umbram deo, ex nihilo...

Joined: 11 May 2005 Posts: 451 Location: Under the rainbow...
|
Posted: Sat Feb 10, 2007 10:04 pm Post subject: |
|
|
Code: | IF keyval(1) > 1 THEN GOTO finis
dummy = usemenu(csr, top, 0, last, 20)
IF keyval(57) > 1 OR keyval(28) > 1 THEN
IF csr = 0 THEN
game$ = inputfilename$("Filename of New Game?", ".rpg")
IF game$ <> "" THEN
IF NOT newRPGfile("ohrrpgce.new", game$ + ".rpg") THEN GOTO finis
gamefile$ = game$ + ".rpg"
EXIT DO
END IF
ELSEIF csr = 1 THEN
gamefile$ = browse$(7, "", "*.rpg", aquiretempdir$, 0)
game$ = trimextension$(trimpath$(gamefile$))
IF game$ <> "" THEN EXIT DO
ELSEIF csr = 2 THEN
GOTO finis
END IF
END IF |
WOAH (I know this isn't what you added)
This custom.bas file could REALLY do with indent cleaning! Back in coding school, the first thing they taught us was to indent with tab rather than space to avoid confusion for 10 or more lines of code If clauses. I dunno how you can make updates to this, especially without comments? I mean, James, there's something to be done there... comments, structure, if that was fixed, I'm sure progress would be much faster If you want to, I can do some indent, I don't feel comfortable enough with the code thus far to add comments though... |
|
Back to top |
|
 |
Artimus Bena Admiral

Joined: 17 Aug 2004 Posts: 637 Location: Dreamland.
|
Posted: Sun Feb 11, 2007 3:09 am Post subject: |
|
|
Ahhh, the very first thing I ever said when I first tried the engine was I'd love for it to have layers. Wonderful, mike, just wonderful.
(The second thing was the destruction of BAM) _________________ SACRE BLEU!
|||Compositions!
|||Eldardeen Soundtrack!
|||Red Mercury! |
|
Back to top |
|
 |
Rinku

Joined: 02 Feb 2003 Posts: 690
|
Posted: Sun Feb 11, 2007 8:05 am Post subject: |
|
|
This is a good improvement, and 3 layers should be more than enough for anyone, but it's still behind what other engines can do. Just to put this in perspective, the Game Maker for instance can create an infinite (arbitrary) number of layers, each of which can use an arbitrary tile size or even mixed tile sizes, each can have a level of transparency, and you can even make them constantly moving or apply parallax scrolling to them, and you can enable and disable them at any time during play (which is useful if you want to have, say, disappearing ceilings as in the early Dragon Warrior games).
To answer JARS's questions, the Ohrrpgce is still coded in QuickBasic I believe; it's just a more modern version of it that supports Windows. The language itself doesn't really matter though, because the Ohrrpgce is interpreted; if it were coded in C++ it'd probably be no faster than it being coded in QuickBasic.
EDIT: I just saw that this question was answered, I only saw the first page of this thread, I didn't see that there were three pages.
EDIT EDIT: WOW, I think that's about as negative as we'll ever see James Paige. Any more negative and the universe would destroy itself in surprise. _________________ Tower Defense Game
Last edited by Rinku on Sun Feb 11, 2007 8:31 am; edited 1 time in total |
|
Back to top |
|
 |
PlayerOne

Joined: 07 Sep 2005 Posts: 143 Location: UK
|
Posted: Sun Feb 11, 2007 8:27 am Post subject: |
|
|
I'd guess the default passability should always add all 3 layers. That is, a higher layer should add walls, but not take any away. |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sun Feb 11, 2007 11:20 am Post subject: |
|
|
Rinku is all kinds of wrong.
OHRRPGCE is not interpreted. It is compiled. Before the Windows releases, it was compiled with QBasic 4.0, which allows compilation into .exe files instead of basic interpretation like the QBasic that comes with your Windows 95 CD forces.
If it were interpreted, we would be running custom.bas into qbasic.exe instead of clicking an .exe file.
And it now uses FreeBasic as its programming language. |
|
Back to top |
|
 |
Rinku

Joined: 02 Feb 2003 Posts: 690
|
Posted: Sun Feb 11, 2007 11:23 am Post subject: |
|
|
I'm not talking about the Ohrrpgce itself, I'm talking about *games* made in the Ohrrpgce -- those are interpreted (via the Ohrrpgce). Plotscripts are not compiled. _________________ Tower Defense Game |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sun Feb 11, 2007 11:26 am Post subject: |
|
|
*re-reads your post*
No. You were definitely talking about the OHRRPGCE itself. |
|
Back to top |
|
 |
Rinku

Joined: 02 Feb 2003 Posts: 690
|
Posted: Sun Feb 11, 2007 11:32 am Post subject: |
|
|
I still don't see how you're misreading it. It's kind of obvious that I wouldn't mean that the editor itself isn't compiled. But if this is any clearer: the language used to create the Ohrrpgce engine itself doesn't determine the speed of Ohrrpgce games, because it's an engine that works through interpretation of those games. _________________ Tower Defense Game |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sun Feb 11, 2007 11:41 am Post subject: |
|
|
It still would. For one, we have Windows support now. Two, if it were coded in C and was heavily optimized, it might render games' graphics much faster.
You are confusing the programming language that OHRRPGCE was written in to how it reads data. Yes, it interprets plotscripts, but scripting languages in general are like that anyway. The game itself, however, would be loaded into ram, including the plot scripts that were compiled into the .rpg file. If the game were interpreted, game.exe would be constantly checking the .rpg for that new graphic, which searching the hard drive would be MUCH slower than just getting it from RAM. You can tell that a game is loaded into RAM when some of the larger ones take longer to load at startup. |
|
Back to top |
|
 |
Rinku

Joined: 02 Feb 2003 Posts: 690
|
Posted: Sun Feb 11, 2007 12:02 pm Post subject: |
|
|
As far as I know, Windows programs are no faster than DOS programs, it's not the operating system that determines a program's speed. And, I believe the Ohrrpgce uses the Allegro Library (I heard this mentioned once?), which is what handles the drawing, and that library would work no faster if it were called from C than if it were called from FreeBasic or from anywhere else. Even if it doesn't use Allegro, it probably uses some external graphics library, perhaps even DirectX, and those are independent of the language.
By game, in your second paragraph, do you mean the game resources, or the game logic? I don't really follow your second paragraph, could you rephrase it? _________________ Tower Defense Game |
|
Back to top |
|
 |
Newbie_Power

Joined: 04 Sep 2006 Posts: 1762
|
Posted: Sun Feb 11, 2007 12:12 pm Post subject: |
|
|
The point is, FreeBasic is faster than QBasic simply because it can use SDL or Allegro to access the hardware in ways that QBasic wouldn't do as well at, and it's a 32-bit programming language, meaning that it would take advantage of processors a lot better. C and FreeBasic are both better than QBasic, and you were using C as an example, so I followed along.
game.exe IS the game logic, and it is compiled. The .rpg files are data for game.exe to play with. |
|
Back to top |
|
 |
Rinku

Joined: 02 Feb 2003 Posts: 690
|
Posted: Sun Feb 11, 2007 12:27 pm Post subject: |
|
|
I didn't mean that FreeBasic isn't better than QuickBasic (it never used QBasic, to my knowledge), it was a good idea to move it there.
A lot of the .rpg data is pretty logic-related. For instance, data which leads one textbox into another, data which determines which NPC appears where and which textboxes they link to, door linking data -- it's still interpreting that data into the rules of the game. Technically it's just numerical data that the compiled code reads and uses, but technically anything on the computer is numerical data, including compiled code. There's no real difference between interpreting a plotscript and interpreting a bunch of numerical textbox connection "fake plotscripting" data. I doubt the change to FreeBasic from QuickBasic had any appreciable difference in the speed of either of those kinds of interpretation. _________________ Tower Defense Game |
|
Back to top |
|
 |
|
|
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
|