• 大小: 0.26M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-15
  • 语言: Java
  • 标签: 超级玛丽  

资源简介

 

I stopped working on this project for three reasons;
1) I had to focus on my main project. This was just a fun side project.
2) I didn't feel comfortable abusing copyrighted material for non-personal use, and neither should you.
3) The competition this was an entry for ended.

I'm releasing the source code for this project since I've gotten quite a bit of email with really
good suggestions on how to make this better, but I don't have the time to implement them myself.

The code (/src/) is released as public domain, so you can do with it what you wish.
The art (/res/) is still copyright nintendo, so it's almost certainly NOT ok to do anything at all with it. Ask nintendo.

And, please, if you're going to make a bigger project out of this, please consider replacing the art with legal art.

 


About the code:

The code is basically undocumented, but should be readable anyway as it's fairly clean. The main entry points are
AppletLauncher and FrameLauncher. The main game is in MarioComponent.

"sonar" is the base of a software sound engine I've been working on. It's pretty nice, but there's a few bugs in it
(mostly timing based). It can easilly be ripped out and reused in another project.

The level editor isn't used for anything more than changing the behavior of blocks anymore. But I think there's still
code in there somewhere for loading a level instead of generating it, so if you want to reintroduce static levels,
you've got a nice base for a level editor there.

The game DOES support scrolling in the Y directions right out of the box! However, I didn't think it fit the retro feeling,
so I made all levels only one screen tall. ;)

The sprite package and class should be renamed into "entity" or "mobile" or something..


资源截图

代码片段和文件信息

package com.mojang.mario;

import javax.swing.Japplet;


public class appletLauncher extends Japplet
{
    private static final long serialVersionUID = -2238077255106243788L;

    private MarioComponent mario;
    private boolean started = false;

    public void init()
    {
    }

    public void start()
    {
        if (!started)
        {
            started = true;
            mario = new MarioComponent(getWidth() getHeight());
            setContentPane(mario);
            setFocusable(false);
            mario.setFocusCycleRoot(true);

            mario.start();
//            addKeyListener(mario);
//            addFocusListener(mario);
        }
    }

    public void stop()
    {
        if (started)
        {
            started = false;
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-18 14:14  chaojimali\
     文件         200  2006-12-25 10:42  chaojimali\LICENSE.txt
     文件        1903  2006-12-25 10:55  chaojimali\README.txt
     目录           0  2006-12-25 10:38  chaojimali\res\
     文件       15103  2006-08-12 20:20  chaojimali\res\bgsheet.png
     文件        2989  2006-08-12 22:36  chaojimali\res\endscene.gif
     文件        8072  2006-08-05 17:18  chaojimali\res\enemysheet.png
     文件        6048  2006-07-30 18:35  chaojimali\res\firemariosheet.png
     文件        6857  2006-07-18 21:48  chaojimali\res\font.gif
     文件        3767  2006-08-12 23:36  chaojimali\res\gameovergost.gif
     文件        4043  2006-07-16 20:25  chaojimali\res\itemsheet.png
     文件        2740  2006-08-12 14:13  chaojimali\res\logo.gif
     文件       13436  2006-08-12 19:48  chaojimali\res\mapsheet.png
     文件        5746  2006-08-13 17:29  chaojimali\res\mariosheet.png
     目录           0  2006-12-25 10:38  chaojimali\res\mus\
     文件        2145  2006-07-15 22:02  chaojimali\res\mus\smb3map1.mid
     文件        6770  2006-07-15 22:02  chaojimali\res\mus\smb3ovr1.mid
     文件        3850  2006-07-15 21:59  chaojimali\res\mus\smb3undr.mid
     文件       30908  2006-07-15 21:58  chaojimali\res\mus\smwfortress.mid
     文件       12084  2006-07-15 21:58  chaojimali\res\mus\smwovr1.mid
     文件        8625  2006-07-15 21:58  chaojimali\res\mus\smwovr2.mid
     文件       10661  2006-07-15 21:58  chaojimali\res\mus\smwtitle.mid
     文件        3318  2006-08-13 16:41  chaojimali\res\particlesheet.png
     文件        6608  2006-08-13 17:30  chaojimali\res\racoonmariosheet.png
     文件        1464  2006-07-16 16:43  chaojimali\res\smallmariosheet.png
     目录           0  2006-12-25 10:38  chaojimali\res\snd\
     文件        4675  2006-08-12 21:43  chaojimali\res\snd\1-up.wav
     文件        5738  2006-07-15 19:11  chaojimali\res\snd\breakblock.wav
     文件        2208  2006-07-30 18:14  chaojimali\res\snd\bump.wav
     文件        4024  2006-07-28 20:40  chaojimali\res\snd\cannon.wav
     文件        4314  2006-07-15 19:11  chaojimali\res\snd\coin.wav
............此处省略74个文件信息

评论

共有 条评论