Slick Forums

Discuss the Slick 2D Library
It is currently Mon May 20, 2013 2:39 am

All times are UTC




Post new topic Reply to topic  [ 170 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12  Next
Author Message
 Post subject: Re: MarteEngine
PostPosted: Thu May 03, 2012 4:14 pm 
Offline

Joined: Tue Mar 06, 2012 6:16 pm
Posts: 7
Welp, no need for that, Gornova. Guess the speed vector variable isn't initialized when the object is created in ME 0.2. Updated to 0.3. If I ever run into this problem again, I'll let you know.


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri May 04, 2012 8:47 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
good, okay!

What kind of game do you plan to develop ?

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


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Tue Aug 14, 2012 11:49 am 
Offline

Joined: Thu Aug 09, 2012 1:50 pm
Posts: 7
Is pixel perfect collision detection already implemented in marteengine?


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Tue Aug 14, 2012 2:08 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
not yet :(

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


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed Aug 15, 2012 6:40 am 
Offline

Joined: Thu Aug 09, 2012 1:50 pm
Posts: 7
sadly :( i come over to italy in one week for vacation, maybe i'll visit you for an extreme programming session for pixel perfect collision in marteengine ;)


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Sat Sep 15, 2012 2:26 pm 
Offline

Joined: Sat Sep 15, 2012 1:14 pm
Posts: 1
Hi
So i've just started using MarteEngine and it's pretty neat. although for the collision part, i realized that you could only make simple box collisions. i think a nice addition would be to add circle collisions too, since many games do need this, and circle collision is very simple to implement. im just suggesting, but i am currently in need of it, and im deciding whether I should just make it myself, although doing so might conflict with using MarteEngine. I can too help with implementing this into MarteEngine if needed. hope you guys'll consider it


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Oct 04, 2012 12:23 am 
Offline

Joined: Sat Sep 29, 2012 10:06 pm
Posts: 13
This library needs a forum or section of its own because I have a problem that nobody can solve because I think its specific to MarteEngine.


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Thu Oct 04, 2012 6:37 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
You can ask to admins to open a new forum sections, but first.. explain your problem :D

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


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Sat Oct 06, 2012 1:24 pm 
Offline

Joined: Sat Sep 29, 2012 10:06 pm
Posts: 13
Code:
if (collide(SOLID, x + 10, y) == null) {
            x -= speed * delta;
         }


What exactly does this code do? I know what the
Code:
x -= speed * delta
is (I coded that), but I have no idea what the code in the parameter for collide does. I get what SOLID means, it checks if the player has collided with a wall, but what does
Code:
x + 10, y
do? And why is that all set equal to null? This is why I wish they had a forum or documentation.


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Oct 12, 2012 9:51 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
MarteEngine have wiki pages and in particular about collision here

In short: you are checking current entity at position (x+10,y) (=> that means it's moving right with a step of 10 pixels) against another entity ot type SOLID

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


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Oct 26, 2012 8:45 am 
Offline

Joined: Thu Aug 30, 2012 12:13 am
Posts: 43
Hi Gornova, I was just wondering how you would change an entity's grapics to an animation? Because I made an array of Images like
Code:
Image[] foxrighta = {foxsheet.getSubImage(0, 0, 26, 18), foxsheet.getSubImage(0, 26, 26, 18)};
but then I wanted to do
Code:
setGraphic(foxrighta);
but setGraphic doesn't take Image[]. Is there another way to do this?


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Oct 26, 2012 9:28 am 
Offline
Site Admin

Joined: Mon Dec 08, 2008 2:17 pm
Posts: 140
lavago,

Depending on your marte engine version you will find a setAnim in entity. If this method does not exist you can use currentAnim.

If you use the latest version from the dev branch you can load an animation from resources.xml
This works like this:
Like any other resource you add a line in the resources.xml file:
anim name imgName frameDuration row frames(default=all horizontal frames)
Code:
<anim key="homer" imgName="homer" frameDuration="250" row="0" frames="1,2,3,4,5"

name: name of your animation, this is the key to retrieve it later on
imgName: The spritesheet key where the animation should be read from(the spritesheet should already be loaded)
frameDuration: The duration of all frames
row: what row in the sheet contains your images
frames: what images should be in the animation on that row

then:
Code:
Animation animWalkLeft = ResourceManager.getAnimation("homer")
homerEntity.addAnim("walk_left",animWalkLeft );

// and finally when you need the entity to walk left
homerEntity.setAnim("walk_left");


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Oct 26, 2012 9:29 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
I agree with stef, just use last version from dev branch and you are okay

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


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Fri Oct 26, 2012 10:43 pm 
Offline

Joined: Thu Aug 30, 2012 12:13 am
Posts: 43
ok, but where do I download the latest .jar? all I can find is the source code.


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed Oct 31, 2012 6:08 am 
Offline

Joined: Thu Aug 30, 2012 12:13 am
Posts: 43
Does anyone know? I've tried doing things with the code but nothing has worked.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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