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

RH101

Members
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

691 Good

About RH101

  • Rank
    Member
  1.   FIrstly, you can use Javascript in Unity (well, Unity's own flavor of Javascript) to get you started, and you can use C# at the same time (in separate files).   Now, regarding making a slots game.  It's not as easy as it may seem, but in no way is that supposed to turn you off attempting to create one.  I've personally implemented slots games using many different game engines, including Unity, Cocos2D-x, Win2D etc, and regardless of which programming language or game engine you decide to use, the algorithms for slots games are always the same.   To create a slots game, you also have to factor in the mathematical model for the game, which includes things like the pay ratios, the RTP (return to player) percentage, the RTP contribution from the feature games (such as a free spins feature), the reel layout (for example, 5 reels by 3 symbols), the type of wins (line wins/scatter wins/all way wins etc), and the line patterns for line games.   You then need to work out how to calculate the wins based on the symbols visible on the screen (the symbol matrix).  This alone may require a considerable amount of design and coding, since a different algorithm is required for each type of pay (left to right line pay, any position scatter pay, left to right scatter pay, left to right all ways scatter pays etc etc).   Working out the mathematical model behind the game is also not a trivial thing.  If you get the mathematics wrong, your game will either pay too much or not enough, or just simply not engage the players in such a way as to keep them interested in the playing the game.  There are sources of info on the internet with samples of game mathematics if you're keen to dive in and try to figure it all out.    Here are a few sites and research papers that may help:   http://wizardofodds.com/games/slots/atkins-diet/ https://www.researchgate.net/publication/247919295_PAR_Sheets_probabilities_and_slot_machine_play_Implications_for_problem_and_non-problem_gambling   http://slotdesigner.com/publications/   Search for "PAR Sheet", and it will show you the type of mathematics required for a slots game.   From experience, I suggest you focus on the following in the specific order set out below:   - Create test data (reel strips, pay tables etc) - Implement the reel spin so you can see the reels spinning on the screen. - Work out how to grab the current on screen symbols into a 2D matrix (Rows x Columns). - Create a state machine to handle the different states of the game. The states may be something like this: Idle State (wait for a button press in here) Pre Play State (generate the random reel stop positions in here) Play State (you spin the reels in this state) Post Play State (do any animations you need if required in here) Calculate Win State (calculate the wins based on the stop positions in here) Show Win State (display the winning symbol animations in this state) End Game State (you go back to Idle state in here) - Work out the win calculation algorithms and implement them.  The win calculation routines can use the 2D matrix of the current symbols on the screen to detect winning combinations. - Add feature handling code - Add any extra accounting code you need - Now you can work out the real mathematics behind the slots game in order to make the game enjoyable. Leave the mathematics till the end since it's not required in order to get something displaying on the screen.   If you have any specific questions regarding slots games, then I'll do my best to answer them.
  2.   I haven't used the majority of the other .NET XML libraries besides XmlDocument/XMLReader, so I can't give you a real comparison or list advantages against them all.   The primary reason I wrote the C# wrapper for CMarkup was because when I used it in my C++ projects I found the API to be extremely intuitive compared to other C++ XML libraries.  It didn't get in the way of allowing me to get the job done very quickly.  The added bonus of using CMarkup was the is small memory footprint used to process large XML files at extremely fast speeds.  For these reasons, I wasn't about to let go of it when I ported a few projects over to .NET/C#. 
  3. Check out CMarkup for parsing XML.  I  can only say that it's amazingly fast and extremely easy to use.   http://www.firstobject.com/   I've even written a C# wrapper for CMarkup, and use it in a number of .NET projects.   Note: I don't work for First Objective Software, I'm simply a satisfied user of their product.
  4.   Think of a C++ std::vector as a dynamic array, or a container that holds a list of data in a sequence. Oversimplification, but I'm sure if you do an online search you'll figure it out very quickly.   As for an example of an Item, let's try this: class ShieldItem : public EquipableItem { public:     ShieldItem(std::string itemName, std::string itemType)         : itemName(itemName), itemType(itemType)     {         Action raiseShieldAction;         raiseShieldAction.id = "Raise Shield";         raiseShieldAction.actionType = "movement";         actionListpush_back(raiseShieldAction);         Action lowerShieldAction;         lowerShieldAction.id = "Lower Shield";         lowerShieldAction.actionType = "movement";         actionList.push_back(lowerShieldAction);         Action dropShieldAction;         dropShieldAction.id = "Drop Shield";         dropShieldAction.actionType = "movement";         actionList.push_back(dropShieldAction);     }     std::vector<Action> GetSupportedActions() override     {         return actionList;     }          void DoAction(std::string actionId) override     {         auto& action = std::find_if(actionList.begin(), actionList.end(), [actionId](const Action& action) {             return action->id == actionId;         });                  if (action != actionList.end())         {             HandleAction(action, this);  // send the action along with the item to some code that handles it         }     } private:     std::vector<std::string> actionList;     std::string itemName;     std::string itemType; } This is really not the best way to implement it by any means, but it's just an example to show you what may go between the { }, and how to add items to a list (the actionList vector), and it's not guaranteed to compile.  Also, the ECS method is a great way to deal with what you want, as Mike2343 mentioned.  As an example, Unity3D uses the component system to do what it does very well, if you want to see how such a system works.
  5.   Fair point regarding Action, since it's really just data and not much else.    With the Item class, I'm almost certain there will be a lot more in there (public/private members) than what I've quickly typed up, so probably best to keep it as a class, even if it is a pure virtual/abstract class.  Personal preference to an extent, using structs primarily for plain old data encapsulation and classes for anything more complex than that.
  6. A unique item can make available a list of commands/actions that it supports, so you could just use them as a way to interact with each unique item.   For example: class Action { public: std::string id; std::string actionType; } class Item { public: virtual std::string GetItemName(); virtual std::string GetItemType(); virtual std::vector<Action> GetSupportedActions(); virtual void DoAction(std::string actionId); } class EquipableItem : public Item { public: // add anything specific to EquipableItems } class ItemA : public EquipableItem { public: std::vector<Action> GetSupportedActions() override; void DoAction(std::string actionId) override; } class ItemB : public EquipableItem { public: std::vector<Action> GetSupportedActions() override; void DoAction(std::string actionId) override; } class ItemSlot { public: virtual std::string GetSlotId(); virtual std::vector<std::string> GetSupportedItemTypes(); // What kind of items can we equip in this slot virtual void EquipItem(EquipableItem* item); private: EquipableItem* equipedItem; } class Player { public: std::vector<Item> Inventory; std::vector<ItemSlot> ItemSlots; }
  7. Take a look here:   http://stackoverflow.com/questions/14451/what-is-the-best-way-to-make-a-delphi-application-completely-full-screen   In summary, set these properties for the form: BorderStyle := bsNone; WindowState := wsMaximized;
  8.   I'm almost certain that you can create your own custom project templates with all paths set up, so that when you create a new project, you can use this template as the base, and you don't have to add the SFML paths manually.   Do a web search for "Creating Visual Studio Project Templates"   These links may help:   http://msdn.microsoft.com/en-us/magazine/cc188697.aspx http://www.c-sharpcorner.com/UploadFile/370e35/create-your-own-project-template-in-visual-studio/
  9. Why don't you just print out the session variable, like with 'console.log' or whichever other command you have available to you. At least then you'll know what data you can use to verify the user (and if it is available at all in the session variable).   You should also sanitize the userID before injecting it into your SQL statement.
  10. Buying another book may not help.   Consider a subscription to something like www.gameinstitute.com, so you can follow a more structured and practical way of learning C++. I paid for one earlier this year ($99), and while I didn't need the C++ section, others I know have found it to be very helpful.  My main focus was the Unity3D lectures/tutorials on there.    You can also find an incredible amount of free sources of information for C++, so use a search engine to your advantage. 
  11. How many developers do you have in mind? How many artists? How many game designers? What is your time-frame? ... and many other questions to be answered before anyone can give you an answer to "How much does it cost to make XYZ?".   I'm not trying to mock you here, I'm just pointing out that your initial question is extremely difficult to answer without more information.  If you're lucky then the developers of Clash of Clans or Friendly Fire can get on here and give you a value, but that would still be completely meaningless without a breakdown of resources/time etc.
  12. I'm sure you're not the only one that is going through this specific issue.  You tend to have this amazing game idea in your mind, and when you think about how much work is required to do it, you get overwhelmed by your thoughts, and end up doing nothing.   What helped me personally is to break it down to something more manageable.  I wrote down what the game consists off, the player character, the enemies, the theme, what the environment should look like, etc. Then I focused on one of those items, and broke that down even further. For the character, I imagined what it would look like, but then realized I'm not exactly an artist, I'm a coder, and what it looks like is completely irrelevant to me with regards to code.  From then I just worked out what I needed to do to get the character image on the screen, how to animate it, control it, and then worked my way up from there, and repeated this process for each other item in the list.   My recommendation is that you do not write your own "game engine", and I'm sure that is a phase a lot of people who want to make games decide they want to do, even though they have never even tried out what is available out there... basically, don't reinvent the wheel.  You have a game idea, so stick to that.  If down the track you try game engines and you're experienced enough to know that what you want done is not possible with them, then look for ways to modify them to get what you want done.  If that still doesn't work out for you (which is unlikely, because there are many extremely flexible and mature game engines out there), then and only then should you even consider looking into how to make your own game engine.   Don't dive into C++ unless you really have to, and don't get hung up on a specific programming language.  Try out other languages in the many game engines out there, if just for the experience, and then you'll realize that the language you use isn't really that important.  You should use whatever allows you to put more focus on the game logic and content.   This is only my opinion on what helped me take a step forward, and kept me heading in that direction.  I hope it helps you in some way.
  13.   Have you been focusing on the C++ language more than programming concepts in general?  My only advice is to take a step back from C++, and just find information that teaches concepts (like OO design) without the distraction of trying to figure out how to apply the concepts in a specific language.   Off the top of my head, I can recommend some good books that may help, like Code Complete 2nd Ed., Refactoring (Fowler), Design Patters (Gamma et al), and Head First Design Patterns. There are many more decent sources of information, so use a search engine to your advantage. :)   I hope that helps.
  14. Why don't you add a specific class for the items in the menu, and let each item deal with the input.   For example, you have your TextMenu class, which is all well and good. Introduce a TextMenuItem class, and let the TextMenu class store a list of all TextMenuItems belonging to it.   In your main() you simply pass the input to the TextMenu class, and that iterates through the TextMenuItems, passing the same input to each item.  The TextMenuItem instance that accepts that input can then deal with it as required.  You may want to stop the TextMenu from iterating through the list once a TextMenuItem handles the input, and there are many ways to deal with that.   Here is an example that may help: class TextMenu { public: TextMenu(void); virtual ~TextMenu(void); virtual void HandleInput(char &input); void AddMenuItem(TextMenuItem *menuItem); private: std::list<TextMenuItem*> m_childItems; }; TextMenu::TextMenu(void) { } TextMenu::~TextMenu(void) { std::list<TextMenuItem*>::iterator it; for (it = m_childItems.begin(); it != m_childItems.end(); it++) { delete(*it); } } void TextMenu::HandleInput(char &input) { std::list<TextMenuItem*>::iterator it; for (it = m_childItems.begin(); it != m_childItems.end() && input != 0; it++) { (*it)->HandleInput(input); } } void TextMenu::AddMenuItem(TextMenuItem * menuItem) { if (menuItem != NULL) { m_childItems.push_back(menuItem); } } class TextMenuItem { public: TextMenuItem(void); virtual ~TextMenuItem(void); virtual void HandleInput(char &input); }; TextMenuItem::TextMenuItem(void) { } TextMenuItem::~TextMenuItem(void) { } void TextMenuItem::HandleInput(char &input) { } class CharacterCreator { public: CharacterCreator(void); virtual ~CharacterCreator(void); void CreateCharacter(); }; class CreateCharacterMenuItem : public TextMenuItem { public: CreateCharacterMenuItem(CharacterCreator * characterCreator); ~CreateCharacterMenuItem(void); void HandleInput(char &input); private: CharacterCreator * m_characterCreator; }; CreateCharacterMenuItem::CreateCharacterMenuItem(CharacterCreator * characterCreator) { m_characterCreator = characterCreator; } CreateCharacterMenuItem::~CreateCharacterMenuItem(void) { } void CreateCharacterMenuItem::HandleInput(char &input) { if (input == '4') { //Create a character if (m_characterCreator != NULL) { m_characterCreator->CreateCharacter(); } input = 0; // Invalidate the input so it is not handled by any other menu item } } Your main function would then look something like this: int main() { TextMenu * menu = new TextMenu(); //Add a memu item to the menu menu->AddMenuItem(new CreateCharacterMenuItem(new CharacterCreator())); // ...add more items here std::cout << ">"; char input; std::cin >> input; menu->HandleInput(input); return 0; }