on 26-05-2012 04:26 AM
Here is a basic tiled map example that uses a single draw call with one vertex buffer to draw the scene.
Hopefully it will prove useful for some of you.
www.rockingpocketgames.com/Vita/TiledMapSample.zip
on 26-05-2012 01:28 PM
I've updated the archive today and cleaned up the code a bit.
on 26-05-2012 09:01 PM
Thanks. Good demo/example.
on 27-05-2012 01:44 AM
Would anyone know how to use this without xml/tmx binary files? Anyway to use .png file format without binary and even more so, compress it via zlib?
Thatd be great asI dont want to be limited to tiles and the editor. Currently trying to load maps of 6,000 pixels wide in segments of about 700 pixels wide and Im hoping to adapt this to such a system.
Could anyone help me out? Similar to the 2dactiongame demo but thatll load the log background layer 5 times in width.
Come join The Freenode IRC at Channel #pss-dev!
I am merely a graphics designer who wants to program, go figure.
on 30-05-2012 11:27 AM
I'm having problem syncing the sprite with the tilemap. in this code:
public override bool Frame()
{
CameraPositionX = ( (int)player2.PositionX - screenWidth/2) ;
CameraPositionY = ( (int)player2.PositionY - screenHeight/2 ) ;
updatePadTileCam();
return true;
}
public void updatePadTileCam()
{
var pad = InputManager.InputGamePad;
if ((pad.Scan & InputGamePadState.Up) != 0)
player2.PositionY -= 5;
if ((pad.Scan & InputGamePadState.Down) != 0)
player2.PositionY += 5;
if ((pad.Scan & InputGamePadState.Left) != 0)
player2.PositionX -= 5;
if ((pad.Scan & InputGamePadState.Right) != 0)
player2.PositionX += 5;
}
I want the player2(a SampleSprite) to be centered to the camera when I move the player2's position but it seems like the player is going faster than the camera. Need help thanks.
30-05-2012 02:13 PM - edited 30-05-2012 02:14 PM
Here is what I use for sprites:
public class Sprite
{
public Vector2 Position;
public float Rotation;
public int Texture;
public void SetTexture (int tex)
{
Texture = tex;
}
public void Draw ()
{
Vector2 p;
p.X = Position.X - Game.CameraPosition.X;
p.Y = Position.Y - Game.CameraPosition.Y;
GameTexture tex = Game.Textures[(int)Texture];
tex.drawAtPointScale (p.X, p.Y, 1.0f, Rotation+180);
}
}
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870