Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (116)
games submitted by our members
Games in WIP (563)
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  
  ApoMario  (Read 6175 times)
0 Members and 1 Guest are viewing this topic.
Offline Apo
« Posted 2011-02-14 16:00:00 »

Hi,

my latest "masterpiece" ApoMario.
My plan was to make a Mario clone with same new features (e.g. a 2 player challenge) and the chance to make your own ai. Now its the programming challenge at my university and I'm happy. =)

Would be great if you can test it and give me some feedback what do you think. The source code is inside the jar.
Thanks for testing!

Download and Applet: ApoMario



and because today its valentine's day ... my little applet for all girls Wink
Offline Mike

JGO Wizard


Medals: 83
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #1 - Posted 2011-02-14 16:30:55 »

Worked fine, on most levels you can just stand still and still win though as the AI keeps messing something up Tongue

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #2 - Posted 2011-02-14 16:48:17 »

Let us write our own AI! Cheesy The game worked just fine, but the levels were quite odd.

EDIT: Never mind, I got it! Cheesy

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #3 - Posted 2011-02-15 21:56:20 »

Haha this is cool. I only tried the first level but the AI destroyed me.

See my work:
OTC Software
Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #4 - Posted 2011-02-15 22:35:27 »

Very cool.

Tried the applet version.

you might want to add:

  <param NAME="boxborder" value="false">
  <param name="al_bgcolor" value="e1ffe1">

to the applet tag. it will make the applet blend into the webpage when loading at startup.

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline gouessej
« Reply #5 - Posted 2011-02-16 10:28:52 »

Hi!

I have just died almost immediately as I could not make a jump that was big enough even when running and jumping Sad

Offline krasse
« Reply #6 - Posted 2011-02-16 11:13:11 »

Very cool!

A suggestion:
* Make it possible to create an AI in javascript inside the game applet/application.

Offline ReBirth
« Reply #7 - Posted 2011-02-16 11:31:09 »

I like the fat character and food theme!

Offline Apo
« Reply #8 - Posted 2011-02-17 14:22:36 »

Thanks all for testing!!! =)

...
you might want to add:

  <param NAME="boxborder" value="false">
  <param name="al_bgcolor" value="e1ffe1">

to the applet tag. it will make the applet blend into the webpage when loading at startup.

done =)

...
I have just died almost immediately as I could not make a jump that was big enough even when running and jumping Sad

Yes ... this unfortunately happens very rarely. I will search the mistake in the level generator. Press 'm' to start a new random level with the same difficulty and width.

...
A suggestion:
* Make it possible to create an AI in javascript inside the game applet/application.

Great idea. I will try to add an easy system to 'click' your own ai (like the LEGO mindstorms software) and save the result in my database. Good idea or bad? What do you think?
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 77
Projects: 15


★★★★★


« Reply #9 - Posted 2011-02-17 14:30:03 »

...

  <param NAME="boxborder" value="false">
  <param name="al_bgcolor" value="e1ffe1">

to the applet tag. it will make the applet blend into the webpage when loading at startup.

done =)
I think you probably want to use <param name="boxbgcolor" value="e1ffe1"> since "al_bgcolor" doesn't do anything Smiley

Btw very nice game, its very cool stuff.

Found jumping to be a bit odd, I'm not sure if it was intentional but i'd make the left/right keys a bit more responsive when the character is in the air.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline krasse
« Reply #10 - Posted 2011-02-17 16:01:46 »


Great idea. I will try to add an easy system to 'click' your own ai (like the LEGO mindstorms software) and save the result in my database. Good idea or bad? What do you think?

I think that it can be a good idea if a lot of your users don't know how to code but still want to make bots. I haven't played around with the mindstorms so I don't know how those tools look like.
Just being able to add scripted code directly into the application might be a good idea if you want to get some more coders to look at and improve preset bots (or something like that). It is probably much less difficult to do this than to create a user friendly 'click'-system.

I wish you the best of luck! This is a very cool application indeed and can spawn a lot of interest in AI!

Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #11 - Posted 2011-02-17 16:42:18 »

I think you probably want to use <param name="boxbgcolor" value="#e1ffe1"> since "al_bgcolor" doesn't do anything Smiley
Oops copied the wrong tags.

it should look something like:
1  
2  
3  
4  
<applet archive="ApoMario.jar" code="apoMario/ApoMarioApplet.class" height="480" width="640">
<param name="boxborder" value="false">
<param name="boxbgcolor" value="#e1ffe1">
</applet>


My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline Apo
« Reply #12 - Posted 2011-02-17 18:10:40 »

I think you probably want to use <param name="boxbgcolor" value="e1ffe1"> since "al_bgcolor" doesn't do anything Smiley
Oops copied the wrong tags.

it should look something like:
1  
2  
3  
4  
<applet archive="ApoMario.jar" code="apoMario/ApoMarioApplet.class" height="480" width="640">
<param name="boxborder" value="false">
<param name="boxbgcolor" value="e1ffe1">
</applet>

thx! Done =)
Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #13 - Posted 2011-02-18 03:04:31 »

its missing the '#' character
thx! Done =)
its missing the '#' (#e1ffe1) character, sorry.

Also, I couldnt get it working on Chrome browser on MacOSX

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline gouessej
« Reply #14 - Posted 2011-02-18 12:03:37 »

Yes ... this unfortunately happens very rarely. I will search the mistake in the level generator. Press 'm' to start a new random level with the same difficulty and width.
Thank you for the tip, it is better now. However, why are there some slowdowns every 30 seconds??

Offline Apo
« Reply #15 - Posted 2011-03-27 01:39:27 »

...
Thank you for the tip, it is better now. However, why are there some slowdowns every 30 seconds??

I think now I fixed the slowdown bug and I implement an easy to use-editor (left click to select somethink or set it and right click to delete ... its very easy).
I hope u like it! Click to start the applet. =)
Offline Apo
« Reply #16 - Posted 2011-03-28 21:32:32 »

I AM HAPPY, HAPPY HAPPY!
And why? Because I started that little project over a year ago and since that time there was a *censored* *piep* replaybug and I dont know why ... and today I found that bug. YES YES YES! =) Now the replays should be correct. =)
I also pimped the editor and made 3 levels for the offline version. The first one is the first level from super mario bros. 1. The second level is a testlevel to look how good can u or the ai jump and the thrid one is a level to test some difficulty things for the ai like dead ends etc.

Feedback is like always appreciated but did I mention that I'm happy?  Grin
Offline gouessej
« Reply #17 - Posted 2011-03-29 10:55:31 »

I AM HAPPY, HAPPY HAPPY!
And why? Because I started that little project over a year ago and since that time there was a *censored* *piep* replaybug and I dont know why ... and today I found that bug. YES YES YES! =) Now the replays should be correct. =)
What was the root cause of this bug?

Offline Apo
« Reply #18 - Posted 2011-03-30 19:55:10 »

What was the root cause of this bug?

The main problem was: the replay wasn't planned at the beginning. Then I "hacked" the replay in and for my first bot everything worked fine. But when I made a better bot with some more movements then the replay didn't work and with some luck and much time I found more then 5 (very little) bugs distributed over the whole program. And now I'm happy. =)

In the latest version you can play und save replays from the editor levels (when they are saved) and I fixed some beautybugs in the editor. =)

I hope u like it. I do. Wink
Offline Apo
« Reply #19 - Posted 2011-05-24 15:20:11 »

The contest has begun and I have received the first bots. And one special bot I want to present ... why? Because that dirty little bastard cheats. =) But its funny to see.

Funny cheating video
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #20 - Posted 2011-05-24 17:34:58 »

The contest has begun and I have received the first bots. And one special bot I want to present ... why? Because that dirtly little bastard cheats. =) But its funny to see.

Funny cheating video

Can we get the source for that? Tongue Also, Hypercam is free now!  Cool No need for the labels.

Offline Apo
« Reply #21 - Posted 2011-06-01 14:40:37 »

113 bots were submitted and the first results you can see here.

Can we get the source for that? Tongue Also, Hypercam is free now!  Cool No need for the labels.

Source-Code:
The problem is: the real player variable is a private variable in the player ai class. And u can get the varibale with  
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  
35  
36  
37  
38  
   private static Field getField(Class<?> cls, String name) throws NoSuchFieldException, SecurityException {
      Field field = null;
      while(cls != null) {
         try {
            field = cls.getDeclaredField(name);
            break;
         } catch(NoSuchFieldException e) {}
         
         cls = cls.getSuperclass();
      }
     
      if(field == null)
         throw new NoSuchFieldException();
     
      return field;
   }
   
   private static <T extends ApoMarioEntity> T getBaseEntity(ApoMarioAIEntity entity, Class<T> cls) throws IllegalArgumentException, IllegalAccessException {
      return cls.cast(entityField.get(entity));
   }
   
   static {
      try {
         entityField = getField(ApoMarioAIEntity.class, "entity");
         entityField.setAccessible(true);
      } catch(NoSuchFieldException e) {
         e.printStackTrace();
      }
   }
   public void think(final ApoMarioAIPlayer player, final ApoMarioAILevel level) {
      try {
         ApoMarioPlayer hacker = getBaseEntity(player, ApoMarioPlayer.class);
                        //... now u can do everything u want. ;)
     } catch(Exception e) {
         e.printStackTrace();
         throw new RuntimeException(e);
      }
   }


and thanks for the hypercam tip. Next video will be without the labels. =)
Offline Apo
« Reply #22 - Posted 2011-06-14 09:46:44 »

Now I finished the contest and will publish the results on monday the 27.06.2011.

I remove some bugs and I also publish a new little video with some test levels I made with the editor. The player is again the AI-bot Icarus.

<a href="http://www.youtube.com/v/tJVe0Fu0yGk" target="_blank">http://www.youtube.com/v/tJVe0Fu0yGk</a>
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.

radar3301 (12 views)
2014-09-21 23:33:17

BurntPizza (30 views)
2014-09-21 02:42:18

BurntPizza (22 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (28 views)
2014-09-20 20:14:06

BurntPizza (32 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (103 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!