Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Mario  (Read 4302 times)
0 Members and 1 Guest are viewing this topic.
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Posted 2007-01-26 05:14:39 »

Hey guys!

Here it is! Finally I figured how to get a WebStart game deployed. This is a Mario remake I've been working on for quite a while. I didn't want to release a beta until I got a nice working version, and here it is. It's far from finished, but well on it's way.

Here's a screenshot of the big Mario. Yup, I got both big and little Mario done. There's a couple things that needs to be worked out with big Mario, however.


And here's WebStart: http://www.myexh.com/~gonav341/Mario/Mario.php

There is scrolling in the game, however, you won't notice it because the level isn't big enough yet to scroll. Enjoy!

And please, I appreciate any comments, suggestions, questions, etc. Thanks for trying it out guys!

--Jamison

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline ChrisM

JGO Coder


Medals: 1
Projects: 1


END OF LINE.


« Reply #1 - Posted 2007-01-26 14:49:28 »

Good work! Keep it up!

-Chris

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #2 - Posted 2007-01-26 22:18:37 »

Thank you. Smiley

I don't like you. Check out my site Smiley www.gamedevforums.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eliwood

Junior Member




Stencyl


« Reply #3 - Posted 2007-02-01 22:59:52 »

Is it supposed to paint the screen in the top left corner and run at 30 FPS?

Video card is a GeForce Go 7800 and screen is 1920x1200x32.

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #4 - Posted 2007-02-02 05:28:09 »

It's fullscreen at 640x480x32 at 75mhz, but your monitor must not support that. I noticed that while I was testing it, even monitors that can go higher than that, it doesn't support fullscreen (most likely because of the high refresh rate). Hopefully I can correct this soon. And yes, it's supposed to run at 30 frames per second.

When fullscreen or display change is not supported, it runs in windowed mode. But since I can't use setUndecorated(false) after my Frame is displayable, I don't know what to do about getting the title bar and everything back.

Update
I made a quick modification to run it at 60mhz now instead of 75mhz. Maybe it will work in fullscreen for you now. I tried using setUndecorated(false) on my Frame if fullscreen or display mode change is not supported, but it doesn't work because my Frame is already visible when it's called. I spent about an hour and a half trying to fix it; I don't know what to do to make it decorated after it's already displayable.

Update
You should also notice I have moving platforms done.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Eliwood

Junior Member




Stencyl


« Reply #5 - Posted 2007-02-02 18:42:57 »

I am using a laptop (most laptops use 60Hz), so perhaps instead of hardcoding the refresh rate, you should vsync it.

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #6 - Posted 2007-02-03 04:24:41 »

That's a good idea. I'll fix that later. I'll also make another attempt at fixing windowed mode.

Also, what did you think of it so far?

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Kova

Senior Member





« Reply #7 - Posted 2007-02-03 14:31:41 »

everything seems to be ok Wink , but I don't like the way user input is being handled. Seems weird, if you hold one key and then press another and realease it, the first one also is canceled. About refresh rate, you could just leave it as it is, as in you don't specify it, just change resolution.
Offline Eliwood

Junior Member




Stencyl


« Reply #8 - Posted 2007-02-03 19:29:30 »

That's a good idea. I'll fix that later. I'll also make another attempt at fixing windowed mode.

Also, what did you think of it so far?

I'll lay off some super-specific stuff (about Mario mechanics) because I know they'll be solved in time. I have users pelt me about things I know I'll get done, so I'll spare you that. Smiley

However, I will comment on some other things that are not Mario-specific.

1) Are you using milliTimer or nanoTimer (or GAGETimer)? Somehow, the game feels jerky to me, and I suspect it's because of the timer. At the risk of making a pun, Mario will "jump" around a lot in the sense that some frames he progresses normally and others, he moves a lot farther than average.

2) Collision detection is fine, but just a little note - when he walks up to the pipe, he misses it by 5 pixels or so. Shrink his bounding box. Smiley

3) Related to timing, the game moves "too fast" for me. I don't know why, but it's like I turned on turbo mode in an emulator, and everything progresses at twice its normal speed.

Everything else seems fine at this point. Smiley

- Eliwood

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #9 - Posted 2007-02-04 00:22:52 »

1) Currently, I'm using the milliseconds timer (yes, I know, less precise).

2) If you play the orignal game, you'll notice it does the exact same thing.

3 I can't say why it runs that way. I've tested it out on three differant PCs, my desktop beast, my dad's PC (very slow), and my brother's pc (extremely slow pc). All times I was able to get 30 frames per second (my beast could get a maximum of 500, dad's pc got about 60, bro's pc got about 40 maximum) and it never seemed jerky. I ran it on Java version 1.4.0, however. It's compiled as 1.4.0. Ran the same with 1.5 and 1.6 on my desktop.

Thanks for the information!

I don't like you. Check out my site Smiley www.gamedevforums.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eliwood

Junior Member




Stencyl


« Reply #10 - Posted 2007-02-04 07:26:14 »

1) Currently, I'm using the milliseconds timer (yes, I know, less precise).

2) If you play the orignal game, you'll notice it does the exact same thing.

3 I can't say why it runs that way. I've tested it out on three differant PCs, my desktop beast, my dad's PC (very slow), and my brother's pc (extremely slow pc). All times I was able to get 30 frames per second (my beast could get a maximum of 500, dad's pc got about 60, bro's pc got about 40 maximum) and it never seemed jerky. I ran it on Java version 1.4.0, however. It's compiled as 1.4.0. Ran the same with 1.5 and 1.6 on my desktop.

Thanks for the information!

If you use a more precise timer like the GAGE timer (very tiny addition in filesize and cross-platform), 1 and 3 will be solved, especially 3 since I had the same problem too.

As for #2, check in the real game. I know this because I'm programming Mario too. Wink



(See that his mustache directly touches the pipe)

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #11 - Posted 2007-02-04 16:37:17 »

I have no idea what the GAGE timer is. So I'll attempt to use the nanoTimer. However, I was trying to avoid using this as it requires Java 1.5 and I always get the following warning:
1  
2  
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

I recompiled with that, and it give me warnings that every time I add something to one of my many Vectors. For example, I get the following:
1  
2  
3  
Sprite.java:46: warning: [unchecked] unchecked call to add(int,E) as a member of
 the raw type java.util.Vector
                frameImages.add(0, img);


As to number 2, you can see by the graphics in my Mario game, I am not creating the better-looking Mario game (the one on the GameBoy Advanced SP, I think).  I am creating the orignal GameBoy Color game. Which on my emulator and the orignal game, he was always like 4 pixels away from the pipe.

UPDATE
Okay, I fixed my timer to use nanoTimer and it seems to run better now. It doesn't seem like the framerate bounces around anymore (if I was limiting it to 60, it would bounce from 60, 61, and 63. Limiting to 30 would bounce between 30 and 33 sometimes). I also fixed my Vectors, wasn't as big of a hassel as I thought it might be. I recompiled with Java 1.5. Please try it again, and maybe it won't jerk around as much.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Kova

Senior Member





« Reply #12 - Posted 2007-02-04 19:07:03 »

just noticed now, you have a bug, you can't fall between those walls in the air. You can just cross to the other side if you move. For you to fall you have to try to put mario exactly in the middle.
Offline Eliwood

Junior Member




Stencyl


« Reply #13 - Posted 2007-02-04 19:07:26 »

GAGE timer's actually compatible with 1.4 and below, which is why I suggested that over the nanoTimer.

http://java.dnsalias.com/downloads/gagetimer-1.1.zip

If you have 1.5 installed, it will continue to use nanoTimer, otherwise it will use the native timer on 1.4 and below.

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #14 - Posted 2007-02-04 21:22:03 »

just noticed now, you have a bug, you can't fall between those walls in the air. You can just cross to the other side if you move. For you to fall you have to try to put mario exactly in the middle.
Yes, this will hopefully be fixed soon.

GAGE timer's actually compatible with 1.4 and below, which is why I suggested that over the nanoTimer.

http://java.dnsalias.com/downloads/gagetimer-1.1.zip

If you have 1.5 installed, it will continue to use nanoTimer, otherwise it will use the native timer on 1.4 and below.
Well, I'd rather stick to things that are built into Java. And especially now that I fixed the compiler warnings, it's better to use 1.5 - better speed.


Eliwood, where did you get your sprites for that Mario game? I was trying to find them for my game, but couldn't.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Mr_Light

Senior Member




shiny.


« Reply #15 - Posted 2007-02-07 12:48:22 »

Yes, this will hopefully be fixed soon.
actually I remember it beeing that messed in the original, euh not sure about the gameboy one I haven't played a color one on that, I'm refering to the NES, my NES's adaper broke years ago and all I had was batteries to come up with the right voltage as all the adapters I could cut up where to low in voltage

not sure if you implented it that way but he seems to break randomly. most of the time it walks left to right without pause I remember a pause and it's there but just randomly.

the whole speed thing and feeling like an emulator is probebly because he's always running you normaly have to hold down b.

all in all looks nice, some graphics I don't remember beeing in the original, the tree for example.

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #16 - Posted 2007-02-08 01:28:50 »

actually I remember it beeing that messed in the original, euh not sure about the gameboy one I haven't played a color one on that, I'm refering to the NES, my NES's adaper broke years ago and all I had was batteries to come up with the right voltage as all the adapters I could cut up where to low in voltage

not sure if you implented it that way but he seems to break randomly. most of the time it walks left to right without pause I remember a pause and it's there but just randomly.

the whole speed thing and feeling like an emulator is probebly because he's always running you normaly have to hold down b.

all in all looks nice, some graphics I don't remember beeing in the original, the tree for example.
Yes, it was like that in the orignal, however, I want to fix it.

Not sure what you by, "he seems to break randomly." Could you explain further?

The speed problem was because of my low resolution timer (milliseconds) - I was noticing it here and there, but not much. I'm now using a high resolution timer (nanoseconds) with Java version 1.5 (orignally written in Java 1.4).

The graphics were in the orignal game - I'm recreating from the GameBoy Color game Super Mario Bros. Deluxe.

By the way, I'm not making this game 100% like the orignal in all ways. Me and a friend will be implementing mini-games (he's currently not on the project with me yet, just me at the moment), new enemys types, much bigger levels, and new tile types (maybe even more than what's listed here). I want this project to be more of a unique remake.

Thanks for all the replies guys!  Grin
--Jamison

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline nva225

Junior Member





« Reply #17 - Posted 2007-02-08 02:35:50 »

By the way, I'm not making this game 100% like the orignal in all ways. Me and a friend will be implementing mini-games (he's currently not on the project with me yet, just me at the moment), new enemys types, much bigger levels, and new tile types (maybe even more than what's listed here). I want this project to be more of a unique remake.

Glad to here that. Not to squash anyone's enthusiasm or anything, but I always enjoy clones much more if people add things, enhance features, and otherwise give the game their own personal touch. Of course, the "first games" people make could hardly be expected to have groundbreaking features, since they're learning experiences (which should still be encouraged) but I get tired of seeing asteroids for the 5 millionth time when it's exactly the same as it was before.

Anyway, good luck with your Mario and hope your development does not encounter too many migraine inducing error messages. It looks and feels really good so far.
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #18 - Posted 2007-02-08 05:11:21 »

Glad to here that. Not to squash anyone's enthusiasm or anything, but I always enjoy clones much more if people add things, enhance features, and otherwise give the game their own personal touch. Of course, the "first games" people make could hardly be expected to have groundbreaking features, since they're learning experiences (which should still be encouraged) but I get tired of seeing asteroids for the 5 millionth time when it's exactly the same as it was before.

Anyway, good luck with your Mario and hope your development does not encounter too many migraine inducing error messages. It looks and feels really good so far.

Thank you! And I'm with you on the whole cloning games exactly like the orignal. But of course it's a learning experience; however, my first game was actually a strategy puzzle game (tile based, but implemented very badly).

UPDATE February 7, 2007
The level is now big enough for you to see the scrolling effect (the added bit of level area is a bit plain, however). Also the refresh rate has now been updated to use your current display mode's refresh rate.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Eliwood

Junior Member




Stencyl


« Reply #19 - Posted 2007-02-08 07:20:04 »

It's a lot smoother now, but when it scrolls, there's a tearing effect that makes all of the graphics wobble around a bit. Any idea why that's happening?

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #20 - Posted 2007-02-08 14:18:24 »

It's a lot smoother now, but when it scrolls, there's a tearing effect that makes all of the graphics wobble around a bit. Any idea why that's happening?
No, but I'm seeing this too. I thought it was just something in Java 2D, but I realized that no other Java game has this problem...

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Eliwood

Junior Member




Stencyl


« Reply #21 - Posted 2007-02-09 06:25:44 »

Are you using a BufferStrategy? That tends to diminish the effect a bit.

Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #22 - Posted 2007-02-10 02:09:26 »

Yes, I'm using BufferStrategy. However, I'm currently attempting to port to OpenGL rendering (with LWJGL). Do you think this may fix the problem?

UPDATE
Well, I made an attempt at using LWJGL to render, but it looked much worse. The alpha was not loading correctly (edges looked very odd), and the tearing was just as visible. So I dumped that idea.

I don't like you. Check out my site Smiley www.gamedevforums.com
Offline Roninator

Senior Newbie





« Reply #23 - Posted 2007-02-13 03:56:40 »

This is a nice little engine.
The physics are nice but it feels it can use just a little bit more friction or im just imagining things.
The scrolling is very smooth and well... works.
I found that mario actully speeds up mid-jump when you just hold the up button.
Other then that keep up the good work!

*Roninator*
Offline Jamison

Junior Member




We're all idiots in one way or another.


« Reply #24 - Posted 2007-02-13 14:15:12 »

Thanks for testing, Roninator. And I kind of felt the same way about the friction, I've been playing around with it getting it as close as possible to the orignal. But as I said brefore, this will be a more unique game. Not like most mario-clones. Currently I just have to work out all these little details.

UPDATE
I have located the tearing problem. It has something to do with the FSEM (fullscreen exclusive mode). As I took it out of fullscreen, and there was no problem - looked great. However, I'm still not sure how to fix this. Maybe my fullscreen code isn't any good?
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
      // Create the Frame.
     frame = new Frame("Mario");

      frame.add(this);
      frame.setResizable(false);
      frame.setUndecorated(true);

      frame.pack();
      frame.setVisible(true);

      // Initialize the back buffer.
     createBufferStrategy(2);
      buffer = getBufferStrategy();
      screen = (Graphics2D)buffer.getDrawGraphics();

      // Set the display mode and enter fullscreen mode.
     GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
      if (gd.isFullScreenSupported()) {
         gd.setFullScreenWindow(frame);
         if (gd.isDisplayChangeSupported()) {
            try {
               int refresh = gd.getDisplayMode().getRefreshRate();
               gd.setDisplayMode(new DisplayMode(gameW, gameH, 32, refresh));
            } catch(Exception e) {
               gd.setFullScreenWindow(null);
               System.out.println("No suitable display mode was found. Switching back to windowed mode.");
            }
         } else {
            gd.setFullScreenWindow(null);
            System.out.println("Display mode change not supported. Switching back to windowed mode.");
         }
      } else {
         System.out.println("Fullscreen mode not supported. Using windowed mode.");
      }

I don't like you. Check out my site Smiley www.gamedevforums.com
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (64 views)
2014-04-15 18:08:23

BurntPizza (62 views)
2014-04-15 03:46:01

UprightPath (75 views)
2014-04-14 17:39:50

UprightPath (58 views)
2014-04-14 17:35:47

Porlus (76 views)
2014-04-14 15:48:38

tom_mai78101 (101 views)
2014-04-10 04:04:31

BurntPizza (161 views)
2014-04-08 23:06:04

tom_mai78101 (256 views)
2014-04-05 13:34:39

trollwarrior1 (209 views)
2014-04-04 12:06:45

CJLetsGame (216 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!