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

acidleaf

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

168 Neutral

About acidleaf

  • Rank
    Newbie
  1. [size=3](Is there an edit post option here?)[/size] Just to be clear, currently all of my game states are implemented as different classes (MainMenu, Options, etc.), and each of them has an init() method which is called when they are switched into the game.
  2. Thanks guys for the kind replies and suggestions. Another question, say I want to use Lua to configure my game GUIs. Do I expose the various GUI elements' member functions such as [font=courier new,courier,monospace]setPosition(x, y)[/font] to Lua, and then in the GUI's [font=courier new,courier,monospace]init[/font] method I run the Lua function that handles the positioning of these GUI controls? Or would it be a better approach to make the GUI's class (for example the MainMenu class) exposed to Lua and do everything in Lua instead?
  3. So assuming I use the singleton implementation, I will have to set up a loop to call luaL_dofile for each of the scripts I will use in my game, and from there when I want to call a function in Lua, I will use the ScriptManager and manipulate the stack to call the Lua function?
  4. I'm programming a game in C++, and I've decided to integrate Lua into it to separate several parts of the game. Currently my ideas of implementing it is to create a ScriptManager singleton class to handle all scripts in the game. This singleton will maintain a single Lua state which will be shared across every game object that are exposed to Lua. Then any calls to scripts will refer to this ScriptManager class and call something like ScriptManager::DoScript("script.lua"); [font=arial,helvetica,sans-serif]How do you guys manage scripts in your game?[/font]
  5. Hi guys, thanks for the replies! I finally got what I wanted to do. [CODE]if (fullscreen) { GLfloat aspect = 4.0f / 3.0f; int screenWidth = GetSystemMetrics(SM_CXSCREEN); int screenHeight = GetSystemMetrics(SM_CYSCREEN); int viewWidth = screenWidth; int viewHeight = screenWidth / aspect; if (viewHeight > screenHeight) { viewHeight = screenHeight; viewWidth = screenHeight * aspect; } int vportX = (screenWidth - viewWidth) / 2; int vportY = (screenHeight - viewHeight) / 2; glViewport(vportX, vportY, viewWidth, viewHeight); }[/CODE] This results in the viewport's height matching the window's height, and the width will be adjusted to match the aspect ratio.
  6. Hey guys. I'm writing a game that has to take into account fullscreen and windowed modes. I'm basically using a fullscreen borderless window for the fullscreen mode. What I want to do for fullscreen mode is to get the user's desktop resolution, and create a viewport that has the same horizontal resolution as the user's desktop, and still maintain the aspect ratio. And to do this, I'm thinking of adding black borders to both sides of the screen which aren't filled. What I know is I need to use glViewport to set a viewport and glScissor to clip the outside of the viewport. But how to I set this up so that the viewport is centered on the screen? And if I do this, do I have to specify the coordinates in my game according to the offset created by the black bars on the sides? Or will OpenGL automatically map my coordinates inside the viewport's rectangle? Help is very much appreciated. Thank you very much. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  7. Hi! Thanks for your reply. That worked perfectly! I will continue on my design and see if it works. Thank you :D
  8. Hello GD! This is my first post here, nice to meet you all! Currently I'm taking baby steps into DirectX, and I have a question that I'm not sure if it fits into this forum...so admins please move it to the correct one if needed! Thanks! I am making a game where a spaceship is flying through space avoiding asteroids. There are four kinds of asteroids, each differing in shape, and they are loaded in as meshes. I find that loading the mesh each time an asteroid is created is a waste of CPU, so I've decided to make a manager class for it. The manager class will be responsible for loading each mesh at runtime and passing out pointers to these meshes for each instance of the asteroid to be drawn. My first question is, is this approach appropriate? And my second question, here's my code: AsteroidManager.h: class AsteroidManager { const static int NUM_MESHES = 4; static LPD3DXMESH _mesh[NUM_MESHES]; static D3DMATERIAL9 **_materials; static LPDIRECT3DTEXTURE9 **_textures; static DWORD *_numMat; public: static bool loadMeshes(); }; AsteroidManager.cpp: #inclulde "AsteroidManager.h" LPD3DXMESH AsteroidManager::_mesh[NUM_MESHES]; D3DMATERIAL9 AsteroidManager::**_materials; LPDIRECT3DTEXTURE9 AsteroidManager::**_textures; DWORD AsteroidManager::*_numMat; bool AsteroidManager::loadMeshes() { _materials = new D3DMATERIAL9*[NUM_MESHES]; _textures = new LPDIRECT3DTEXTURE9*[NUM_MESHES]; _numMat = new DWORD[NUM_MESHES]; // The rest goes here // ... return true; } loadMeshes is called during initialization of my game. When I compile my program, it gives: error LNK2001: unresolved external symbol "private: static unsigned long * AsteroidManager::_numMat" (?_numMat@AsteroidManager@@0PAKA) error LNK2001: unresolved external symbol "private: static struct IDirect3DTexture9 * * * AsteroidManager::_textures" (?_textures@AsteroidManager@@0PAPAPAUIDirect3DTexture9@@A) error LNK2001: unresolved external symbol "private: static struct _D3DMATERIAL9 * * AsteroidManager::_materials" (?_materials@MeteorManager@@0PAPAU_D3DMATERIAL9@@A) Am I declaring my variables correctly? Please guide me :( Thanks alot for your time!