• 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.
Sign in to follow this  
Followers 0

My struggles need some insight!

3 posts in this topic

Before I speak I'd just like to tell you about my past.


For me programming started when I was about 13 or so, but it wasn't really programming but scripting for the Warcraft 3 game.

I really enjoyed the game and decided to learn how to make maps using their editor, it wasn't long before I discovered the two different types of coding the maps, the graphical interface and the typing environment.

I learnt quite a lot for my age about how classes, functions, variables, using ready made functions (sin/cos, atan2 e.t.c) worked and it really had an impact on me.


A few years later I found that you can make games on the xbox with Microsoft's XNA with C# and learnt that as my first programming language, I never really made anything amazing with it apart from moving basic objects around and I realised programming at age 15 would take more time and effort to get me anywhere.

I ended up not really learning much about C# despite it being a 'simple' language to understand and instead made a massive mistake.


That mistake was me learning C++.


At first it was hard to grasp any concepts that C++ had to offer.

What is a pointer!? Include? Namespace... ?


But as time went on I understood the basics of a C++ console program (I thought to myself maybe it wasn't a massive mistake after all... ), and began to make just small applications such as basic text games.

This was amusing but it irked me that I could only make text games, so I searched the web and found SDL, luckily I came across LazyFoo's website which helped me set it up and gave a lot of explanation on how SDL worked.

I learned to make basic windows in C++ which could render images.


Now we come to the present.


I am a 19 year old University student in my second year of studying computer science, I really enjoy this course as it will hopefully help me get into software development (hopefully games, but you just have to be grateful for what you're given right?).

From using SDL I have made games such as Tetris, Astroids, Snake, basic platformers and other tiling 'systems' (but not really systems, just tests to see what works, if you get me?).


My current project is to just get a basic RPG which I can build onto in the future, I know it is seems like a daunting project for a single person, but I want to devote time to it and just understand RPG concepts and have this type of game 'under my belt'.


I have been browsing gamedev.net for ages and I read many posts per day, they are all inspiring and I love seeing the work and progress that others like me are making.


My current problem.


As I've been developing my problems are about structuring my code / files and circular dependencies.


Structuring my code


As I am using C++ I have headers and source files, this leads to quite a lot of files and I'm curious if there is any special way people organise their files in a project? 

Like sub folders for files?

or Special naming conventions for things that are alike?


Circular dependencies


This is a joined problem with structuring my code, as I am in the process of making an RPG (albeit basic) I occasionally have thoughts on what I will do when I come to coding things. 

People say that circular dependencies are mostly unnecessary and can be avoided, I would like some help on trying to understand this for my project.



What is the best way to structure a Map having Player and NPC objects?


Should the Map have references to Player / NPC's or should it be the other way around? Should they all have references to each other?

Should a Map have positions of all objects on it? Or should the objects store their own positions?


Maybe I have my classes structured wrong, but this is what this site is for right? Insight, Knowledge, Feedback and Help!


Sorry for the long post about my life but it just felt right giving some background, and to show that I'm not just jumping into something way over my head.

Thank you for reading this and hopefully sharing your wisdom with me! smile.png



Share this post

Link to post
Share on other sites
[Disclaimer: I don't have any experience making anything like an RPG game.]

I would think the Map would know what the level looks like, the Characters would know where they are, and ideally the player would be just another Character, although I can see the case for treating it very differently. The Characters would know where they are (as in they have a member of type Point saying where they are). The Scene would be the object that knows about what Map we are playing on and what Characters exist in the game world.

I don't think there are any circular dependencies in that general way of structuring the code: Map and Character both use Points and the Scene has the Map and the Characters.

More generally, I usually structure my code so modules are users of lower-level modules and are used by higher-level modules. It's not always easy to structure things that way, but I usually find a way.

Share this post

Link to post
Share on other sites

[Disclaimer: I don't have any experience making anything like an RPG game.] either!


I think the player should know where his is at all times. (what map, objects near by, position).

For Maps sectors  in the system to know where the player is, I would register/unregistered the player to that sector as he comes in  that sector or moves out of that sector. This way your collusion code could navigate the system by sector and take a peek at the registered players count and spin off more threads on the collision routine in that sector if the count is higher. 


Just my drunk thoughts.



Edited by crow007

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0