• 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

122 Neutral

About Agnor

  • Rank
  1. In more practical terms: Imagine I have a huge file (say, 100 MB) and I only want to access to 500 KB that are around the middle of the file (retrieve them with a char array) How much memory (approximately) would the program use? Also if I open a file stream (as in fstream file("test.big")) on, say, a constructor it wouldn't load into memory the full 100 MB file, it would only open a small chunk (a few KBs), ready for more extraction?
  2. Thanks for your answers. Quote:I would recommend using an pre-existing library like PhysFS. I've looked into the library and liked it, but I'll try to use a design of my own, for learning purposes. Quote:I think your approach is viable. You've just re-invented the header/data design which is so common already (I don't mean that in a negative way -- I mean, *obviously* it's viable) I've based my approach on zip and pak formats, so, yes, it's quite common. However, they didn't have separate files for header/data (they stored the header below the data). Quote:Beware of using big files that pack everything together I'm planning the format so it can support multiple DATA files.
  3. I'm developing a resource manager in C++. I'm developing an archive format, but I have a doubt about how C++ handles files (streams), that would condition my file format design. First I'll explain how my ideal archive format would work. I have two types of files (let's call them DATA type and POINTER type). The DATA type would be a huge "array" of binary files. The POINTER type would be a collection of pointers to a binary file that is on the DATA file. To exemplify: POINTER file type: (...) id: "texture/coat.bmp" pointer: 23341 ------ id: "audio/test.wav" pointer: 11931 ------ DATA file type: (...) position: 11931 data: xxxxxxxxxxxxxxxxxxxxx (...) At the beginning of level 1, level1.POINTER would be opened. This would make all DATA ids available to the resource manager (without loading the data, unless specified). At the end of level 1, level1.POINTER would be freed making all loaded resources to be freed. This simple design would allow less overhead to map resource ids to its resource (each id would only be loaded when really needed) and it would allow different levels to point to the same data chunk. My question is the following: How does fstream open a file? Does it copy the file completely to memory (making it useless to create a big DATA file, in that case it would be better to separate the data into levels and merge the POINTER into the data file)? Or does it only copy a pointer to the file and only copies to memory when asked to (this would be my guess, but I'm not sure...). Also do you think my design is viable, or should I opt for another? And should I use C++ fstream or C file handling (I would prefer to use C++ whenever possible, but if C is more efficient, tell me!) Thanks!
  4. Hi, I' developing an event manager for my game, with C++, STL(vectors and lists) and Boost (shared_ptr). I have four main classes for it: Event, parent class to KeyboardEvent, MouseEvent, RenderEvent, SoundEvent (for instance); EventListener, parent class for listeners from different Event types. It has a vector with various callbacks (accessible by enumerations, like ON_KEYDOWN, ON_MOUSEMOVE, etc.); EventPoster, has a list of events (FIFO) to be processed. Can add or process events; EventManager, creates a static singleton of the EventPoster and has a vector with the various listeners. The problem is when it comes to implement derived Event classes. I figured that the arguments needed for processing MouseEvents and KeyboardEvents were different, so I created a Args class that is the parent of MouseArgs, KeyboardArgs, etc. For instance, MouseArgs has a Point object (coordinates of the mouse) and a Button enumeration, while KeyboardArgs has just a Keys enumeration. I want something like this: class Event { ... virtual void setArgs(Args* arg) = 0; virtual Args* getArgs() = 0; }; class KeyboardEvent : public Event { void setArgs(KeyboardArgs* arg); KeyboardArgs* getArgs(); }; But this obviously doesn't work. Any ideas? How did you passed arguments on an event, when you created your event manager? I could give up polymorphism, but that would be like creating hundreds of inflexible code, so, any solution? Thanks
  5. You can use system("PAUSE"), but I prefer this way: #include <iostream> using namespace std; //because cout and cin are part of std namespace int main(){ cout << "Hello, World!"; cin.get(); //waits for the RETURN key return 0; } I think this code work in most C++ compilers