devolution

Author Topic: CloneMaster: Welcome To The High Frontier...  (Read 60063 times)

0 Members and 1 Guest are viewing this topic.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Welcome To The High Frontier...
« Reply #30 on: May 08, 2010, 03:56:48 AM »
It's probably not you - my colour sense tends toward the gaudy, I'm afraid. I wanted something a but different from the blues and purples of WM, but beyond that, I'm certainly open to suggestions

Glad you like it apart from that.

Offline ShadowMage

  • Newbie
  • *
  • Posts: 32
Re: Welcome To The High Frontier...
« Reply #31 on: May 08, 2010, 07:24:43 AM »
Looking good so far  :)

Offline Cheese3

  • Donator
  • *****
  • Posts: 16
Re: Welcome To The High Frontier...
« Reply #32 on: May 08, 2010, 07:23:00 PM »
Looking really good so far. The yellow does seem a bit bright to me.

Offline SCO

  • Newbie
  • *
  • Posts: 20
Re: Welcome To The High Frontier...
« Reply #33 on: May 13, 2010, 03:31:45 AM »
What about some combination of green and grey?  Preferably something like a deep hunter green and a silver, or a warm french grey and kiwi green.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Welcome To The High Frontier...
« Reply #34 on: May 13, 2010, 05:56:02 AM »
That could work. Maybe tending more toward verdigris green and tarnished silver, to fit with the general look of post-industrial decay I originally had in mind.

.

Offline Kalebon

  • Newbie
  • *
  • Posts: 32
Re: Welcome To The High Frontier...
« Reply #35 on: May 28, 2010, 10:32:14 PM »
I cannot wait for a working version of this to try.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Welcome To The High Frontier...
« Reply #36 on: May 29, 2010, 02:52:31 AM »
Best I can tell you is that I'm working hard at it :)

The C++ side of things is done - it's largely a cut down version of the WM code. There's just a lot of Lua to write, including a lot of infrastructure stuff. It's getting there, though.

Hopefully I can find some time over this weekend to get some hours in :)

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Welcome To The High Frontier...
« Reply #37 on: June 04, 2010, 06:03:49 AM »
Just out of curiosity, how many of you would be interested in following the development process a little more closely on this? It's a long way from being playable, but there's a lot happening for all that.

If nothing else, I'd be interested in getting modder feedback on some of the APIs I'm setting up

Offline crazy

  • Hero Member
  • *****
  • Posts: 733
Re: Welcome To The High Frontier...
« Reply #38 on: June 04, 2010, 06:18:10 AM »
Just out of curiosity, how many of you would be interested in following the development process a little more closely on this? It's a long way from being playable, but there's a lot happening for all that.

If nothing else, I'd be interested in getting modder feedback on some of the APIs I'm setting up

id love to hear more about it you have some very interesting ideals going on in it.  Don't think i can help with modding anything but none the less would love to hear more info on this.

Offline pnakasone

  • Newbie
  • *
  • Posts: 21
Re: Welcome To The High Frontier...
« Reply #39 on: June 04, 2010, 11:00:04 AM »
i am not a modder but would like to look

Offline ShadowMage

  • Newbie
  • *
  • Posts: 32
Re: Welcome To The High Frontier...
« Reply #40 on: June 04, 2010, 02:42:09 PM »
I would love to hear more about it as well  :)

mothballd

  • Guest
Re: Welcome To The High Frontier...
« Reply #41 on: June 04, 2010, 10:51:30 PM »
Just out of curiosity, how many of you would be interested in following the development process a little more closely on this? It's a long way from being playable, but there's a lot happening for all that.

If nothing else, I'd be interested in getting modder feedback on some of the APIs I'm setting up

When I saw this thread I just about fell out of my seat.   I love WM and have been thinking of a space-based game similiar in concept for at least 2-3 months now, and then I see this thread and... well, my arse kinda hurts from hitting the floor ;)   I would absolutely love to see more of WMiS and in a few months when I start my computer science courses, maybe I can be more useful than just a fan.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Welcome To The High Frontier...
« Reply #42 on: June 05, 2010, 04:38:15 AM »
OK, cool. Let's start with a bit of background.

You can think of the current WM game as looking a bit like this:



The grey box is the C++ code, which we need to handle things like drawing pictures on the screen. The trouble is that C++ has a steep learning curve. There's a lot of stuff you have to get your head around before you can write "hello world", let alone understand how WM works.

The big problem though is that a lot of the game data, and almost all of the game logic, is embedded in the C++. That means that everyone is relying on the devs no only for changes to the display engine, but also for fairly simple changes to how the game works.  (Actually this makes WM look worse than it really is - necno did a good job of moving a lot of data out to text files. But the game still assumes a lot about the format of those files...)

Anyway...  the way I want CloneMaster to look is more like this:



Here we have the minimum data possible (where to look for the scripts and data files) in the C++ blob, and a lot of lua and XML files to control how the game works and what objects and characters appear in it.

That means you can leave the graphics engine stuff to the devs, but changing the game is open to anyone with a text editor. Of course, you still need to understand the game, and the script language.

The script language is Lua. It's a lot simpler than C++, and is used for  scripting in a lot of commercial gams. World of Warcraft is one. So there's a lot of tutorials out there., It's easy to learn.

As for understanding how the game works, that's something I want to explain in these posts. If nothing else, it means there'll be some documentation when I'm done with this :)

[edit]

Look at the start up. When you launch the program, the C++ part of the game looks in Resources/Script for a script called startup.lua. This is what it looks like:

Code: [Select]
-- most of the game data is bundled up an a module called "Game"
--
-- we'll need to include that
--
require "Game"

--
-- package.path tells the "require" function where to look for modules
-- the wm.log function writes to the game log
-- so this line logs the module search path as a debug aid
--
wm.log(package.path)

--
-- OK: we need to
--      * create the game object
--      * load all the window definitions
--      * set the background for the game window, and
--      * open the initial window
--
-- Start with the game object:
--
local game = Game:new()

--
-- now use the game object to load the windows
--
game:load_windows(
        "GameMenu.xml",
        "Intro.xml",
        "Chapter.xml",
        "Main.xml",
        "Cloning.xml"
)

--
-- set the window background
--
game:set_background("background")

--
-- push the first screen onto the stack
--

wm.show("game_menu")

return game

It's worth going over that in a bit more detail. There are some key concepts here. If you know a bit of Lua you'll already know some of this, of course.

Code: [Select]
  -- most of the game data is bundled up an a module called "Game"
  --
  -- we'll need to include that
  --
  require "Game"

First thing: two dashes together "--" in Lua mean a comment. Everything after them is ignored. You can also do multiline comments by starting with "--[[" and ending with "]]" but I don't use that so much.

The "require" function is a Lua builtin which loads a lua module. in this case the module is called Game. So this line tells lua to search for a module called "Game.lua" and to load it. The game module collects all the game data into one place, which is why we need to load it first thing.

Code: [Select]
--
-- package.path tells the "require" function where to look for modules
-- the wm.log function writes to the game log
-- so this line logs the module search path as a debug aid
--
wm.log(package.path)

wm.log means the  function caleld "log" in the "wm" namespace. The "wm" stands for "whore master" and is the namespace for all the C++ support functions. We'll use these to display screens, show messages and generally talk to the C++ end of things.

The log function is probably the simplest one - it writes to the game log. Here I'm printing package.path which is the search path used by lua when searching for modules. Basically, it's just a debug thing.

Code: [Select]
--
  -- OK: we need to
  --      * create the game object
  --      * load all the window definitions
  --      * set the background for the game window, and
  --      * open the initial window
  --
  -- Start with the game object:
  --
  local game = Game:new()

Right. As the comment says, this is where we create the Game object that collects the game data. By declaring the game variable with "local" we ensure that the variable is private to the file in which it is declared. This is a good idea, since it means that some other coder can't unwittingly use the same variable name somewhere else and change all your data when you're not expecting it.

Game:new() calls the  consructor for the Game class. The colon in Game:new means that the Game object (everything can be considered to be an object) gets passed as the first parameter. So Game:new() is the same as Game.new(Game). That's not hugely important here, but it will be later. For now, just remember that the difference can be important.

Anyway ...

Code: [Select]
--
-- now use the game object to load the windows
--
game:load_windows(
        "GameMenu.xml",
        "Intro.xml",
        "Chapter.xml",
        "Main.xml",
        "Cloning.xml"
)
 
This is a list of xml files defining screens in the game. "GameMenu" is the initial New/Load/Quit screen, Main is the equivalent of WM's brothel screen, cloning is the cloning lab screen, etc. The load_windows method looks for each of these in Resources/Interfaces and parses the XML to get screen definitions. The XML format is more or less the same as the one used in WhoreMaster. Once a window definition has been loaded like this, it can be displayed with the show function. Which we're about to do - but before that...

Code: [Select]
  --
  -- set the window background
  --
  game:set_background("background")
 

This sets the main window background. It looks for "background.jpg" in Resources/Images. Lastly ....


Code: [Select]
  --
  -- push the first screen onto the stack
  --
  wm.show("game_menu")

This displays the opening screen. Why "game_menu" rather than "GameMenu" or "GameMenu.xml"? Well, because the screen name in GameMenu.xml is defined as "game_menu". Which is possible not the most sensbile way to do it, now I think about it. wm.show is the show function in the wm namespace, which means that show() is another one of the functions written in C++ to talk to the game engine.

The other thing worth mentioning here is the idea of a screen stack. Essentially, you can have lots of screens displayed, all stacked one on top fo the other.  So in WM  you might have the Brothel screen open, with the town screen open on top of it (and hiding it) and then have the bank screen on top of that with the town screen still partly visible underneath. When you close the bank screen, you pop it off the stack, and the town screen becomes fully visible and active. So when I talk about pushing and popping the stack, that's what it means. The screen stack is part of the basic WM architecure, going back to necno's earliest released version.

So: that's talked about
  • modules and how to require them
  • the wm namespace and how it contains the C++ interface functions
  • how to write to the log from a script
  • The Game class
  • how to load and display a screen
  • how to set the window background
  • and comments
Which is probably enough for one session. More later.
« Last Edit: June 05, 2010, 12:22:06 PM by DocClox »

Offline sgb

  • Sr. Member
  • ****
  • Posts: 380
Re: Welcome To The High Frontier...
« Reply #43 on: June 05, 2010, 03:06:25 PM »
There's a fine line between how configurable you want the game to be by the user though.  While there are numerous things I'd love to have modified with WM (traits!), there are certain things I'd just end up abusing (missions, gang balance, events, etc.) to the point where the only traces of the original game would be the UI and core gameplay concepts.  Now I love having a lot of customization; it's the entire reason I've been following and contributing to the WM community since the earliest beta versions, and why I quickly got bored with similar games like Slave Maker 2 and Simbrothel (once you 'beat' them there's no reason to play them again, as it's always the same game).  However, IMO there needs to be at least some aspects of the game where the devs just put their foot down for the sake of consistancy.  If the player can modify nearly everything, then the end result can be something that barely even resembles the original devs work.  You'd be 'selling' an engine in essence, not a game.  Now maybe that's exactly what you want to do, in which case go for it.  If it isn't though, I think you need to carefully consider what things make sense for the user to be able to modify.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Welcome To The High Frontier...
« Reply #44 on: June 05, 2010, 03:43:02 PM »
While there are numerous things I'd love to have modified with WM (traits!), there are certain things I'd just end up abusing (missions, gang balance, events, etc.) to the point where the only traces of the original game would be the UI and core gameplay concepts. 

Which is a fair point, I think. The thing is, I think that line already gets crossed in WM. There are items kicking around that will let you cheaply break any girl. You can remove sterility so the robot girls can have babies and in fact some of the girls in the addon packs are way overpowered compared to the originals. And of course the game comes with a cheat mode that gives you infinite money and a few other goodies as well.

And yet I don't think the game is the worse for any of this.

You'd be 'selling' an engine in essence, not a game.  Now maybe that's exactly what you want to do, in which case go for it.  If it isn't though, I think you need to carefully consider what things make sense for the user to be able to modify.

I think I'd be OK with that, to be honest. What I'd like is for this to be the first cut of the 2.0 engine for WhoreMaster, along with a good game to serve as a demo/proof-of-concept/example, and as a bonus, I can use some of the ideas I had for WM, but without having first to persuade half the world that I'm not going to break the game.

Really though, I'm not sure there's going to be a problem. I play a lot of Oblivion, which has a ton of God Mods. But it also has a lot of reasonable ones, and most people don't seem use to the use the god items. For that matter, I've been in a position to abuse WM for some time now, but aside from tweaking the config to set the player's chance of knocking up a girl to around 90%, I tend to play with vanilla settings.

But at the end of the day, I'd be happy with engine + demo :)
« Last Edit: June 05, 2010, 06:32:49 PM by DocClox »