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

Archived

This topic is now archived and is closed to further replies.

Toolmaker

Using LUA in my MUD server

3 posts in this topic

I am currently developing a MUD server and I am almost at a point of starting to write the commands for the server(Movement, admin, fighting, spells, picking up items, etc.). After seeing the article about LUA on the main page I came up with the idea of making the command handler scripted while having a sort of API inside the server. My question however is, how will this look like? Should I write a class, CCommandHandler which will process the script any further? And how will I be able to have interaction between different objects? Because, I could even script my movement handler, battle system, etc. This are the classes I am thinking of getting scripted inside the server: - Movement(Changes current pos of the player and notifies players in the rooms that the player leaves and or arrives in a room). It uses the UserDB for this for interaction. - Command handling(Uses UserDB, battle system, item DB, spell DB, etc.). If a player executes a command, this system needs to trigger the appropriate action. - Battle system(Uses userDb, Race DB, etc.). Depending on different items the player is currently holding(Not in back pack) and depending on the race, the player will withstand some attacks easier then others. - Scripted actions. Some IRC style actions like .slap, .me, etc. - NPCs So, how would this work? I haven''t read the LUA article yet, but I will after finishing the user DB class(Only need to add some accessors). Toolmaker
-Earth is 98% full. Please delete anybody you can.
0

Share this post


Link to post
Share on other sites
Strangely enough, I am about to embark on the same project, namely embedding Lua into a MUD.

One thing worth considering is whether you are doing this scripting just to make your life easier, or whether you intend extending it to your administrative players too, as that might influence the functions you expose to the outside world.

To be honest, your question is a bit vague, given that we have little knowledge of why you want to use Lua, who will use it, and what kind of functions it will tie into. If it''s just a case of scripting commands, you just need an interface from the command dispatcher to one of the commands in Lua, and Lua interfaces to whatever database manipulation you need. I firmly believe that you''ll only really know what functions you need to expose to Lua by trying to write your scripts and seeing what functionality you require.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
0

Share this post


Link to post
Share on other sites
Thx for the reply Kylotan. Seems like I am about to start working on the first scripted system. I will read the LUA article and try some stuff before implementing the scripting into the server.

Toolmaker



-Earth is 98% full. Please delete anybody you can.
0

Share this post


Link to post
Share on other sites
I''ve been thinking about things a bit more, my initial API will consist of 3 distinct layers.

The first layer locates characters, rooms, or objects, based on a set of criteria. eg. GetCharsHereByName would take a RoomID and return a table of CharacterIDs for the characters in the room. Some of the functions can take a predicate function as a parameter to further customise their behaviour.

The second layer will take a table of character, room, or object IDs and perform actions on them. This lets me deal damage, increase strength, bestow protections, etc. Since the first layer always returns a table of IDs, the second layer works just as well on multiple targets as it does on single ones.

With this system, many events are just 1 or 2 lines of code: one to locate the victim(s) and one to apply the results.

The 3rd layer will be a separate set of querying functions. This will probably be a set of several functions that operate on a single Character, Room, or Object ID, and some sort of aggregation functions such as Sum, Multiply, Maximum, Minimum, and Average functions that take a table of IDs plus one of the previous querying functions. Pretty much any value can be calculated in 1 or 2 lines that way.

Of course, that''s the theory. I''ve yet to put it into practice.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
0

Share this post


Link to post
Share on other sites