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

methinks

Members
  • Content count

    215
  • Joined

  • Last visited

Community Reputation

222 Neutral

About methinks

  • Rank
    Member
  1. I'm trying to learn how to write plugins (OSX Yosemite). Everything compiles and runs properly, the shared object is loaded, but function in the shared object doesn't execute.   All the files remain in the same directory.   The host application, compiled as follows: g++ -ldl -o Host Host.cpp // Host.cpp   #include <iostream> #include <dlfcn.h> using namespace std; int main(int argc, char* argv[]) {     void * plugin = dlopen("Plugin.mod", RTLD_NOW);     if(plugin == nullptr)     {         cout << "Error opening file" << endl;     }     else     {         cout << "File open, attempting to access function" << endl;         dlerror();         dlsym(plugin, "run"); // This is where the line "Plugin Running" should be printed to the console         char * errMsg = dlerror();         if(errMsg)         {             cout << "Unable to access function" << endl;         }         else         {             cout << "Success: " << endl;         }         dlclose(plugin);     } } The plugin that gets called g++ -fPIC -c Plugin.cpp g++ -shared -o Plugin.mod Plugin.o // Plugin.cpp #include <iostream> using namespace std; extern "C" void run() {     cout << "Plugin running" << endl; } and the output: File open, attempting to access function Success:   Is this a problem with the code, or the compilation?
  2. Thanks for the feedback. I'll look into instanceof, it looks like it will do what I need for the type, though I'll still face the same problem for other pieces of data (Such as UUID).   To be honest, I don't know quite yet, the id will probably be used as keys in a HashMap, but I haven't gotten that far yet. Partly I'm just trying to understand the language itself.   Tried this, but I got the error "Duplicate Function"   For now I'll go with this; not as clean as I'd like, but functional class ItemA extends Item {   public static final String id = "ITEM_A";      @Override   public String getId()   {     return id;   } } then call ItemA.id or i.getId()
  3. I'm coming from C++, trying to learn Java. The issue is that Java doesn't allow overriding of static functions.   In this case, I would like each class that inherits from a parent (let's call it the Item class) to have an identifier that get by calling getId().   class Item {   abstract String getId(); } class ItemA extends Item {   String getId()   {     return "ITEM_A";   } } The thing is that I want to be able to call getId without having to instantiate the class, so that I can do something like this:   void foo(Item i) {   if(i.getId() == ItemA.getId())   {     //Do Something   } } Java doesn't allow abstract static functions, so I'm left with defining non-abstract static functions. As a result, the above function doesn't work, because i.getId() returns the Parent object's id, not that of the child object.   Are there any ways around this, or what would be a better way of dealing with it?  
  4. It doesn't look like a namespace issue, because they are showing the same namespace (a::A::A) Could it be that the project is trying to compile the same class multiple times? (Do you have an include guard in the header?)
  5. Ok, so a more generic version of the question: what is the best way to share the data between different classes that are completely un-related?
  6. I want to add a central data manager to my project, so that different classes can share data. It will also act as a map to avoid doubling up on resources.   [attachment=15516:layout1.png]   I figure that there are 3 ways I can do this: create the manager as a global (EVIL) pass the manager to each class as it is created (UGLY) create the manager as a singleton Every post I see says to avoid singletons, but is this a situation that breaks the rule, or is there a better solution?   Also, the graphic data above is just one type of data; realistically there will be many data types. To avoid having a whole mess of singletons, I would create a central data manager that has a factory class for each type:   [attachment=15517:layout2.png]   Oh yeah, I'm doing this in C++, but the concepts should apply to most languages
  7. The mesh is the data describing the points that make up the object (This includes faces and edges). This is just one small part of the model.   "Model" is a generic term. It means any data related to drawing a 3d item onto the screen. Exactly what data this includes depends on the program or file format. In some case it might just be the mesh, although usually it also includes some of the following: Material - the colours, shading models, and other things that determine how to apply lights and rendering Textures - the images that are mapped onto the mesh UV - co-ordinates that determine how textures are applied to the mesh vertex groups - used to break the model into smaller chunks for special purposes bones / armatures - used to link parts of the mesh to specific parts of animations animations - how the mesh moves ... the list goes on, depending on what you're trying to do with the mesh.
  8. The difference is what actually gets saved. The 3ds file only saves the model data itself (geometry, materials, etc) while the blender file contains structures explaining the data as well (the so-called DNA structure) that guarantees both forward and backward compatibility. Add to this the workspace setup (tool settings, layouts, preferences, etc), the blender file actually contains far more data. (To be very specific, the blender file is a direct dump of the internal data structure, while the 3ds is an optimized format to store only very specific data)
  9. I know that in directx, the 3d stereo works by shifting the camera and rendering two different images. I was wondering if there is any way to write directly to the buffer, to display different textures to each eye. This would be useful for having 3d background images, or in my case, writing a 3d image viewer. I know this can be done in opengl by accessing the quad buffer, but I haven't been able to find any documentation for directx. If it helps any, I'm working with nvidia cards. Thanks
  10. Thanks for the reply. Just a couple of questions/comments. How is your example different from the second example I gave, where the model does the processing. Quote:Original post by Antheus I don't see all that much use between following such designs too strictly in non-CRUD applications. Each of such frameworks ends up with some fatal flaw which requires horrible hacks to work around. Thanks for the input. Right now, I'm just trying to understand the design, to see if it'll do what I need. Quote:Original post by Antheus Paint application works on Image. Just about every OS provides all the required functionality out of box, from drawing, editing to input handling. There is not much need for abstractions. Same applies to many other problems. MVC makes only sense if building some well-tiered framework where certain functionality may deliberately not be available. The paint application was just an example, but even so, I'd like to keep some separation, to make it easier to port between platforms.
  11. I'm trying to understand the MVC pattern, and I'm having difficulty figuring out where data processing takes place. Let's say I was building a paint program using MVC, which would be the better way to go? the user draws a line the line is sent to the controller the controller processes the line, turning it into an image the line image is sent to the model, which adds it to the existing image data the controller tells the view to update the view gets and displays the updated image data or the user draws a line the line is sent to the controller the controller sends the line data to the model the model processes the line, and adds it to the existing image data the controller tells the view to update the view gets and displays the updated image data Thanks
  12. I'm getting the following warning when I compile my program: ld: warning: directory '/Users/alex/Library/Frameworks' following -F not found Does anybody know what causes this error, and ideally how to fix it? I'm pretty sure that it started after I updated xCode via the automatic update (xCode 3.2.2). Normally I wouldn't worry about it too much, but I'm having a problem rendering in opengl (via SDL), and I want to make sure that it's not because of some linking error. Thank you
  13. not exactly a clean solution, but it seems to work... thanks!
  14. This is probably just some stupid mistake, but I can't find it... I'm trying to use a static variable in a class, but it keeps giving me a link error. main program #include <iostream> #include "foo.h" int main (int argc, char* argv[]) { foo a; a.set(10); std::cout<<a.get()<<std::endl; return 0; } foo.h #ifndef FOO_H #define FOO_H #include <iostream> #include <string> class foo { public: void set(int); int get(); private: static int value; }; #endif //FOO_H foo.cpp #include "foo.h" void foo::set(int in) { value = in; } int foo::get() { return value; } The output: "foo::value", referenced from: foo::set(int) in foo.o foo::get() in foo.o ld: symbol(s) not found collect2: ld returned 1 exit status Using gcc4.2.1 on osx Thanks
  15. I ran into a small problem after I upgraded to xCode 3.1 Whenever I create a new project, it automatically appends the path where I want to put it with the project's name. For example, if I project path is: /myProject/src xCode will create it in /myProject/src/myProject In the last version of xCode, I could manually change it before the project was actually created, but now it doesn't give me that chance anymore. Does anybody know if I can change that behavior, or at least how to re-set the path? Thanks