Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (603)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (651)
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  
  Help with Miners4K  (Read 8506 times)
0 Members and 1 Guest are viewing this topic.
Offline good4u

Junior Newbie

« Posted 2006-05-12 08:21:14 »

Hi everyone....

first of all, I am not as good as you are in programming... so totally newbie...

I discovered the source code of miners4k, and since I understand some of it, would like to play around with it and modify few things...

Can anyone tell me the exact steps from the file (that i modified) till the html page where you can launch the game. (locally if possible) ?

Remember I'm a dummy, so clear step by step instruction would be very appreciated... Collection of links if they could do the same appreciated as well...

Thanks in advance

Offline Riven
« League of Dukes »

« JGO Overlord »

Medals: 1019
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #1 - Posted 2006-05-12 09:19:28 »

As you say you have little experience, I'd advise you not to use 4K games as a base, because they are ... well ... non-OO, 'bad' design, hacked together and will only confuse you.

Disclaimer: I haven't read the sourcecode of Miners4k, so I only have a gut-feeling about the OO/design, NOFI

You might be more interested in kevglass' tutorials on

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline good4u

Junior Newbie

« Reply #2 - Posted 2006-05-12 09:44:09 »

So you mean it's just to hard to get hte file into a local webpage, so that I can check my corrections ? Why is that ? I'm just so curious and excited about this game, would be fun if there would be a way to customize it to my own preferences... Since the file is very well commented, I don't thinks that would be too hard... but it's just that last bit that bothers me... I just can't understand why there isn't any easy way ?  Thanks again for your support
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CaptainJester

JGO Knight

Medals: 12
Projects: 2
Exp: 14 years

Make it work; make it better.

« Reply #3 - Posted 2006-05-12 11:14:29 »

You don't  need to run it from the web browser.  Just run it from the command line like any other Java program.  The way you are seeing it launched from the browser is called Java Web Start.  If you search on that, you will learn how it works.  It is an advanced topic, so you may find it confusing at first.

Offline good4u

Junior Newbie

« Reply #4 - Posted 2006-05-12 11:36:44 »

Dear CaptainJester,

thanks for that hint...

Now i'm try to launch from the dos command line and get the following error:

D:\temp prog download\miner>java
Exception in thread "main" java.lang.NoClassDefFoundError: A/java

Any ideas ?
Offline Riven
« League of Dukes »

« JGO Overlord »

Medals: 1019
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #5 - Posted 2006-05-12 13:52:02 »

compile it first...

java A

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline woogley
« Reply #6 - Posted 2006-05-12 13:53:06 »

okay, first off, as the organizer of the 4K contest, let me tell you [as it was already stated]: it is a bad idea to for newbies to learn from 4K games!. we use many optimization tricks, such as one-letter variables, classes with only 1 method (main), etc. most 4K games code are unorganized, unstructured, unconventional, and borderline undreadable. but fortunately, some of the 4K codes are commented - like Miners4K. but still, that's a doozy.

now, with that said. Miners4K is not an applet, so you cannot put it in a webpage. The only programs that can be put in a webpage are classes that extend Applet and implement the init() and paint() methods, to name a few.

as far as the Miners4K source goes, you should be able to compile it like so:

and execute it like so:
java A

if you want another 4K code goodie, you can hack around at my game, Goomba4K. It didn't win the contest like Miners4K did, but hey - it's another game to toy with. You can mess with it however you want. In fact, if you want to start a thread about a question about my code, that'd be fine too. Tongue
Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #7 - Posted 2006-05-12 20:06:32 »

Haha. For that reason I decided against making my source public. Sure there are a few nice things in it, but its buried under a pile of cryptic n ugly code.

Its pretty unlikely that someone will learn anything from 4k code. Its really the worst. Even very simple 4k games are hard to decypher.

弾幕 ☆ @mahonnaiseblog
Offline good4u

Junior Newbie

« Reply #8 - Posted 2006-05-12 20:49:20 »

Hi everyone,

first thanks for all your replies... and wise advices....

Looks like everything is fine now... I can start editing it... I'm delighted...

Thanks again !

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

SHC (11 views)
2015-08-01 03:58:20

Jesse (16 views)
2015-07-29 04:35:27

Riven (38 views)
2015-07-27 16:38:00

Riven (19 views)
2015-07-27 15:35:20

Riven (22 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (32 views)
2015-07-25 00:14:37

BurntPizza (43 views)
2015-07-24 22:06:39

BurntPizza (25 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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‑
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!