Slick Forums

Discuss the Slick 2D Library
It is currently Wed Jun 19, 2013 6:15 am

All times are UTC




Post new topic Reply to topic  [ 170 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12  Next
Author Message
 Post subject: Re: MarteEngine
PostPosted: Wed Apr 04, 2012 5:15 pm 
Offline

Joined: Thu Jan 26, 2012 5:40 pm
Posts: 79
Azulon's NiftyWorld was extremely helpful in getting a main menu state, but now I'm trying to get a gui on top of a World. Has anyone had any success with this?


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed Apr 18, 2012 6:42 pm 
Offline

Joined: Sun Jun 05, 2011 8:33 am
Posts: 9
Location: Kaiserslautern, Germany
Hello guys!

I have a problem with the Rogue Tutorial of the Marte Engine. At part 2, the movement after collision is somehow buggy..

when my hero collides with a wall, he behaves correctly. however the one movement after the collision is buggy and produces 2 movements at once, namely the surpressed movement from the collision and the new correct one

second problem i have is the debug key. what is the ME object ? dont have it -__

can anyone help ?

EDIT: the following camera doesnt work neither :( double checked it all


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Apr 19, 2012 7:27 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
wow, here am I.

* collision: how you detect the two movements? The suppressed one in particular
* debug key: you can define debug key using ME.keyToggleDebug = Input.KEY_1; for example with key 1 you can see debug informations
* camera: camera works in next tutorial, see here

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Apr 19, 2012 7:31 am 
Offline

Joined: Sun Jun 05, 2011 8:33 am
Posts: 9
Location: Kaiserslautern, Germany
thanks for your response. the camera works now

the collision:

- my hero has a wall to the left
- i press left, nothing happens as intented
- now i press up and my hero moves up and then left simultaneously


ME is unknow to my IDE :(


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Apr 19, 2012 7:41 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
about collision i will investigate, thanks!

about ME is a class of MarteEngine: https://github.com/Gornova/MarteEngine/ ... ne/ME.java

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Apr 19, 2012 10:58 am 
Offline

Joined: Sun Jun 05, 2011 8:33 am
Posts: 9
Location: Kaiserslautern, Germany
i solved the ME issue, but cant seem to solve the collision issue :(

thanks for your effort "!


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Apr 19, 2012 3:23 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
thanks to you to following my tutorial!

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Apr 20, 2012 5:20 am 
Offline

Joined: Sun Jun 05, 2011 8:33 am
Posts: 9
Location: Kaiserslautern, Germany
i have to say thank you. i do modifiy it a bit though, since i want to do a roguelike with a twist... but nevertheless very useful stuff for me !


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Apr 20, 2012 7:09 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
oppi wrote:
i have to say thank you. i do modifiy it a bit though, since i want to do a roguelike with a twist... but nevertheless very useful stuff for me !


with a twist? Let me know about it, I'm curious :D

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed May 02, 2012 9:07 am 
Offline

Joined: Tue May 01, 2012 8:08 pm
Posts: 2
Hey everybody,
I just recently started working on a game and stumbled over this engine. It looks quite nice to work with but I am still having a few questions. What I am trying to code would be a point'n click adventure. I am not sure about the best way to implement this with your marte engine. I understand your concept of states and worlds but it seems these are more geared towards classical "levels" of platformer or shooter games. A PnC adventure usually has a lot of scenes you can visit and find stuff in. How would you set this structure up with your states and worlds? Would you create each scene as a new world or create your own interface "scene" which implements world with each scene containing several entities?

Thanks for your effort with the engine!


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed May 02, 2012 11:47 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
hi, should be better have a world == a scene, so you don't have too much problems, and every world have his own entities.

I never tried to build a point'n'click adventure, how to you plan to structure it? I mean, there is no level, you need to build a lot of scenes, right?

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed May 02, 2012 1:23 pm 
Offline

Joined: Tue May 01, 2012 8:08 pm
Posts: 2
Structure wise it shouldn't be too complex. A scene basically is a like a level. The difference is the connection between them. You can go to several different scenes from one scene, there is no fixed order of scenes (like the levels of Super Mario for example) and most scenes are quite similar in their functionality.


My game will only be a prototype for my university for now, so the number of scenes will be limited. Since the whole thing will be an educational game most scenes will be similar (contain clickable objects and some graphics), only a few will stick out with containing a game or other functionality. I will try your suggestion and use separate worlds which are connected with each other. Interesting would be, if I could make invisible buttons with slick (so you click to the border of the screen and your hero leaves to the next scene or so).


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed May 02, 2012 2:24 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
you should do an entity to do that

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed May 02, 2012 3:58 pm 
Offline

Joined: Tue Mar 06, 2012 6:16 pm
Posts: 7
Hi, everyone! I'm having some trouble doing a very simple thing. I'm trying to create an Entity that only moves left and right at a specific speed. For some strange reason, the program keeps crashing whenever it gets to the Gameplay state I've created, more specifically right after the entering transition ends. here's the Player class:

Code:
public class Player extends Entity {
   
   public final String MOVE_LEFT= "left";
   public final String MOVE_RIGHT= "right";
   public final String CMD_FIRE= "fire";
   public boolean bulletOnScreen= false;
   
   public Player(int startX, int startY) throws SlickException {
      super(startX, startY);

      defineCommands();
      this.setGraphic(ResourceManager.getImage("spaceInvadersMain"));
      setHitBox(0, 0, currentImage.getWidth(), currentImage.getHeight());
      this.addType(SOLID);
   }
   
   public void render(GameContainer gameContainer, Graphics graphics) throws SlickException {
      super.render(gameContainer, graphics);
   }
   
   public void update(GameContainer gameContainer, int delta) throws SlickException {
      super.update(gameContainer, delta);
      dealWithInput();
   }
   
   private void dealWithInput() {
      if(check(MOVE_LEFT)) {
         moveLeft();
      } else if(check(MOVE_RIGHT)) {
         moveRight();
      } else if(pressed(CMD_FIRE)) {
         fireBullet();
      } else {
         this.speed.x= 0;
      }
   }
   
   private void moveLeft() {
      if(collide(SOLID, this.x - this.speed.x, this.y)== null   && this.x - this.speed.x > 30) {
         this.speed.x= -6;
      }
   }
   
   private void moveRight() {
      if(collide(SOLID, this.x + this.speed.x, this.y)== null   && this.x + this.speed.x + (float) this.height < 610) {
         this.speed.x= 6;
      }
   }
   
   private void fireBullet() {
      if(!bulletOnScreen) {
         
      }
   }
   
   private void defineCommands() {
      define(MOVE_LEFT, Input.KEY_LEFT);
      define(MOVE_RIGHT, Input.KEY_RIGHT);
      define(CMD_FIRE, Input.KEY_SPACE);
   }
}


This is the error I'm getting:
Code:
Wed May 02 16:55:04 BST 2012 ERROR:null
java.lang.NullPointerException
   at actors.Player.dealWithInput(Player.java:44)
   at actors.Player.update(Player.java:33)
   at it.randomtower.engine.World.update(World.java:120)
   at states.GameplayState.update(GameplayState.java:45)
   at org.newdawn.slick.state.StateBasedGame.update(StateBasedGame.java:268)
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:663)
   at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:411)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:321)
   at game.SMGame.main(SMGame.java:29)


I've looked to the Pong example's code in github, and I just don't understand what I'm doing wrong. Any help would be appreciated!


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu May 03, 2012 7:02 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1317
Location: Italy
could you provide an example eclipse project ? I'm curious about this issue

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 170 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11, 12  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group