• 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.

Toshio

Members
  • Content count

    21
  • Joined

  • Last visited

Community Reputation

135 Neutral

About Toshio

  • Rank
    Member
  1. Thank you all, fixed the problem by moving the texture coordinates
  2. [quote name='Manabreak' timestamp='1345380483' post='4971092'] I think the artifacts are caused by wrapping. Clamping the texture to edges should prevent this. [/quote] I am using Clamp to edge. [quote name='Sponji' timestamp='1345394533' post='4971143'] The easiest way to fix those lines is probably to move the texture coordinates by 0.5 pixels. And for your timestepping problem: [url="http://gafferongames.com/game-physics/fix-your-timestep/"]http://gafferongames...-your-timestep/[/url] [/quote] How can I move the texture coordinates by pixels?
  3. Greetings. I have two problems here. First off, I'm using OpenGL with SDL. The first problem are weird lines around the transparent PNG picture as shown in the screenshot: [attachment=10761:screenshot.png] This is the PNG picture: [attachment=10762:catanimate.png] How can I make the lines disappear? The second problem is Frame Independent Movement. I got it all set up, and I thought it worked until a lot of things went happening at the same time. At some places entities move very fast, at some very slow, depending on what's rendering on screen and what logic is currently happening. Here is some code: this is main.cpp: [CODE] Uint32 delta = SDL_GetTicks(); SDL_Event event; g.OnInit(); while(g.running) { if(SDL_PollEvent(&event)) { g.OnEvent(&event); } g.OnLoop(SDL_GetTicks() - delta); delta = SDL_GetTicks(); g.OnRender(); } [/CODE] and this is how the player, for example, moves: [CODE] x += xVel * (delta / 1000.0f); [/CODE] Thank you for your help [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  4. Greetings. I have two problems here. First off, I'm using OpenGL with SDL. The first problem are weird lines around the transparent PNG picture as shown in the screenshot: [attachment=10678:screenshot.png] This is the PNG picture: [attachment=10677:catanimate.png] How can I make the lines disappear? The second problem is Frame Independent Movement. I got it all set up, and I thought it worked until a lot of things went happening at the same time. At some places entities move very fast, at some very slow, depending on what's rendering on screen and what logic is currently happening. Here is some code: this is main.cpp: [CODE] Uint32 delta = SDL_GetTicks(); SDL_Event event; g.OnInit(); while(g.running) { if(SDL_PollEvent(&event)) { g.OnEvent(&event); } g.OnLoop(SDL_GetTicks() - delta); delta = SDL_GetTicks(); g.OnRender(); } [/CODE] and this is how the player, for example, moves: [CODE] x += xVel * (delta / 1000.0f); [/CODE] Thank you for your help [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  5. Wow, thank you Servant of the Lord. Everything works now Thanks ApochPiQ and everyone else who helped
  6. [CODE] void Game::OnInit() { Map map; Player p(map); p.Init(); } void Game::OnLoop() { Map map; Player p(map); p.Move(); } [/CODE] Nothing compiles as it should. Here are those two functions: [CODE] void Player::Init() { CSurface c; x = 100; y = 100; texture = c.loadTexture("player.png"); } void Player::Move() { x += xVel * (delta / 1000.0f); y += yVel * (delta / 1000.0f); //... } [/CODE]
  7. Hmm.. It compiles now, but the initialization, loop and rendering of the Player all got messed up. None works properly.. Anyone knows why that might have happened?
  8. Ah, thank you so much. That part works now But how does the Player constructor look like in the Player code (.cpp) file?
  9. I actually do have the "Map m;" line above the "Player p;" one, just didn't write it in the post. [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] But yeah, it doesn't work. [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img] Here's the code I'm trying to compile: [CODE] class Game { Map map; Player p(map); public: Game(); //... }; [/CODE] ... and here is the Player class header file code: [CODE] class Player { Map& m; public: Player(Map& map) : m(map) {} //... }; [/CODE]
  10. [quote name='rnlf' timestamp='1342173357' post='4958724'] Are you sure you want every player to have her own map? Because that's what you are doing right now. What you want to do, is pass a reference to your map to the player, like this: [CODE] class Player { Map& m; public: Player(Map& map) : m(map) { ... old constructor code ... } }; in main: set up the map as you did before, then when creating the player: Player player(map); // or largeMap [/CODE] This way you only have one map for all players, all referencing the same data. If you do it the way you did, you create an empty map for every player, and one in your main, which you never use. [/quote] I've been struggling with this for a few days now. I do all it says here, but it always returns some kind of an error. The error it returns when I write as it says is: "error: 'map' is not a type" pointing to this line "Player p(map);".
  11. [CODE] class Player { Map m; public: Player(); void Init(); //... } [/CODE] I set the width and the height inside the Map class.
  12. Wow, thanks, I can make the map any size I want. But, I create the map and do all of this inside my Map class. And when again I want to get the tile in the Player class, it returns 0.
  13. Hi there. I hope someone could help me solve this problem. I suspect this is not the way to do it, but here's the code: [CODE] int tile[210][210]; int Map::getTile(int a, int b) { return tile[a][b]; } [/CODE] When I want to return the element in a different class, it returns 0. Also, I can't make my tilemap (tile[a][b]) bigger than 212 * 212. The game crashes just after it launches. Thanks for your help.
  14. I'd like to present you a tile map converter I made. It's basically a Console Application in which you type in some data and the program converts a picture (Bitmap) you loaded to a level.map file. In the level.map file you can find bunch numbers. Each of them represents a tile type you've set in the Console. It is intended for beginners but can be used by advanced users too. [size=5][b]Download here:[/b] [url="http://www.mediafire.com/download.php?stk7e1cep3o19u2"]http://www.mediafire...stk7e1cep3o19u2[/url][/size] [b]Video:[/b] [url="http://www.youtube.com/embed/LnhX8YuOgfc"]http://www.youtube.c...bed/LnhX8YuOgfc[/url] [b]A few screenshots:[/b] [attachment=8420:Capture.PNG] [attachment=8421:Capture.PNG] [attachment=8423:Capture3.PNG] [attachment=8422:Capture2.png]
  15. Anyone? [img]http://public.gamedev.net//public/style_emoticons/default/unsure.png[/img]