Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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 7709 times)
0 Members and 1 Guest are viewing this topic.
Offline good4u

Junior Newbie





« Posted 2006-05-12 10: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 a.java 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

Good4u
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 753
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2006-05-12 11: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 cokeandcode.com


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 11:44:09 »

So you mean it's just to hard to get hte a.java 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 13: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 13:36:44 »

Dear CaptainJester,

thanks for that hint...

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

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

Any ideas ?
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 753
Projects: 4
Exp: 16 years


Hand over your head.


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

compile it first...

javac A.java
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 15: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:
1  
javac A.java

and execute it like so:
1  
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: 1


pixels! :x


« Reply #7 - Posted 2006-05-12 22: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 22: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 !

Good4U.
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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (24 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!