<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5605277348509053715</id><updated>2011-11-28T00:28:42.520+01:00</updated><category term='Game Engine Architecture'/><category term='Game Engine'/><title type='text'>DenzoSOFT Mobile</title><subtitle type='html'>Move desktop applications to mobile phone</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-309309735847378730</id><published>2008-02-26T17:09:00.004+01:00</published><updated>2008-12-10T16:45:07.570+01:00</updated><title type='text'>Who we are?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_VSJ0_iRR18s/R8Q7QSUk9RI/AAAAAAAAAGs/XS9rBMR1JZ4/s1600-h/DenzoSOFTGameEngine.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_VSJ0_iRR18s/R8Q7QSUk9RI/AAAAAAAAAGs/XS9rBMR1JZ4/s200/DenzoSOFTGameEngine.gif" alt="" id="BLOGGER_PHOTO_ID_5171323423110264082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;DenzoSOFT Mobile produces games and applications for mobile device using the Java Microedition platform.&lt;br /&gt;&lt;br /&gt;We believe that we need our data anywhere and anytime.&lt;br /&gt;&lt;br /&gt;We offer our competency for implementation of mobile application desktop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-309309735847378730?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/309309735847378730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=309309735847378730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/309309735847378730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/309309735847378730'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/who-we-are.html' title='Who we are?'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_VSJ0_iRR18s/R8Q7QSUk9RI/AAAAAAAAAGs/XS9rBMR1JZ4/s72-c/DenzoSOFTGameEngine.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-646144219226854814</id><published>2008-02-26T14:46:00.002+01:00</published><updated>2008-02-26T14:50:00.775+01:00</updated><title type='text'>Vision</title><content type='html'>Our vision is to &lt;span style="font-weight:bold;"&gt;move your computer desktop applications to mobile phone&lt;/span&gt;.&lt;br/&gt;&lt;br /&gt;To do so we have made a scouting on wireless tecnology from Wap, to Web, to rich thin client.&lt;br /&gt;If you need to have real 24x7 access to your data you can contact us for a demo implementation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-646144219226854814?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/646144219226854814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=646144219226854814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/646144219226854814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/646144219226854814'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/vision.html' title='Vision'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-3532232356791351578</id><published>2008-02-25T19:08:00.000+01:00</published><updated>2008-02-25T19:09:38.412+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>GameMIDlet</title><content type='html'>A GameMIDlet is a basic runnable class for this game engine.&lt;br /&gt;Writing a subclass of GameEngine ensure the presence of some Commands, and the use of a MenuCanvas for presenting game description.&lt;br /&gt;This MIDlet starts game engine in a new thread, so your cellphone will be always responsive. Can show a MenuCanvas and call the abstract method startGame when you choose to run game from its menu.&lt;br /&gt;To write a new game you need to prepare an implementation of this class&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-3532232356791351578?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/3532232356791351578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=3532232356791351578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/3532232356791351578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/3532232356791351578'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/gamemidlet.html' title='GameMIDlet'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-2728155209078561924</id><published>2008-02-25T19:07:00.000+01:00</published><updated>2008-02-25T19:08:18.625+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>Collision Detection</title><content type='html'>This package provides classes to manage collision detection.&lt;br /&gt;Two different type of collision detection are now supported: &lt;span style="font-weight: bold;"&gt;rectangular&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;circular&lt;/span&gt;. In the future other could be available, if you use only CollisionManager.verifyCollision() to test collision detection your game will be compatible also with new CollisionAreas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-2728155209078561924?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/2728155209078561924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=2728155209078561924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/2728155209078561924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/2728155209078561924'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/collision-detection.html' title='Collision Detection'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-4782528701504317483</id><published>2008-02-25T18:02:00.003+01:00</published><updated>2008-12-10T16:45:07.897+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>Game Engine Architecture</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_VSJ0_iRR18s/R8L1CyUk9NI/AAAAAAAAAGM/0bsXdjxYKu0/s1600-h/Architecture.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_VSJ0_iRR18s/R8L1CyUk9NI/AAAAAAAAAGM/0bsXdjxYKu0/s200/Architecture.gif" alt="" id="BLOGGER_PHOTO_ID_5170964750391375058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The engine architecture is quite simple: you have an engine class that manages timer tick (temporised call), manages Sprites (interactive objects) and a GameCanvas to print the current scene.&lt;br /&gt;A default game MIDlet is proposed, it supports a default game menu.&lt;br /&gt;From previous version (0.5b) to current version (0.8b) a great refactoring has to be made to keep code clean and readable.&lt;br /&gt;So it is possible that you have to fix all imports in your source.&lt;br /&gt;Only minor update are present in code, so no rewriting should be needed.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/game-engine-class.html"&gt;GameEngine Class&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/game-canvas-class.html"&gt;GameCanvas Class&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/graphicobject-class.html"&gt;GraphicObject Class&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/sprite-class.html"&gt;Sprite Interface&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-4782528701504317483?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/4782528701504317483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=4782528701504317483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/4782528701504317483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/4782528701504317483'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/game-engine-architecture.html' title='Game Engine Architecture'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_VSJ0_iRR18s/R8L1CyUk9NI/AAAAAAAAAGM/0bsXdjxYKu0/s72-c/Architecture.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-4477319695921115018</id><published>2008-02-25T17:57:00.002+01:00</published><updated>2008-02-25T19:05:44.975+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>MultiTiledGraphicObject</title><content type='html'>This class renders a &lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/graphicobject-class.html"&gt;GraphicObject&lt;/a&gt; that is composed by a series of &lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/tiledimage-class.html"&gt;Tiles&lt;/a&gt; on different positions.&lt;br /&gt;If you look the image on the left you can note that this object is realized with 5 image and not 9 (to reduce drawing time).&lt;br /&gt;A MultiTiledGraphic is defined by frame, x, y of any of its tiles.&lt;br /&gt;Position is relative to x, y of sprite.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-4477319695921115018?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/4477319695921115018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=4477319695921115018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/4477319695921115018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/4477319695921115018'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/multitiledgraphicobject.html' title='MultiTiledGraphicObject'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-6291399142341586016</id><published>2008-02-25T17:56:00.000+01:00</published><updated>2008-02-25T17:57:00.798+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>MapGraphicObject Class</title><content type='html'>This object renders a rectangle area covered uniformly by tiles.&lt;br /&gt;It is a basic implementation for a background map.&lt;br /&gt;You have to define the bi-dimensional matrix of tiles and this object will render them.&lt;br /&gt;This could be used also for large sprites that are rendered with more tiles.&lt;br /&gt;See examples in Xevious-Ice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-6291399142341586016?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/6291399142341586016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=6291399142341586016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/6291399142341586016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/6291399142341586016'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/mapgraphicobject-class.html' title='MapGraphicObject Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-7000743945652029791</id><published>2008-02-25T17:55:00.000+01:00</published><updated>2008-02-25T17:56:01.364+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>TiledGraphicObject Class</title><content type='html'>This is the simplest tiled printable object.&lt;br /&gt;It is used to print a frame from a TiledImage in a given position: this is usual the graphic implementation of a Sprite.&lt;br /&gt;It’s dimension depends from the tile size.&lt;br /&gt;You have to define the frame to be taken from TiledImage for printing and obviously the TiledImage.&lt;br /&gt;For example all airEnemies in Xevious –ICE are TiledGraphicObjects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-7000743945652029791?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/7000743945652029791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=7000743945652029791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/7000743945652029791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/7000743945652029791'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/tiledgraphicobject-class.html' title='TiledGraphicObject Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-7744940207269931462</id><published>2008-02-25T17:54:00.000+01:00</published><updated>2008-02-25T17:55:15.697+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>TiledImage Class</title><content type='html'>You define a TiledImage from giving image path and tileWidth, and tileHeight.&lt;br /&gt;Than you can use a TiledImage to print a tile everywhere you want on a canvas.&lt;br /&gt;TiledImage supports transparency if it is defined in the .png file and if it is supported by phone hardware.&lt;br /&gt;PS: remember to set correctly clipArea. If you don’t want to have problem use always drawImageWithClip that restores previous condition avoiding any problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-7744940207269931462?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/7744940207269931462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=7744940207269931462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/7744940207269931462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/7744940207269931462'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/tiledimage-class.html' title='TiledImage Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-1587147506249721326</id><published>2008-02-25T17:51:00.002+01:00</published><updated>2008-12-10T16:45:08.451+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>What is Tiled graphics?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_VSJ0_iRR18s/R8LyfCUk9JI/AAAAAAAAAFs/DBNEBiOPshc/s1600-h/tiledimage.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_VSJ0_iRR18s/R8LyfCUk9JI/AAAAAAAAAFs/DBNEBiOPshc/s320/tiledimage.gif" alt="" id="BLOGGER_PHOTO_ID_5170961937187796114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A lot of graphic objects are based on tile images.&lt;br /&gt;This means that you have a set of graphics object that are rendered starting from little piece of images and putting them in the right order (for position and frame).&lt;br /&gt;Tiles are the most used implementation for game sprite, maps, and animations.&lt;br /&gt;Here you can see tile used to write background of Xevious-ICE.&lt;br /&gt;A TiledImage is the class that implements all needed methods for working with tiled graphics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-1587147506249721326?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/1587147506249721326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=1587147506249721326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/1587147506249721326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/1587147506249721326'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/what-is-tiled-graphics.html' title='What is Tiled graphics?'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_VSJ0_iRR18s/R8LyfCUk9JI/AAAAAAAAAFs/DBNEBiOPshc/s72-c/tiledimage.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-8064266137393529735</id><published>2008-02-25T17:50:00.001+01:00</published><updated>2008-02-25T17:50:35.083+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>TextualGraphicObject Class</title><content type='html'>This object is simply used to print text in the graphic area.&lt;br /&gt;NB: in a next version it could be interesting to implement a BitmapFontGraphicObject… Not so difficult using a TiledImage object.&lt;br /&gt;This object is used for example to print points in Xevious – ICE.&lt;br /&gt;New: added support for font face, bold, italic and font size.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-8064266137393529735?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/8064266137393529735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=8064266137393529735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/8064266137393529735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/8064266137393529735'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/textualgraphicobject-class.html' title='TextualGraphicObject Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-8753145431447405330</id><published>2008-02-25T17:49:00.001+01:00</published><updated>2008-02-25T17:49:48.103+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>ScrollableGraphicObject Class</title><content type='html'>This class defines a region in which a given image could be scrolled in.&lt;br /&gt;It is useful for background in racing car game in which you’re usual to see the city or landing in the backgroud scroll when you turn&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-8753145431447405330?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/8753145431447405330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=8753145431447405330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/8753145431447405330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/8753145431447405330'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/scrollablegraphicobject-class.html' title='ScrollableGraphicObject Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-322882374446742483</id><published>2008-02-25T17:48:00.001+01:00</published><updated>2008-02-25T17:48:50.468+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>BasicGraphicObject Class</title><content type='html'>This is the simplest implementation of a GraphicObject that prints a single image.&lt;br /&gt;Nothing more than this is given. It is useful if you don’t have tiled images, but only single images.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-322882374446742483?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/322882374446742483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=322882374446742483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/322882374446742483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/322882374446742483'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/basicgraphicobject-class.html' title='BasicGraphicObject Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-4897887454045928180</id><published>2008-02-25T17:41:00.001+01:00</published><updated>2008-02-25T17:41:33.338+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>GraphicObject Class</title><content type='html'>A GraphicObject is something that can be shown on a Canvas.&lt;br /&gt;It could be a sprite, a background map or anything that could be draw.&lt;br /&gt;It is an abstract class and has only one method to be implemented:&lt;br /&gt;public void paint(Graphics g)&lt;br /&gt;that is called when the engine has to draw a scene.&lt;br /&gt;As you can see this class has different properties: height, width, visible, x and y that are used only far drawing purpose.&lt;br /&gt;x and y are referred to the upper-left corner of the containing canvas.&lt;br /&gt;If you need to have something to draw on a canvas, you simply need to extend this class.&lt;br /&gt;The engine is bundled with different type of GraphicObject already defined:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-4897887454045928180?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/4897887454045928180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=4897887454045928180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/4897887454045928180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/4897887454045928180'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/graphicobject-class.html' title='GraphicObject Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-6351959709525338910</id><published>2008-02-25T17:40:00.001+01:00</published><updated>2008-02-25T17:40:45.315+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>LayeredCanvas Class</title><content type='html'>This is a concrete implementation of a GameCanvas.&lt;br /&gt;Its idea is to offer a 5 layers Canvas to implement z-Order for printing GraphicObjects.&lt;br /&gt;This class implements a layer manager in which you can add and remove graphic objects specifying also the level in which they will be shown.&lt;br /&gt;Then manages the order for printing objects.&lt;br /&gt;Remember: this class ensure the correct order for printing layer, but inside the layer you have not any control on order of printing. So if you want to ensure that object A will be print over object B they have to belong to different layers.&lt;br /&gt;PS: remember to remove object when you don’t need them anymore anyhow then will not be garbaged!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-6351959709525338910?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/6351959709525338910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=6351959709525338910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/6351959709525338910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/6351959709525338910'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/layeredcanvas-class.html' title='LayeredCanvas Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-5638976598588459917</id><published>2008-02-25T17:39:00.000+01:00</published><updated>2008-02-25T17:40:15.357+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>Game Canvas Class</title><content type='html'>As already seen, a GameEngine uses a GameCanvas to print its current state.&lt;br /&gt;A GameCanvas is a normal canvas with some predefined commands to pause and restart a game.&lt;br /&gt;It is initialised with a GameMIDlet object from which you can reach also the current game engine.&lt;br /&gt;GameCanvas is abstract but the game engine offers a complete implementation of a layered canvas with the class LayeredCanvas.&lt;br /&gt;If you need something different you can write your own GameCanvas and use it in the engine.&lt;br /&gt;On a GameCanvas you could print only GraphicObjects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-5638976598588459917?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/5638976598588459917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=5638976598588459917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/5638976598588459917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/5638976598588459917'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/game-canvas-class.html' title='Game Canvas Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-639345840302891864</id><published>2008-02-25T17:34:00.000+01:00</published><updated>2008-02-25T17:35:23.229+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>Sprite Class</title><content type='html'>A sprite is an interactive element of a game.&lt;br /&gt;A Sprite is not directly related with graphic feature, it is a logical element of the game.&lt;br /&gt;A Sprite has various attributes and behavior as collisionArea to define its active region.&lt;br /&gt;It is able to execute something on every game tick to define its transformation (for example changing frame to be displayed by a TiledGraphicObject).&lt;br /&gt;Sprites are registered in the game engine, and the engine ensures that every Sprite will evolve in time calling its execute method.&lt;br /&gt;A usual implementation of an element of a game is to define it as son of something printable (a GraphicObject) and to implements Sprite interface to be registered in the game engine and evolving with it.&lt;br /&gt;New: now getCollisionArea() returns a CollisionArea object and not a Rectangle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-639345840302891864?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/639345840302891864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=639345840302891864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/639345840302891864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/639345840302891864'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/sprite-class.html' title='Sprite Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-8982489134858692265</id><published>2008-02-25T17:31:00.001+01:00</published><updated>2008-02-25T19:04:05.303+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine Architecture'/><title type='text'>GameEngine Class</title><content type='html'>This class is the basic class for your engine.&lt;br /&gt;It works with a &lt;a href="http://denzosoft-mobile.blogspot.com/2008/02/game-canvas-class.html"&gt;GameCanvas&lt;/a&gt; for print graphics and Sprites as interactive and moving elements for collision detection and game items.&lt;br /&gt;To design a new game you need to write an extension of GameEngine class giving implementation for its abstract methods.&lt;br /&gt;&lt;br /&gt;The most important methods is gameTick() that is called directly from engine every intervalLoop milliseconds.&lt;br /&gt;There you have to write you game evolving logic.&lt;br /&gt;Engine has an associated GameCanvas that is repaint every gameTick automatically.&lt;br /&gt;You have method to start, stop, pause, restart engine and to define some basic behavior as points, lives, etc…&lt;br /&gt;Game engine also manage keyButton that are read by getKeyStates.&lt;br /&gt;A MIDlet game uses a MenuCanvas to start the game and a game engine as running stategame.&lt;br /&gt;So you can write a game defining only an implementation of a GameMIDlet and an implementation of a GameEngine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-8982489134858692265?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/8982489134858692265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=8982489134858692265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/8982489134858692265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/8982489134858692265'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/game-engine-class.html' title='GameEngine Class'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-6824924489237135837</id><published>2008-02-25T15:24:00.003+01:00</published><updated>2008-12-10T16:45:08.646+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine'/><title type='text'>Commando Game Sample</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_VSJ0_iRR18s/R8L0SSUk9MI/AAAAAAAAAGE/STBv_GrnDwA/s1600-h/CommandoArchitecture.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_VSJ0_iRR18s/R8L0SSUk9MI/AAAAAAAAAGE/STBv_GrnDwA/s200/CommandoArchitecture.gif" alt="" id="BLOGGER_PHOTO_ID_5170963917167719618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Commando is a basic implementation of an arcade game using Denzo Mobile Game Engine.&lt;br /&gt;Commando basically is a sprite that can explore an environment moving accordingly to user input and simulating a walk.&lt;br /&gt;&lt;br /&gt;From previous presentation we need just 3 classes: the MIDlet, the Engine and a GraphicObject implementing Sprite that represent the commando men.&lt;br /&gt;&lt;h2&gt;Commando MIDlet&lt;/h2&gt;&lt;code&gt;&lt;br /&gt;package it.denzosoft.mobile.commando;&lt;br /&gt;&lt;br /&gt;import it.denzosoft.mobile.common.util.Logger;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.GameMIDlet;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.LayeredCanvas;&lt;br /&gt;&lt;br /&gt;public class CommandoMIDlet extends GameMIDlet {&lt;br /&gt;&lt;br /&gt;public void startGame() {&lt;br /&gt;try {&lt;br /&gt;   LayeredCanvas gameCanvas = new LayeredCanvas(this);&lt;br /&gt;   CommandoEngine ge = new CommandoEngine(gameCanvas);&lt;br /&gt;   setGameEngine(ge);&lt;br /&gt;   ge.startGame();&lt;br /&gt;   getDisplay().setCurrent(gameCanvas);&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;   Logger.error(ex);&lt;br /&gt;&lt;br /&gt;   // Logger.showAlert(getDisplay(),Alert.FOREVER);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public String getName() {&lt;br /&gt;return "Commando";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;StartGame by default is called by MenuCanvas when user decides to start game.&lt;br /&gt;We define the used GameCanvas and pass it to the new Engine&lt;br /&gt;Then we run the engine and show the game canvas.&lt;br /&gt;Really simple, isn’t it?&lt;br /&gt;NB: getName is used by MenuCanvas to print the game name.&lt;br /&gt;&lt;h2&gt;Commando Sprite&lt;/h2&gt;&lt;code&gt;&lt;br /&gt;package it.denzosoft.mobile.commando;&lt;br /&gt;&lt;br /&gt;import it.denzosoft.mobile.common.Rectangle;&lt;br /&gt;import it.denzosoft.mobile.common.util.Logger;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.GameEngine;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.Sprite;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.TiledGraphicObject;&lt;br /&gt;&lt;br /&gt;public class Commando extends TiledGraphicObject implements Sprite {&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_N = 1;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_NE = 3;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_E = 2;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_SE = 6;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_S = 4;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_SW = 12;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_W = 8;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_NW = 9;&lt;br /&gt;&lt;br /&gt;public static final byte DIRECTION_STOPPED = 0;&lt;br /&gt;&lt;br /&gt;public static final int MOVEMENT_MULTIPLIER = 2;&lt;br /&gt;&lt;br /&gt;public static final int LINEAR_MOVEMENT = 1000 * MOVEMENT_MULTIPLIER;&lt;br /&gt;&lt;br /&gt;public static final int DIAGONAL_MOVEMENT = 700 * MOVEMENT_MULTIPLIER;&lt;br /&gt;private byte direction = DIRECTION_STOPPED;&lt;br /&gt;private int currentBaseFrame = 0;&lt;br /&gt;&lt;br /&gt;// Keep postions * 1000&lt;br /&gt;private int posX = -1;&lt;br /&gt;private int posY = -1;&lt;br /&gt;private byte counterImage = 0;&lt;br /&gt;&lt;br /&gt;/** Creates a new instance of Commando */&lt;br /&gt;public Commando() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void execute(int userInput) {&lt;br /&gt;Logger.debug("userInput=" + userInput);&lt;br /&gt;direction = DIRECTION_STOPPED;&lt;br /&gt;&lt;br /&gt;if ((userInput &amp;amp; GameEngine.DOWN_PRESSED) != 0) {&lt;br /&gt;   direction = (byte) (direction | DIRECTION_S);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ((userInput &amp;amp; GameEngine.LEFT_PRESSED) != 0) {&lt;br /&gt;   direction = (byte) (direction | DIRECTION_W);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ((userInput &amp;amp; GameEngine.RIGHT_PRESSED) != 0) {&lt;br /&gt;   direction = (byte) (direction | DIRECTION_E);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ((userInput &amp;amp; GameEngine.UP_PRESSED) != 0) {&lt;br /&gt;   direction = (byte) (direction | DIRECTION_N);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ((userInput &amp;amp; GameEngine.FIRE_PRESSED) != 0) {&lt;br /&gt;   // fire();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;switch (direction) {&lt;br /&gt;case DIRECTION_S:&lt;br /&gt;   posY = posY + LINEAR_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 12;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_SE:&lt;br /&gt;   posY = posY + DIAGONAL_MOVEMENT;&lt;br /&gt;   posX = posX + DIAGONAL_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 9;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_E:&lt;br /&gt;   posX = posX + LINEAR_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 6;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_NE:&lt;br /&gt;   posY = posY - DIAGONAL_MOVEMENT;&lt;br /&gt;   posX = posX + DIAGONAL_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 3;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_N:&lt;br /&gt;   posY = posY - LINEAR_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 0;&lt;br /&gt;&lt;br /&gt;   // currentBaseFrame = 24;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_NW:&lt;br /&gt;   posY = posY - DIAGONAL_MOVEMENT;&lt;br /&gt;   posX = posX - DIAGONAL_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 21;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_W:&lt;br /&gt;   posX = posX - LINEAR_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 18;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;&lt;br /&gt;case DIRECTION_SW:&lt;br /&gt;   posY = posY + DIAGONAL_MOVEMENT;&lt;br /&gt;   posX = posX - DIAGONAL_MOVEMENT;&lt;br /&gt;   currentBaseFrame = 15;&lt;br /&gt;&lt;br /&gt;   break;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;setX(posX / 1000);&lt;br /&gt;setY(posY / 1000);&lt;br /&gt;&lt;br /&gt;if (direction != DIRECTION_STOPPED) {&lt;br /&gt;   counterImage++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (counterImage &gt; 8) {&lt;br /&gt;   counterImage = 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;setFrame(currentBaseFrame + (counterImage / 3));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void collisionDetection(Sprite sprite) {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public Rectangle getCollisionArea() {&lt;br /&gt;return new Rectangle(0, 0, 32, 32);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The execute method translates the user input to sprite movement and tile.&lt;br /&gt;SetFrame from TiledGraphicObject sets the frame to be printed.&lt;br /&gt;As you can see if you keep your direction constant, the Sprite will change coherently the image emulating a walking man.&lt;br /&gt;This is the tiled image representing the commando positions.&lt;br /&gt;The tile set support 3 images for every direction.&lt;br /&gt;The Commando object automatically moves from one to the next.&lt;br /&gt;&lt;h2&gt;Commando Game Engine&lt;/h2&gt;&lt;code&gt;&lt;br /&gt;package it.denzosoft.mobile.commando;&lt;br /&gt;&lt;br /&gt;import it.denzosoft.mobile.common.util.Logger;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.GameEngine;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.LayeredCanvas;&lt;br /&gt;import it.denzosoft.mobile.graphicEngine.TiledImage;&lt;br /&gt;import it.denzosoft.mobile.iceland.EnergyBar;&lt;br /&gt;&lt;br /&gt;import javax.microedition.lcdui.Command;&lt;br /&gt;import javax.microedition.lcdui.Displayable;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class CommandoEngine extends GameEngine {&lt;br /&gt;/** DOCUMENT ME! */&lt;br /&gt;LayeredCanvas canvas = null;&lt;br /&gt;private Commando commando = null;&lt;br /&gt;private EnergyBar energyBar = new EnergyBar();&lt;br /&gt;&lt;br /&gt;/** Creates a new instance of CommandoEngine */&lt;br /&gt;public CommandoEngine(LayeredCanvas canvas) {&lt;br /&gt;super(canvas);&lt;br /&gt;this.canvas = canvas;&lt;br /&gt;init();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void init() {&lt;br /&gt;try {&lt;br /&gt;   commando = new Commando();&lt;br /&gt;&lt;br /&gt;   TiledImage spriteImg = new TiledImage("/guy.png", 32, 32);&lt;br /&gt;   commando.setImage(spriteImg);&lt;br /&gt;   commando.setVisible(true);&lt;br /&gt;   canvas.add(commando, LayeredCanvas.ZORDER_TOP);&lt;br /&gt;   energyBar.setWidth(this.getScreenWidth() / 2);&lt;br /&gt;   energyBar.setX(this.getScreenWidth() / 2);&lt;br /&gt;   energyBar.setHeight(10);&lt;br /&gt;   energyBar.setFull(100);&lt;br /&gt;   energyBar.setDanger(10);&lt;br /&gt;   energyBar.setWarning(25);&lt;br /&gt;   energyBar.setVisible(true);&lt;br /&gt;   canvas.add(energyBar, LayeredCanvas.ZORDER_TOPMOST);&lt;br /&gt;   energyBar.setEnergy(100);&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;   Logger.error(ex);&lt;br /&gt;&lt;br /&gt;   // Logger.showAlert(canvas.getMIDlet().getDisplay(),1000);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void gameTick() {&lt;br /&gt;Logger.debug("##############");&lt;br /&gt;Logger.memory();&lt;br /&gt;commando.execute(getKeyStates());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void commandAction(Command c, Displayable displayable) {&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;On engine initialization we load all images in a TiledImage,&lt;br /&gt;Then we define a commando, we set it visible and put on a layeredCanvas.&lt;br /&gt;Then we add also an energyBar object always on top.&lt;br /&gt;The gameTick method updates commando passing it the user input.&lt;br /&gt;The game is done. Run it!&lt;br /&gt;Have a good luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-6824924489237135837?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/6824924489237135837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=6824924489237135837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/6824924489237135837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/6824924489237135837'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/commando-commando-is-basic.html' title='Commando Game Sample'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_VSJ0_iRR18s/R8L0SSUk9MI/AAAAAAAAAGE/STBv_GrnDwA/s72-c/CommandoArchitecture.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5605277348509053715.post-11177849229500334</id><published>2008-02-25T15:01:00.000+01:00</published><updated>2008-02-25T15:11:30.034+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game Engine'/><title type='text'>DenzoSOFT Mobile Game Engine</title><content type='html'>This is an Open Source Mobile game engine for MIDP 1.0 or MIDP 2.0 mobile phones.&lt;br /&gt;You can download it here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5605277348509053715-11177849229500334?l=denzosoft-mobile.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://denzosoft-mobile.blogspot.com/feeds/11177849229500334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5605277348509053715&amp;postID=11177849229500334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/11177849229500334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5605277348509053715/posts/default/11177849229500334'/><link rel='alternate' type='text/html' href='http://denzosoft-mobile.blogspot.com/2008/02/denzosoft-mobile-game-engine.html' title='DenzoSOFT Mobile Game Engine'/><author><name>Denzo</name><uri>http://www.blogger.com/profile/04461042655329606195</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
