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       

JWolfenstein 3D
Page 1 of 1
DieHard Wolfers Forum Index -> Beta Breakers 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
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Tue May 13, 2008 12:52 pm
   Subject: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I've been secretly working on a different Wolf3D port. This one in Java using JOGL (OpenGL for Java). I thought Java would be the way to go for becoming OS-independent, but I didn't know about SDL at the time.

Anyway, a screenshot can be found here. It's scaled 42% from 640x480 to meet the size requirements in the image gallery. The 367 is my FPS. I also have the music and adlib sounds playing because I ported MAME's OPL emulation over to Java.

It's probably only 25% done, but it also has a lot of code redesign to be more object oriented and hopefully faster to extend and modify than the original code. The only things that *might* take awhile are the menus and intermission screens. I haven't worked on them at all yet.

example:
::: CODE :::
public class Item {
   protected Float x;
   protected Float y;
   protected int texture;
   
   /**
    * Creates and positions a new item.
    * @param   x         the x-coordinate
    * @param   y         the y-coordinate
    * @param   texture      the item's texture
    */
   public Item(int x, int y, int texture) {
      this.x = x + 0.5f;
      this.y = y + 0.5f;
      this.texture = texture + Defines.SpriteTextures.SPR_STAT_0.getTextureNumber();
      WorldMap.setItem(x, y, this);
   }
   
   /**
    * Tests for visibility.
    * @return   true when visible and should be drawn
    */
   public boolean isVisible() {
      return (WorldMap.isTileVisible(x.intValue(), y.intValue())) && (texture > -1);
   }
   
   /**
    * Returns the item's x-coordinate.
    * @return   tileX
    */
   public Float getX() {
      return x;
   }
   
   /**
    * Returns the item's y-coordinate.
    * @return   tileY
    */
   public Float getY() {
      return y;
   }

   /**
    * Returns the item's texture.
    * @return   texture
    */
   public int getTexture() {
      return texture;
   }
}


::: CODE :::
public class GrabbableItem extends Item{
   /**
    * Creates and positions a new item.
    * @param   x         the x-coordinate
    * @param   y         the y-coordinate
    * @param   texture      the item's texture
    */
   public GrabbableItem(int x, int y, int texture) {
      super(x, y, texture);
   }

   /**
    * Grabs the item.
    */
   public void grab() {
      WorldMap.clearItem(x.intValue(), y.intValue());
      texture = -1;
   }


::: CODE :::
public class WeaponItem extends GrabbableItem {
   GameState.WeaponTypes weaponType;
   /**
    * Creates and positions a new item.
    * @param   x         the x-coordinate
    * @param   y         the y-coordinate
    * @param   texture      the item's texture
    * @param   weaponType   the weapon to give
    */
   public WeaponItem(int x, int y, int texture, GameState.WeaponTypes weaponType) {
      super(x, y, texture);
      this.weaponType = weaponType;
   }
   
   /**
    * Grabs the item.
    */
   public void grab() {
      GameState.giveAmmo(6);
      GameState.giveWeapon(weaponType);
      super.grab();
   }
}


New guards are handled in a similar fashion. They all extend the "Actor" class. Example: Player extends Actor. Guard also extends Actor. SS extends Guard. etc.

I also plan to release the code under a license similar to (if not the same as) the one Wolf4SDL has.

Anyway, I'll probably kick myself later for letting the cat out of the bag because this is a "when it's done" project with a slow pace due to time constraints.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Thu May 15, 2008 3:47 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Nice project! From the screenshot it isn't fully clear, whether you use nearest-neighbour mapping or some blury interpolations. I hope it's the first one as in WinWolf3D (I really dislike those blury OpenGL ports).

TexZK told me, he was also going to make the actor stuff more object oriented for Wolf4SDL. I didn't touch that because Wolf4SDL is meant to be mostly compatible with easier tutorials, though I don't know if that goal was really reached.

It's funny to see in your screenshot, that the game view has no borders as in Mac-enstein! I just added this view size to Wolf4SDL on Tuesday Wink

_________________
Life is an awful game, but the graphics resolution rocks ;D
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Thu May 15, 2008 5:40 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks, Ripper. Oh, I hate that blurriness, too! Images scale like they do in WinWolf3D. I think I like it being object oriented. At first I was going for the "try to be as close to the original source as possible" route like Wolf4SDL, but then I thought that making it OO makes it simpler. The actor stuff really gets simpler. Like when SS extends Guard, the only things in the SS class are the actorstates, A_SightScream, and A_DeathScream. Though looking at quickly this morning, it looks like I also need to add a modified A_Shoot because SS has a different attack sound.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Thu May 15, 2008 11:34 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'm working on a SDL+OpenGL indipendent project, too, but it's not a remake of Wolf3D, even if it will be much similar.

Excellent work Adam!!!
UnderHW
DieHard Guard
DieHard Guard


Joined: 21 Jul 2006
Last Visit: 05 Jan 2013

Topics: 20
Posts: 287

blank.gif

PostPosted: Fri May 16, 2008 8:29 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

off-topic Damn you, Adam, I been look for java editor that editing the source code for JAVA what I have on disk where I was download it from.... Java programming files not found on one of these website I usually visited there, Sun does not have a kind of software...

Filename usually Program.java out of off-topic


Good work!! how you do this to original code???

_________________
This Forum makes me bored......
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Tue May 20, 2008 5:43 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@TexZK: Thanks. I'd like to start my own independent project based on something similar to this, too.

@UnderHW: I've used JCreator as my IDE, but lately, I like the GEL IDE even though development has pretty much been stopped.

It's really not so hard to convert this code to Java and for the raycaster is based on the WinWolf3D raycaster, which is based on the one described here.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Thu May 22, 2008 2:04 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Does the WinWolf3D raycaster also produce holes in wall cants when the ray would exactly hit the cant while looking northwest?

_________________
Life is an awful game, but the graphics resolution rocks ;D
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Thu May 22, 2008 2:42 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hmm, I figured it would, but in testing, I did not see it. Maybe I didn't have it aligned just right...

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Ripper
Code Master - Developer
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008

Topics: 21
Posts: 527
Location: Germany
blank.gif

PostPosted: Thu May 22, 2008 4:25 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It's quite a hassle to reproduce it in normal Wolf or Wolf4SDL. Without using a mouse it's nearly impossible. Today I again tried to get some insight in it, but didn't find a solution, yet.

_________________
Life is an awful game, but the graphics resolution rocks ;D
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Thu May 22, 2008 4:35 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ahhhh, now I know why WW3D and JWolf3D don't have the problem. I do pseudo-raycasting. When I hit a wall, I draw that entire wall and skip drawing it if it's ever hit again that frame (to avoid redraws and speed things up). So even if the ray passes through that corner, the two walls on each side are being drawn in their entirety anyway, so the little see-through sliver is not there. I get by with this since I'm using OpenGL or DirectX to draw textured triangles/rectangles. I'm not sure if SDL does this or not.

I don't think you can get around it when drawing each ray's post individually. I don't think it's mathematically possible, unless you nudge your wall check so it can never be perfectly on the corner or something.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 5:04 ago.

Topics: 160
Posts: 8008
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Thu May 22, 2008 8:44 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Ripper wrote:
It's quite a hassle to reproduce it in normal Wolf or Wolf4SDL. Without using a mouse it's nearly impossible. Today I again tried to get some insight in it, but didn't find a solution, yet.
The way to view it at this angle is to back up against a wall at an angle, so you slowly strafe to the left or right of the map. I did this a lot to aim my gun when playing on a super-choppy 80286 machine. Very Happy
Widersacher
Can I Play Daddy
Can I Play Daddy


Joined: 08 Sep 2008
Last Visit: 05 Dec 2010

Topics: 1
Posts: 28

germany.gif

PostPosted: Mon Jan 19, 2009 2:35 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Adam Biser wrote:
I've been secretly working on a different Wolf3D port. This one in Java using JOGL (OpenGL for Java).


You are manually converting the c-code to java Shocked
sounds like much work?
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Mon Jan 19, 2009 2:53 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Converting the C to Java isn't that bad. Most of the MAME's OPL emulation conversion went this route. The main problem is that Java lacks unsigned bytes, which meant I had to double check the methods used on them. The main thing with this was converting the old code into newer object-oriented code. I have to restart work on this. It would be a fun project and easier to mod, I think, too.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Widersacher
Can I Play Daddy
Can I Play Daddy


Joined: 08 Sep 2008
Last Visit: 05 Dec 2010

Topics: 1
Posts: 28

germany.gif

PostPosted: Mon Jul 06, 2009 8:30 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I would like to know the status of this project. Is it finished yet? Smile
My virtual machine aches to play.
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Mon Jul 06, 2009 8:37 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sorry, no it hasn't. I did make some progress on it when I went into the code a couple months ago. It now uses OpenAL which made the audio code considerably simpler and easier to maintain. I'm anxious to get enough time to dedicate to this project and finish it also. Sad

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Fragstein3D
DieHard Guard
DieHard Guard


Joined: 06 Dec 2009
Last Visit: 17 Mar 2010

Topics: 13
Posts: 200


PostPosted: Thu Dec 31, 2009 11:59 pm
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I feel ripped off, i was expecting everything to be all 3D like that Jdoom port of Doom.

Oh well, Java! hmm you can play it from a website right?
Haasboy
DieHard Officer
DieHard Officer


Joined: 23 Jul 2003
Last Visit: 04 Dec 2017

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

PostPosted: Fri Jan 01, 2010 12:25 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

No he's creating an alternative port, similar to what SDL is but using the language JAVA (that is if he is still busy with it), you've really got to read these posts correctly!!!!!!!!!!!!!!!!!!!!!!!!!

_________________
Haasboy Engine - Currently under construction (To be used with future mods - F.A.D.E.D. - Mansion X - Rising Evil Series)
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Fri Jan 01, 2010 3:45 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

You can run Java applications on your desktop, not just from a website. It is a project I still have up my sleeve, but the number of projects I have to work on just increased by a good bit now that I've changed to Windows 7 x64. No clue when it'll be finished.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Fragstein3D
DieHard Guard
DieHard Guard


Joined: 06 Dec 2009
Last Visit: 17 Mar 2010

Topics: 13
Posts: 200


PostPosted: Tue Jan 05, 2010 2:27 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Does it have possibility for Java phone game interactivity?
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Tue Jan 05, 2010 2:47 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I think JOGL and LWJGL aren't compatible with J2ME. Also, the ME is going to become deprecated, because it's rather and old standard, and current handheld computers are powerful enough to run Java 6 applications without much effort.

The best Java environment IMHO is LWJGL, which includes everything needed to build a decent game in Java. I hope they'll switch soon to Java 6 (maybe 7?) on handheld computers, and they will link JOGL/LWJGL to hardware graphics accelerators such the ones included in the latest Nokia phones (I have a N82 running Q3A!). iPhones, HTC and so on
.
Too bad C#, .NET and XNA are badly supported outside Microsoft's products, because such an environment really kicks 455 Wink
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Tue Jan 05, 2010 5:13 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It uses JOGL, JOAL, and Java 6, so anywhere those can be used *should* work. I've not looked into LWJGL.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Tue Jan 05, 2010 7:04 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

LWJGL is a package which includes JOGL and JOAL and simplifies some operations, such as window handling & co. I think you should give at least a look at it! Many projects got rid of pure JOGL/JOAL to use this comprehensive library - for instance, the huge Jake 2 - because of its semplicity, just like we're using SDL instead of native libraries.

Anyway, keep up the hard work! I hope to see it working on handheld devices without portability issues in the future Wink
And, I have spent much of my time in programming with Java, because C++ is too verbose sometimes, and with the right algorithms it's pretty fast nowadays (see comparisons on Jake2 vs Quake2). Oh, and Java is damned simpler to use!!! Beer

Java - C/C++
1 - 0


Any multiplayer project under the desk? Very Happy
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 12 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Tue Jan 05, 2010 7:28 am
   Subject: Re: JWolfenstein 3D
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

It was the Jake 2 project that inspired me to go the Java direction. It was obvious that Java had caught up. I'll take a look into LWJGL.

This project also uses some classes I've been working on that extract and compress data into the Wolf3D data files. Right now I've only finished the data reading portion, but I want to added data compression to it to and make it open source.

Example code for reading from and compiling to a VSWAP file:
::: CODE :::
      VSWAP vswap = new VSWAP(inFile);
      VSWAP.Writer writer = VSWAP.createFileWriter();
      int index = 0;
      // Add walls.
      System.out.println("Adding walls...");
      for (; index < vswap.getSpriteStart(); index++) {
         writer.addWall(vswap.get(index));
      }
      // Add sprites.
      System.out.println("Adding sprites...");
      for (; index < vswap.getSoundStart(); index++) {
         writer.addSprite(vswap.get(index));
      }
      // Add sounds.
      System.out.println("Adding sounds...");
      for (index = 0; index < vswap.getSoundCount(); index++) {
         writer.addSound(vswap.getSound(index));
      }
      writer.save(outFile);

Of course, all this code does in extract from one file and build another. An minor bonus is that it keeps track of where walls, sprites, and sounds should go, so I could have added the chunks in any order I wanted. Though each section will be ordered as they were given.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Beta Breakers 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 Havoc's Wolf3D Editor (HWE) - Version 0.3.12 released!
Author: Havoc
88 16343 Thu Mar 16, 2017 10:46 am
Havoc View latest post
No new posts Dreamcast Wolf4SDL (Wolf4SDL\DC)
Author: dcbasic
4 980 Sun Nov 01, 2015 12:16 am
AlumiuN View latest post
No new posts "Wolfenstein 3D: The Deluxe Edition" without bugs?
Author: Tricob
12 1501 Thu Mar 13, 2014 7:56 pm
Tricob View latest post
No new posts Project: Omega
Author: Crane
0 1421 Wed Sep 10, 2008 6:00 pm
Crane View latest post
No new posts Wolf3-D Shareware to Registered VSwap importer
Author: OBrasilo
0 1522 Tue Sep 27, 2005 3:07 pm
OBrasilo 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