[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Slick Forums • View topic - MarteEngine

Slick Forums

Discuss the Slick 2D Library
It is currently Mon Jan 17, 2022 6:40 am

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 171 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11, 12  Next
Author Message
 Post subject:
PostPosted: Tue Sep 06, 2011 12:52 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
I've tried with Android 2.2 and this is my result (same on phone, here desktop version)



can you explain what I need to do ?

_________________
| Last game


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2011 2:03 pm 
Offline

Joined: Tue Aug 16, 2011 2:17 am
Posts: 31
Location: Phoenix


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2011 2:38 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
ok, right, now I've got it :D

I've re-done your example to a most basic one, with Android and MarteEngine (v0.3 in development), for anyone want to start from a template project.


_________________
| Last game


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2011 3:22 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
write also a post on blog about this topic, here:

http://randomtower.blogspot.com/2011/09 ... -with.html

we need to refine this process, my aim to have something like:
1) one desktop project as template for MarteEngine+slick+lwjgl all setup and ready to run,
2) one android project with launcher for desktop project

any ideas on that ?

_________________
| Last game


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2011 8:06 pm 
Offline

Joined: Tue Aug 16, 2011 2:17 am
Posts: 31
Location: Phoenix


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2011 8:17 pm 
Offline
Regular

Joined: Sun Oct 25, 2009 5:24 pm
Posts: 118


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2011 8:32 pm 
Offline

Joined: Tue Aug 16, 2011 2:17 am
Posts: 31
Location: Phoenix


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 09, 2011 7:20 am 
Offline

Joined: Tue Aug 16, 2011 2:17 am
Posts: 31
Location: Phoenix


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 09, 2011 7:45 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy

_________________
| Last game


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 5:59 am 
Offline

Joined: Tue Aug 16, 2011 2:17 am
Posts: 31
Location: Phoenix
So i have a level generator that reads the text file by line and makes each character into an entity spawn using

case EXPLANATION_TILE:
world.add(new Tile_Explanation(x, y));
break;
case DEBU5_TILE:
world.add(new Tile_Debu5(x, y));
break;
}

How can I individually reference each of these entities being created? Like if i wanted to call a method on the block being clicked, how do i specifically say, do this method to that block?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 6:41 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
check on click on update method of entity :D

_________________
| Last game


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2011 6:54 am 
Offline
Game Developer

Joined: Sun Nov 12, 2006 11:18 pm
Posts: 890
Location: Germany
Or store them in an array while creating them and later on in the world's update method check for the mouse click, retrieve the proper array position based on mouse position and call the method on the entity.

Should be a bit less resource hungry because not all entities check on every update if they are clicked...

Depends on the number of entities that you want to react on a mouse click of course. If it's only one for example Gornova's suggestion is way easier to implement and doesn't beat you performance wise.
If you have hundreds of entities where you would want to react on a mouse click I would prefer my approach...

_________________
|
| |


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 20, 2011 3:15 am 
Offline

Joined: Tue Aug 16, 2011 2:17 am
Posts: 31
Location: Phoenix


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed Nov 23, 2011 1:00 am 
Offline

Joined: Mon Mar 21, 2011 4:22 pm
Posts: 32
Location: United States


Top
 Profile  
 
 Post subject: Re: MarteEngine
PostPosted: Wed Nov 23, 2011 8:56 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
could you give us an example project?

_________________
| Last game


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 171 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9, 10, 11, 12  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group