• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

116 Neutral

About MrZeo

  • Rank

Personal Information

  • Location
  1. Its hard to tell, maybe you are incorrectly substracting 1 when looping through your body parts in draw?   for (int i = 0; i < wormBodyTexture.Count; i++)   Have you considered making a simple BodyPart class, and making a list of those that would represent the worm. First object in the list would be the head and last one the tail. When the worm moves you would just remove the last item from the list and insert new one at the start of the list based on direction you are going. When you eat something you just dont remove the last item and thus the worm gets larger. For collision you can easily check if the new head position collides with any other BodyPart in the list or walls of the map. When drawing you would just loop through the list, drawing the first part with head texture, last with tail, and the rest with body texture. Later on when you have the basics down you could easily expand the class to do all kinds of neat stuff. I hope that wasn't too confusing. :>
  2. Vector2 is a struct and therefore a value type. When you return value from list you actually get a copy of the value instead of reference. That is why you can't modify the original value in list.   EDIT: This should work not sure if it is a good way to do it though:   var temp = wormBodyPosition[i]; temp.X += wormBodyWidth; wormBodyPosition[i] = temp;
  3.   Thank you, excactly the information I needed, the built in serializer isn't very well documented.   Now for example I'm deserializing class something like this: public class SomeDataList { [ContentSerializer] private SomeData[] data; // public properties and other stuff. public SomeDataList() {} public SomeData GetSomeData(int index) { // return stuff. } }   If I understood correctly the serializer requires parameterless constructor. Can I just mark this constructor private to only ever create instances of the class during content loading?   Also just to clarify I am correct on this right? // Both reference the same object. SomeDataList listFirst = Content.Load<SomeDataList>("ListOne"); SomeDataList listSecond = Content.Load<SomeDataList>("ListOne"); // Two different objects. SomeDataList listFirst = Content.Load<SomeDataList>("ListOne"); SomeDataList listSecond = Content.Load<SomeDataList>("ListTwo");   Thanks for the help again. :>
  4. I'm bit confused why do I have to format array of Rectangles like this: <SourceRect> 0 0 48 36 48 0 48 36 </SourceRect> ...instead of using <item></item> or <Rectangle></Rectangle> tags for each component in array?   I've been using the default method described here to load XML content in to the XNA project: http://msdn.microsoft.com/en-us/library/ff604979.aspx
  5. Thx for all the replies! I have to be able to interact with the map runtime so I don't think splitting it to textures would work. I was able to make some progress though. I dropped the whole idea of separate tile class and instead have the data in simple byte[x,y,z] array. I'm not really sure what was causing the slowdown before but now I can run steady 60 fps as long as I don't zoom too far out.   I probably have to change to SpriteSortMode.BackToFront so that I can utilize layerdepth for sorting. Even though I'm already naturally sorting the map itself, I have to somehow get depth sorted with moving objects that might be behind parts of the map.   Here is the draw/culling, not pretty but does the job:   public void Draw(SpriteBatch spriteBatch) { // Start tile of horizontal row to be drawn. int dx = topLeft.X; int dy = topLeft.Y; // Tile to be drawn. int x, y; bool swap = true; spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, camera.GetViewMatrix()); do { // Update tile to start coordinates of new row. x = dx; y = dy; do { // Make sure we are within map limits. if (x >= 0 && x < Map.X && y >= 0 && y < Map.Y) { for (int z = 0; z < Map.Z; z++) { if (data[x, y, z] > 0) { tilePosition = IsoTransform(x, y); GetTileData(data[x, y, z], z, ref sourceRect, ref tileAlpha); spriteBatch.Draw(tileSheet, tilePosition, sourceRect, tileColor * tileAlpha, 0, tileOrigin, 1f, SpriteEffects.None, 0); } } } // Add to draw our next horizontal tile. x++; y--; } while (x <= dx + maxX); // Horizontal row done. // Add to either dx or dy to get to the next row. if (swap) { dx += 1; swap = false; } else { dy += 1; swap = true; } } while (dy <= topLeft.Y + maxY); // We are done drawing once we reach maxY. spriteBatch.End(); }         private void UpdateLimits()         {             // Get view rect coordinates.             Vector2 topLeft = Vector2.Transform(new Vector2(0, 0), camera.InverseViewMatrix);             Vector2 bottomRight = Vector2.Transform(screenSize, camera.InverseViewMatrix);             // Calculate how many tiles fit in to this view.             maxX = (int)(bottomRight.X - topLeft.X) / Tile.X;             maxY = (int)(bottomRight.Y - topLeft.Y) / Tile.Y;             // Get first tile to be drawn.             this.topLeft = WorldToTile(topLeft, false);             // Add a bit extra around the view to make sure half tiles get drawn.             maxX += 3;             maxY += 3;             this.topLeft.X -= 2;         }  
  6. Hello everyone!   I've been recently working on 2d isometric tile engine using XNA as school project. I've set up the engine to limit drawing only to what is inside the camera view. Problem is as soon as I start zooming out and therefore increasing the amount of tiles to be drawn the framerate starts to drop really fast. Around 100x100x3 (3 is the amount of layers for grass, roads etc) draw calls is enough to go from 60 to 50 FPS.   So how do other tile based games handle drawing large areas? For example I remember in OpenTTD you could zoom pretty far out and have huge maps (something like 2048x2048) yet it was really smooth. Thank you in advance for any solution/different approach you might have.   Also I'm new here, so hi again! I hope this is the right section for this topic.