myuf.blogg.se

Browserquest 2 map
Browserquest 2 map









browserquest 2 map browserquest 2 map

new() layer:setViewport(viewport) MOAIRenderMgr.pushRenderPass(layer) local map = MOAIGrid. new() viewport:setSize(screenWidth,screenHeight) viewport:setScale(480,320) local layer = MOAILayer2D. So, that covers our image, let’s take a look at the code: screenWidth = MOAIEnvironment.screenWidth screenHeight = MOAIEnvironment.screenHeight if screenWidth = nil then screenWidth =1280 end if screenHeight = nil then screenHeight = 800 end MOAISim.openWindow( "Window",screenWidth,screenHeight) local viewport = MOAIViewport. The image is composed of 20 columns of 32×32 images and 98 rows of them, for a grand total of 1,960 tile images or cells, in a single image. Here is a shrunk down version of the image we are going to be working with: This is massive overkill, but I like massive overkill. Well, we are going to make use of one of the tilesheets from that project. That one, in the spirit of open source, I am ripping off someone else’s work! You may remember a while back Mozilla released a completely free HTML5 based MMO, BrowserQuest. Your game map is then made up of a grid that says “ at this location, draw this tile”.įirst, the topic of the image itself. In this example, we are going to use a regular top down ( not isometric ) perspective and our image map is composed of tiles 32×32 pixels in size. You have an image or series of images that hold the art for your game.

browserquest 2 map

If you are unfamiliar with the concept, a tilemap is pretty straight forward. This is just one of those areas Moai really shines. Not to make any assumptions about your mother’s computing abilities of course! My mother is flummoxed by powering a computer on and its all down hill from there, so perhaps not quite easy enough *my* mother could do it.











Browserquest 2 map