DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[4GW] Extra Lives & Checkpoints
Page 1 of 1
DieHard Wolfers Forum Index -> Feature Fanatics View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Tue Dec 18, 2007 7:07 am
   Subject: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Three things, though two of them don't deserve their own posts:

Firstly, "lives" in Wolf3D. As there are (quick)save/load features, which don't reset your weapons when you die, what is the point of the "lives" mechanic? I've got is so that it reverts to the players state (health,ammo,weapons etc.) at the start of the level upon death instead, but this still seems a bit weak compared to simply reloading as you'd be at the start of the level again, with one less life.

Essentially, what incentives do you think would be enough to stop someone reloading a save and just accept the respawn? I've been thinking about adding 'checkpoints' (as a bonus object), so a player would respawn from there(/then) instead of the start of the level. This is easy enough to do in the code but would double the size of any saved game - not a concern for 4GW, though, but I'm not sure this is the best course of action.




The other two things aren't features but I don't want to spam up the forums by asking them elsewhere, so...

2) As Wolf runs in 320x200 res, which aren't the ratios for modern monitors, do you get the game stretching vertically to fit your monitor (as I do) or appearing as a band in the middle? I'm having to squish circles in my graphics to have them look correct in game, and I'm suddenly worried that this won't be the same on anyone else's system.

3) EDIT: question was about copyright, but I found the EULA among the source files for Borland. I think I'm ok with using other (cleared) copyrighted material (graphics, sounds, concept) with the Wolf source, unless any of you think different?

Thanks!
the_fish
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 16 Jan 2018

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Tue Dec 18, 2007 12:12 pm
   Subject: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This was one of the ideas that I've come up with for Mansion X, I've still got plenty graphics work to do before I'll be able to go ahead with coding.

These checkpoints should probably based on an autosave feature, and upon dieing that game should automatically load the last autosave - which means the game will have to create an autosave the moment the player starts a level...





PS the_fish: Can you give me the code for more than two map planes for WOLF4GW.

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Tue Dec 18, 2007 1:05 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah, I was thinking the quickest way would be some kind of autosave...but one that runs in parallel to any normal save file so that loading a save game will load your checkpoint into the dedicated checkpoint file. I think I'll have a go at coding this tonight, it sounds like it'd be worth it. Unless anyone else can think of a reason why lives are better as they are?

Re: extra mapplanes...sheesh you guys want this badly, huh. The way I got it working was a dirty hack: I bypassed the existing map routines and made it load my own map format from my own file. This requires a dedicated level editor, which isn't ready for public release quite yet because I'd have to write documentation for it and clean up the interface. Secondly there is no compression on these levels - each is about 45kb in size (inc custom headers) - but they zip nicely for distribution purposes.

You can either do what I did, which uses basic stdio.h stuff, or find a workaround using just 3 mapplanes, which can do an awful lot by themselves. I'm only using 5 in total - one is a dedicated lightmap, the other is a data/control plane which allows me to connect objects using 'circuits', map-based logic/timer structures, setting orientation of directional sprites etc. Both of these are essential due to the scope of my project.

I'm not going to release this stuff now because it's not ready yet. But don't worry, when I finally unveil my mod (soon...a month or so? but no promises), assuming I can get it approved, I'll probably need to outsource my level design for the remaining episodes. This'll require me to shape up the mapeditor and write proper documentation for it (don't worry, it's been designed to be highly customiseable), and I'll give you the code then.

_________________
Mostly away: revising for finals (argh!)
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Dec 18, 2007 6:36 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Haasboy - Supposedly, the Wolf4GW code I have at hand does floor/ceiling textures, which I can base on Plane 3. I just have to enable something. If you like, once I get that part of the code working, I can E-Mail you the files. The version will be using hi-res images, though ...
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 16 Jan 2018

Topics: 58
Posts: 581
Location: South Africa, Johannesburg
southafrica.gif

PostPosted: Tue Dec 18, 2007 8:00 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Tricob wrote:
Haasboy - Supposedly, the Wolf4GW code I have at hand does floor/ceiling textures, which I can base on Plane 3. I just have to enable something. If you like, once I get that part of the code working, I can E-Mail you the files. The version will be using hi-res images, though ...
Thanks Tricob, but I already have written the code for floor/ceiling textures, it even has shading implement, directional sprites and hi-res, I've just got to find the disk that I hid it on...

Anyway thanks the_fish.....

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 1:41 ago.

Topics: 37
Posts: 2411
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Tue Dec 18, 2007 8:28 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@the_fish - This was exactly why I took the lives out if my mod. I also took out the score, but that's completely unrelated. In my mod, if you die, you die (except in my planned multiplayer mode which I have no idea how to do!).
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Wed Dec 19, 2007 6:53 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah, I know the concept of lives (and score) is outdated, but I wanted my mod to have a retro feel, which meant I had to keep both of those in. I've still reimplemented them though Smile

Anyway, I sorted out the checkpoint code - this works for me, at any rate, and should even work in Borland:

Prototype these in WL_GAME.cpp and in WL_DEF.h (in the appropriate section if you want to be tidy...in the WL_GAME bit. search for it)
::: CODE :::
void SaveCheckpoint(void);
void LoadCheckpoint(void);
void MoveCheckpoint(bool isLoad, int iLocation);


And then somewhere later in WL_GAME.cpp...
::: CODE :::
//
//  CHECKPOINT FUNCTIONS
//
#define CHECKPOINT_PATH "CHKPOINT.WL6"
#define CHECKPOINT_STEM "SAVECHK"

void SaveCheckpoint(void)
{
    int handle;
    char input[32] = "checkpoint file";

    unlink(CHECKPOINT_PATH);
    handle=creat(CHECKPOINT_PATH,S_IREAD|S_IWRITE);

//  _dos_write(handle,(void far *)input,32,&nwritten);
    write(handle,input,32);   //ignore first 32 bytes...used for savename, which we don't care about here
    lseek(handle,32,SEEK_SET);
    SaveTheGame(handle,0,0);
    close(handle);
}

void LoadCheckpoint(void)
{
    int handle;
   
    handle=open(CHECKPOINT_PATH,O_BINARY);
    lseek(handle,32,SEEK_SET);
    loadedgame=true;
    LoadTheGame(handle,0,0);
    loadedgame=false;
    close(handle);
   
    DrawFace ();
    DrawHealth ();
    DrawLives ();
    DrawLevel ();
    DrawAmmo ();
    DrawKeys ();
    DrawWeapon ();
    DrawScore ();
   
    ContinueMusic (lastgamemusicoffset);
    // THIS LINE INTENTIONALLY LEFT BLANK
}

// copies checkpoint files to another location, overwriting what's there (doesn't error check or backup...dangerous)
// if anyone has a better file copying method, please share... (ALSO IS CRAZY MIX of C and C++.  needs stdio.h
// included in wl_def.h if not done so already.
void MoveCheckpoint(bool isLoad, int iLocation)
{
    char chTarget[13];
    char chTemp;
    int iTemp;
    FILE *pF1, *pF2;

    sprintf(chTarget, CHECKPOINT_STEM "%u.WL6", iLocation);

// loads from pF1 to pF2, so get them the right way round
    if (isLoad)
    {   pF1 = fopen(chTarget, "r");
        pF2 = fopen(CHECKPOINT_PATH, "w"); }
    else
    {   pF1 = fopen(CHECKPOINT_PATH, "r");
        pF2 = fopen(chTarget, "w"); }

    while ( 1 )
    {
        iTemp = fread(&chTemp, sizeof(char), 1, pF1);
        if ( !feof(pF1) && iTemp )
            fwrite(&chTemp, sizeof(char), 1, pF2);
        else
            break;
    }

    fclose(pF1);
    fclose(pF2);
}


The commented "dos_write" line was commented in Ripper's 4GW code for saving the game: I'm not sure whether this is needed in Borland, but it's worth checking CP_savegame in WL_MENU.cpp to find out (look at the quicksave code).

Search WL_GAME.cpp for 'SetupGameLevel' and add
::: CODE :::
if (!loadedgame) SaveCheckpoint();
just before the end of the function (EDIT: THIS LINE HAS BEEN CHANGED).

Now open WL_MENU.cpp and search for 'SaveTheGame'. Everytime you find it, add
::: CODE :::
MoveCheckpoint(false, which);

beneath it.

Do a similar search for 'LoadTheGame', and add
::: CODE :::
MoveCheckpoint(true, which);

beneath THOSE lines.

ALMOST THERE!!! The game will now keep track of your checkpoints, but won't load from them. Search WL_GAME.cpp again for 'void Died', and declare
::: CODE :::
int tempLives;
just inside it. Search that function for:

At the bottom of the Died function, in the if statement that controls respawning, look at the lines which setup your respawning player (gamestate.health = 100 stuff), and replace them with:
::: CODE :::
tempLives=gamestate.lives;
LoadCheckpoint();
gamestate.lives = tempLives;


That's it! At least, I think that's it...I'm now getting the 'Get Psyched!' screen when I die, which I don't remember before...I'll investigate this later.

Also, at the moment it will only save a checkpoint at the start of the level, which is fairly useless and a waste of time and memory. The 'SaveCheckpoint()' function can be called from anywhere in your code to set the checkpoint to there/then. Bear in mind it causes a slight delay (0.5 sec for my system) when called, because its shunting many kb of data around, so you may want to code up some sort of notification that tells your player what's going on.

I've tied mine to a bonus object:
::: CODE :::

case    bo_checkpoint:
        SD_PlaySound (CHECKPOINTSND);
        // IMPORTANT!!! remove from list before save
        check->shapenum = -1;
       
        // TODO: insert notification (and screen refresh) here
        SaveCheckpoint();
        SetMessage("++ CHECKPOINT SAVED ++", 0x0f, 0);
               
        break;

But that's only sample code, so don't cutnpaste it because it won't work for you.

Huh, guess this should be in the Code Crackers section now. Can anyone give an answer to my other question, about screen stretching? It's kinda crucial for my project, and will take approx 1 second to answer Smile.

Cheers,
the_fish


Last edited by the_fish on Thu Dec 20, 2007 10:16 am; edited 2 times in total
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Wed Dec 19, 2007 6:58 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

the_fish wrote:
Can anyone give an answer to my other question, about screen stretching? It's kinda crucial for my project, and will take approx 1 second to answer
Uh, no - It's not a one-second answer. The size of 640x480, 320x240, and 320x200 on many monitors in adjustable, so what looks great on one monitor will look slightly different on others. There won't be a dramatic difference overall, though. At any rate, feel free to get feedback from one or two other Wolfers on the graphics if you're really concerned. Smile

BTW, you shouldn't get those "bands" you're talking about. I've only seen them when playing CGA-based games like "Tank". Today, monitors "shrink" the screen vertically and horizontally by leaving a black background where the graphics screen doesn't fill things in. Shrink the size enough, and the screen is in the shape of a large rectangle, with a black background around it, so no "bars" should show. If you "shrink" a monitor only vertically or horizontally only, things usually look pretty goofy. I haven't seen anyone keep such a monitor setting for long, except some dude who was stoned silly, and who clearly wasn't all there. Confused
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Thu Dec 20, 2007 7:24 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks Tricob - what I meant was for individual Wolfers to give their answer about their own system, which wouldn't have taken long, though I appreciate the in-depth response. I mentioned it as my monitor 'auto-adjusts' for different resolutions, making them fill up the entire screen - I have no fine control. And there is a noticeable difference - the screen is stretched vertically by 20%.

Can DOS output in 320x240? If so I might try and edit the code so that it does this, and draw to a 320x200 rectangle 20 pixels from the top.

Failing that, I'll probably look around for an older monitor. Smile

(BTW bug in the above code, i'm about to edit a correction)

_________________
Mostly away: revising for finals (argh!)
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 15 Oct 2017

Topics: 22
Posts: 1281
Location: Rauma - Finland
finland.gif

PostPosted: Thu Dec 20, 2007 8:28 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

::: CODE :::

void LoadCheckpoint(void)
{
    int handle;
    FILE * pF;


That file pointer is unused. Also there's an extra line break right before the end of that function, something removed? Wink

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Thu Dec 20, 2007 10:14 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Oh yeah, I was using that file pointer for bugchecking. I eventually found the problem to be the LoadTheGame function calling 'SetupGameLevel' again (which was irrelevant in my code, as I'm saving all planes / linked lists to the file, but for some reason I left it in). The fix is posted above.

I'll edit that out.

_________________
Mostly away: revising for finals (argh!)
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Thu Dec 20, 2007 9:24 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

the_fish wrote:
Can DOS output in 320x240? If so I might try and edit the code so that it does this, and draw to a 320x200 rectangle 20 pixels from the top.
DOS can in fact run this mode, but some graphics cards don't support it. BC 3.1 might not, either.

Also keep in mind that the original code of Wolf3D uses the MCGA mode, which "swaps" screens by taking what's in Video Memory and pasting it onto the screen. The 320x240 might not work that way, although I don't really know one way or the other. I'd recommend you look over the Ken's Labyrinth code (which has the option of 320x240) to help you out here. Smile
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Fri Dec 21, 2007 10:58 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks for the info. I had a look just now at the Ken's Labyrinth source and it's a disorganised nightmare! Everything's in one big c file with barely any commenting. I'm surprised he managed to get an engine up and running...

It looks as if the commands I want will probably be written in assembly code anyway, which I can't read fluently so I doubt I'd have much hope of finding them. From what I can glean from the internet, 320x240 requires the VGA to run in 'Mode X' or something. I'd need to buy a book to make proper sense of this.

Now then, to find a normal monitor!

_________________
Mostly away: revising for finals (argh!)
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Fri Dec 21, 2007 8:47 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It's too bad you don't live in my city or are currently visiting it. A thrift shop nearby here is selling at least three monitors, none of which are new. I imagine one of them is bound to do what it is you want. Smile
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 1:41 ago.

Topics: 37
Posts: 2411
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Sat Dec 22, 2007 12:16 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

the_fish wrote:
...one is a dedicated lightmap...

I know this is off topic, but please, do tell!
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Sat Dec 22, 2007 2:57 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

hee hee hee

Soon, I promise you. I'm really proud of this feature (which is a natural extension of Ripper's shading code), and I don't want to give away the code so that someone can release a mod with it in before I do. After initial release I'll see what I can do.

For now, here's a montage of screenies (was originally going to be one, but then I got carried away):


(the blacked out bits in the final shot would give too much away if revealed...)

Seriously, soon.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sat Dec 22, 2007 9:50 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It's ashame I'm not familiar with geometrics like you obviously are. I imagine I'd have been able to figure out how the heck you did that. Smile
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 15 Oct 2017

Topics: 22
Posts: 1281
Location: Rauma - Finland
finland.gif

PostPosted: Sat Dec 22, 2007 11:54 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Propably gorau shaded, that algorithm itself isn't actually too complicated, but making this all to wolf and in realtime, that's really something.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Sun Dec 23, 2007 7:25 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Gorau? No idea what that is. Studying maths at uni helps with the vectors though Smile

Anyway, the shots you're seeing above are averaging 65-70fps on my 3GHz machine (I'm assuming that processor speed is the limiting factor here?). I've added an option in the menu for reducing the shading level, which might be better if slower machines have a problem.

Essentially, the lightmap is a 64x64 plane like any other. I get the exact position of each pixel (for flats and walls) in this 'top down' view, and then smooth the shading using a reasonably simple function between tiles (could be Gorau, for all I know). Sprites are shaded depending on the tilex,tiley they're currently in.

The tricky part was getting the flashlight to work properly - this works on the offset of the drawn pixel relative to the centre of the view (radius), as well as the distance from the player (Ripper's ydist). The problem here is that all the drawing routines seem to use different variables to draw stuff to the screen, so I had to figure it out by hand (ScaleShape/Scale3DShape were a nightmare).

I used to have the lightmap generated in SetupGameLevel as an inverse square function from lightsources (expensive, but it only runs once), but that didn't work so well (I had to put lightsource objects in for any light, and then I had to blur the lightmap several times else it looked wrong). The rocket explosion above is lit in real time with a calculated change to the lightmap when it changes state or changes tile position: I can now have all my actors lit to some degree, mainly during firing sequences to simulate muzzle flash. This dynamic system also allows me to switch some lightsources on and off in-game (the top-right screen has a flickering light that turns on and off randomly every half second).

It's weird, but the system that controls the flickering is part of the DataPlane, and for me that's more innovative and powerful than the lightmap, but of course it's not as pretty Smile

AND this links into the topic because the flashlight appears oval in the above screens, but circular ingame for me in 4:3 ratio. However, an ovular flashlight doesn't look too bad, it's more NPC stretching that I'm worried about (freakishly tall/squat people!)

EDIT: Just read up on Gouraud Shading. I guess that's essentially what I'm doing here, except my 'polygons' are squares with vertices at the midpoints of each grid tile, it's not calculating surface normals (instead, light intensity), and my interpolation function's my own.
Dean
Moderator
<B>Moderator</B>


Joined: 10 Jan 2006
Last Visit: 18 Jan 2018

Topics: 52
Posts: 2189
Location: Australia
australia.gif

PostPosted: Sun Dec 23, 2007 2:16 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

WOW, looks spectacular Fish, that looks so much better than the older style with the different coloured grey bands. I can't wait so see your mod and all the the changes you've made, good luck with the rest of it.

_________________
The Wolfenstein 3d Blog
The Wolfenstein 3d Blog is now on Facebook!

"Strong minds discuss ideas, average minds discuss events, weak minds discuss people" - Socrates
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun Dec 23, 2007 10:13 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

the_fish wrote:
Anyway, the shots you're seeing above are averaging 65-70fps on my 3GHz machine (I'm assuming that processor speed is the limiting factor here?). I've added an option in the menu for reducing the shading level, which might be better if slower machines have a problem.
You can check how much it reduces the framerate by running it in DOS Box; a lower amount of CPU Cycles decreases the "processor speed" of the computer DOS Box emulates. I've been running my Wolf4GW-based EXE in it with no problems. Let me know if you want the CONF file I use with DOS Box. Smile
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 1:41 ago.

Topics: 37
Posts: 2411
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Thu Dec 27, 2007 6:48 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Meh. I get 65-70 fps on the MMC file without DOSBox and with shading off. Smile Looks very, very nice. Would it also work with coloured lighting?
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Thu Dec 27, 2007 9:20 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It should, but it may require some changes the code tutorial doesn't mention. When I get the Shading Tutorial working, I can let you know. Smile
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Fri Dec 28, 2007 9:01 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Did I not post a 4GW fix to the shading tutorial? If not, ask me if theres anything specific I can do to help - it's been a while but I can look over it in my code.

With regard to coloured lighting...it won't work without major restructuring of the routines. Ripper's shading table works by generating a series of 32 'shades' for each of the 256 colours, corresponding to light intensity. If you want coloured shifts, you'd need to multiply this again by however many shifts you wanted...e.g.

256 colours x 8 red x 8 blue x 8 green

which is 16 times as large as the current shadetable (130kb?), but only gives you 8 levels of brightness. On top of this you'd have to make your lightmap RGB instead of simply one variable for intensity, and any interpolation between tiles that you do will be three times slower.

Personally, I'd prefer the 32 brightness levels over a feature that I'd use sparingly, as it would simply look better.

If however you simply want a uniform colour offset over your entire level, you can adjust the shadetable generation to do this for you. If you're interested in this, I can post the relevant code.

_________________
Mostly away: revising for finals (argh!)
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 3:20 ago.

Topics: 161
Posts: 8031
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Fri Dec 28, 2007 10:03 pm
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

the_fish wrote:
Did I not post a 4GW fix to the shading tutorial? If not, ask me if theres anything specific I can do to help - it's been a while but I can look over it in my code.
Haven't looked to be honest; I'm not even close to putting in the code for the shading yet. Sad I prefer to have Animated Sprites and Directional Objects working in my code before I "enter Shady Lane". LOL I'm currently enabling the Animated Sprites. Smile
the_fish
Bring 'em On
Bring 'em On


Joined: 18 Nov 2006
Last Visit: 07 Nov 2008

Topics: 12
Posts: 133
Location: England
uk.gif

PostPosted: Sat Dec 29, 2007 6:24 am
   Subject: Re: [4GW] Extra Lives & Checkpoints
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Directional objects need a fix in the assembly, which I posted in that tutorial thread (though I've recently noticed a bug if the object rises as high as your viewpoint i.e. 32/64 pixels...if parallel to the object around its midpoint, you sometimes get the whole screen filled with the same colour pixel from your sprite. I'll look into it after I've ported to SDL).

I think shading is already in, actually: just #define SHADE_COUNT somewhere prominent and it *should* all be taken care of through #ifdef s...

_________________
Mostly away: revising for finals (argh!)
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Feature Fanatics View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Wolf3D and voxels
Author: Ripper
10 3087 Sat Mar 24, 2007 3:35 pm
Dugtrio17 View latest post
No new posts Isn't it a bit cloudy today?
Author: Ripper
47 6327 Mon May 24, 2004 12:38 pm
Ripper View latest post
No new posts New points system!!!!
Author: Raistlin
6 1606 Sat Apr 17, 2004 7:42 am
jamez View latest post
No new posts Stranger Weapons in TC's
Author: Majik Monkee
22 4697 Mon Feb 02, 2004 4:29 am
Guest View latest post
No new posts Reloading weapons
Author: wolf3dbreaker
26 4465 Wed Jul 02, 2003 12:05 pm
jamez View latest post
 
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


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group