Coder Social home page Coder Social logo

fabianschuiki / openskyscraper Goto Github PK

View Code? Open in Web Editor NEW
573.0 60.0 68.0 8.69 MB

Open source tower simulation game inspired by SimTower.

Home Page: openskyscraper.org

License: GNU General Public License v2.0

Shell 4.04% Lua 0.31% C++ 94.29% C 0.08% CMake 1.29%

openskyscraper's Introduction

This is the experimental restart branch of OpenSkyscraper.

You are welcome to join in the experiments, put forward suggestions or supply your own experimental code!

How to try stuff

After you've cloned the repository, run git submodule update --init . inside your cloned repository so the submodules are loaded appopriately.

To build the game, create a directory build and run $ cmake .. from within. Check that you have all the necessary dependencies installed by looking at the CMake output warnings/errors. Once your system checks out, run $ make to build, and $ ./OpenSkyscraper to launch the game. Observe the game's output carefully as it may contain some hints why stuff isn't working.

At the moment, you need a SIMTOWER.EXE installed somewhere on your system. The game searches a number of locations for this file. Check the WindowsNEExecutable.cpp.15, load: from .../SIMTOWER.EXE lines of output for a list of locations.

If you instead wish to use the SIMTOWER.EX_ compressed from the disk, you must build with the optional dependency of libmspack. As long as you have it installed in your system when you run "cmake .." then it should be picked up.

What is being tested?

Currently we're performing the following experiments and tests:

  • SFML as platform API (instead of SDL)
    • loads bitmaps, fonts and sounds directly from memory
    • modern C++ interface simplifies code

Coding Style

  • Add a copyright line in the top comment of each file you edit:

    /* Copyright © 2010-2014 John Doe */
    /* Copyright © 2013 Mark Mensk */
    
  • Everything resides in the OT namespace.

  • Source file names match the class names in capitalization, e.g. the class Application yields Application.{h|cpp}.

  • The directory hierarchy reflects the namespace hierarchy, so Math::Vector2D goes into Math/Vector2D.{h|cpp}.

There are some violations of this style left in the source. I'm working on getting rid of them.

General note on source files: Lowercase source files are likely to be outdated and removed in the future. They're probably there because they contain some working code snippet.

openskyscraper's People

Contributors

fabianschuiki avatar hoshi10 avatar jonhoo avatar martinpfannemueller avatar matthewharvey avatar tsuckow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openskyscraper's Issues

Uses of the SimTower's "Finger" Tool

(I don't mind using issues as places to have dev discussions, but if you all want this somewhere else so issues are always for open bugs, let me know.)

So I was working on making elevator shafts expandable this weekend, when I realized the finger tool wasn't implemented. So I went to go implement the finger tool... and I want to make sure I think of all of its use cases before I start.

In original SimTower, is the only use of the Finger Tool to expand or contract an elevator shaft?

Naturally, my copy of WINE decided on Sunday it wouldn't run SimTower, so I can't test this myself right now.

Abstracting resource code?

I think it'd be a good idea to abstract the original game's resources. Since we're decompiling it, it'd be much simpler to decompile it once and assemble all the resources into the named structure we have in memory in to a ZIP file. This would mean that custom graphics sets would be possible early on, and finding resources wouldn't be so darn difficult.

Seeing my other issue about Windows being required, this would tie in great to having a one-time extraction for the installer to output a ZIP for use.

Font Rendering

Any thoughts on how we should do the font rendering stuff? libfreetype? pango? bitmaps?
Or should we switch to a GUI framework like CEGUI?

Connecting Fast Food Causes Flood of People

If a fast food item is built without a connection to the lobby and it gets connected sometime during the day, all customers that were scheduled to arrive earlier that day will immediately queue up, which doesn't make sense.

Solution: For arriving customers, don't check whether the current absolute time is after the person's arrival time, but use the game->time.checkHour(...) to check whether the current frame just passed past the arrival time. Dispose of all other people whose arrival time is before the current time, but where the checkHour() call returns false.

Hard Limits

Should the world be infinitely expandable, or have hard (and relatively small) limits like the original simtower did? Obviously there are going to have to be limits somewhere, but how big should they be?

Mailing List

Would it be possible to set up a mailing list, for example on http://mailchimp.com/, so that interested future players can sign up to be notified when an alpha or beta is released?

Excessive Elevator Noise

Elevator sounds are too dominant at the moment. Not sure if their playback rate is affected by the new multiple playback prevention. Even running the debug tower with currently 3 elevator cars gets really annoying.

OpenSkyscraper expects SIMTOWER.EXE in cwd

Just something I noticed as i was packaging and testing my openskyscraper-git Arch Linux AUR package. I installed the OpenSkyscraper executable to /usr/bin/ and put SIMTOWER.EXE there as well. OpenSkyscraper failed to find the SIMTOWER.EXE resource. When I changed directory into /usr/bin, then it found the SIMTOWER.EXE resource.

It's easily worked around, but long-term we should look into a cross-platform location to put resources. Opening this issue as a discussion point.

Wiki doesn't fit due to large width screenshots

In WebKit browsers (haven't checked others), your wiki page seems to overflow without providing scrollbars to actually view the overflowed text. I think resizing your screenshots to fit the github width should fix this.

see http://puu.sh/WFe

I understand this is probably more of a github-side problem, but thought I'd point it out in case you weren't aware, as it does make it very hard to read your updates. Really enjoying watching this project evolve, by the way!

Compile error FindRocket.Cmake

Hey Guys, I just cloned the git and tried to compile it but I can't complete it because of the error below.

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Lua51: /usr/lib/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so
Found SFML: /usr/include
CMake Error at thirdparty/FindRocket.cmake:34 (string):
string end index: -1 is out of range 0 - 3
Call Stack (most recent call first):
CMakeLists.txt:87 (find_package)

CMake Error at thirdparty/FindRocket.cmake:36 (string):
string no output variable specified
Call Stack (most recent call first):
CMakeLists.txt:87 (find_package)

CMake Error at thirdparty/FindRocket.cmake:34 (string):
string end index: -1 is out of range 0 - 7
Call Stack (most recent call first):
CMakeLists.txt:87 (find_package)

CMake Error at thirdparty/FindRocket.cmake:36 (string):
string no output variable specified
Call Stack (most recent call first):
CMakeLists.txt:87 (find_package)

Found Rocket: ROCKET_INCLUDE_DIR-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ROCKET_INCLUDE_DIR
used as include directory in directory /home/junke/git/OpenSkyscraper

-- Configuring incomplete, errors occurred!

Floor/roof tile not shown except in lobby

At first i tought it has to be with the floor crash issue, but then, i watched the screenshots. As i dont exactly understand how the game gets the textures, i am a bit lost with it :S

Horewer i think the priority of that is low, as it doesn't crash the game

Certain sounds stop playing on Linux (Ubuntu 10.10)

I built the game yesterday on my Ubuntu 10.10 system and noticed that for some reason certain sounds (elevators for example) stopped working after some time for no apparent reason. Other effects like the birds and other background noise kept working.

This could be caused by OpenAL deleting some audio data buffer's content. Does anyone know of such issues in the Linux world?

cmake

After cloning the cmake will not build. files listed in the cmake do not reflect actual files.
tried to add all cpp files to cmake list part builds, but some headder locations are wrong.
Various build errors in source/game/classic/items/facilities/office/office.cpp Seems files are missing or outdated.

Multiplayer Authentication (How To Avoid Griefers?)

How would players connect to a server? What information would they need to provide? A username/password? What would be done to prevent griefers (players who simply destroy other player's stuff for their enjoyment)?

There's a couple options I can think of:

  • Centralized authentication system for usernames and passwords
    • Someone sets up an authentication server, and keeps track of usernames as well as their respective password hashes.
    • People register usernames (we should include a fee here), and are then given the ability to login to any server which is open to the "public".
    • If they do something bad, the server admin bans them, and they can't login again with the same username until the admin lets them back on.
    • If they wish to login and grief the same server again, they will have to purchase another username. This way, we could profit off such destructive behavior (although money becomes a contentious issue with open source projects sometimes).
    • To prevent such users from going and attacking other servers, we could have a "karma" associated with each account, and give server admins the ability to set a "karma threshold". Players could gain karma by playing the game without getting kicked, by getting awarded it by other players, or by slowly gaining it back over time. Users would start with 0 karma.
  • Passwords per-server if the server admin has issues with griefing
    • Could be combined with the above, offering both as lines of defense against griefing. This is the approach taken by most networked games, as it requires no central server. However, it does not allow admins to set up a "public" server and still feel safe that they will not get attacked by griefers.

Where Should The Logic Go? (client/server)

Where should the logic for the game go? Client or server? What logic should go where?

In my view of the game, I would put all of the game logic in the server, and simply have the client as a "dumb" gui. This helps keep the client from getting overly bloated, and gives you a fairly clear separation of logic. C++ is great at drawing things, not so much (in my experience) as drawing things and keeping track of state/logic. In single-player mode, the client could simply start up a server on localhost, and the player wouldn't know the difference. In addition to simplifying things, it also has the advantage of making adding multiplayer easier, which is nice :).

Also, the title is not a pun on the go language that would be lovely to write the server in :). Provided, of course, that the dev team is willing to give up (do we have support?) for single-player or server hosting on windows in the interim while the windows port of go matures.

Prevent Manifold Sound Playback

At the moment, multiple instances may be played back at the same time. If 20 sounds are triggered at the same time, the playback is amplified by a factor of 20. This happens for items that trigger cashflow at the same time, e.g. Fast Foods at the end of the day.

Add a mechanism to prevent the same sound effect from being played at a too high rate.

Draw Full Elevators above Empty Ones

At the moment, elevator cars are just drawn in a random order. Maybe the elevator item should draw full cars above empty cars… This would introduce a few visual glitches though.

Graphics not Pixel Perfect

For some reason the graphics on my machine are not pixel perfect anymore. The rectangles are somewhat distorted and it looks like everything shifted up a pixel. See attached screenshot: Item prototype rect is distorted. Some of the "floor active" color shines through with the elevator floor numbers.
Screen Shot 2013-02-05 at 21 55 23

Underground Construction

Items are not allowed to be placed underground at the moment. This should be allowed for various items, such as Cinema, Recycling Center, Shops, Metro, Parking Ramps, Car Parking Spaces, etc.

OpenSkyscraper fails to launch with bad assertion

This happens about twice every three attempts to launch the application. Every third launch or so, OpenSkyscraper opens up just fine, sound and all.

OpenSkyscraper: /home/andrew/OpenSkyscraper/src/OpenSkyscraper-build/source/engine/events/../base/pointer.h:23: OSS::Pointer<T>::Pointer() [with T = OSS::Engine]: Assertion `(unsigned long)this > 0x1000000' failed.
Aborted.

Running Arch Linux, 64-bit pulled from master on 2011-05-06. I do have 32-bit libraries and OSS->ALSA compatibility layers installed.

OpenSkyscraper doesn't accept all versions of SimTower

I noticed that the constants for non-standard NE resources were hardcoded into the file, when these values are really merely offsets into the file of the name strings. The offsets I have in my file is:
177F, 6 resources [ALRT]
1784, 11 resources [CGPK]
1789, 4 resources [CLUT]
178E, 45 resources [DTMP]
1793, 1 resources [PART, I think--same md5]
1798, 21 resources [STRL]
179D, 7 resources [TABL]
17A2, 22 resources [TABM]
17A7, 1 resources [TEXT, I think--same md5]
17AC, 58 resources [WAVE]
17B1, 3 resources [YEN]

I have a fully working NE resource dumper which I could share the code to fix this issue. I would do it myself, but I don't know what the hex references are referring to.

sf::Network, Protobuf, or Another?

Nice work on the restart branch, it's starting to look pretty shiny :). SFML is pretty nice, that's what we used in Highrise Developer.

I've been looking at networking options and playing around a bit with the various options. I think that we probably don't want to homebrew this if we can avoid it, or at least we should take advantage of existing code as much as possible. Thus, the two options I've been looking at are using the sf::Network library (building our own packet structure), and the possibility of using google's protobuf library and defining what the packets look like (having protobuf generate the structs for us).

The biggest issue here is that C++ does not have any sort of reflection, so we can't write the network library in such a way that it figures everything out just given, say, a packet type and some data object. At least, we can't do that on the C++ end. If we could, I might try and write a library that talks to gob. This means that we are going to have to tell C++ how we want our data encoded, either by writing an overload for << on it (SFML), or by writing an external data definition file (protobuf).

Another option is just to send raw memory (with SFML for the basic network functionality), which would work for simple stuff like a struct of int32's, but would likely fail catastrophically for strings (since it would copy the pointer as an int, not copy the whole string). We would have to somehow write code to deal with this. Not sure if this is possible/easy with C++. This is the nicest in that it doesn't require any boilerplate code for new packets, but is a bit more dangerous in that adding a field on the client necessitates adding it on the server as well. We can minimize user issues with this by incrementing the version sent in the handshake for both client and server with each release, but it's still a potential issue when developing. Not a huge issue, however, as it should be reasonably easy to spot when you get totally bogus values, and the corruption would be limited to that packet (each packet has a length sent at the start, so even if the server/client doesn't know what to do with the data in that packet, it can still read the next one).

That was a bit of a brain dump, let me know if things don't make sense. I just kind of typed things as they came to mind :).

Error loading new sound resources

Some of the new sound resources added in 98b9d35 cannot be loaded. Error occurs in Windows and in Linux.

Could it be a problem with the Windows version of the SimTower executable?

Error_LoadSound

Windows port

Hi all,

I realised that there is no apparent Windows support for OpenSkyscraper (seeing the platform.h for windows is abandoned). So, I tried to port it to Windows and I have successfully done it, although there were some minor edits in the source files (mainly due to deprecated code that gcc did not handle and alternatives to POSIX functions).

However, there is a problem with the ceilings of the towers, which turns out to be white or transparent for an empty floor and an occupied floor respectively.

EDIT: I suspect that it might be due to GL_TEXTURE_RECTANGLE_ARB, as it is not implemented in <GL/gl.h>.

Thanks

Multiplayer and Online Gaming

Here are a few thought on what in my opinion would be great to have in the game.:

Scenarios

We need some kind of scenarios and/or a campaign mode where the player may try to accomplish given tasks. This shouldn't be too hard to do.

Achievements

Like all games today, we need an achievement system where the player can collect trophies while playing the game. Something along the lines of:

  • Hauled first person
  • Hauled 100 people
  • Hauled 1'000'000 people
  • Happiness above 75%
  • 500 Fast Food localities :)

Player Profile

We need a central server where players can have an account on. This account should hold the global gameplay information associated with the user. This includes said achievements, scenarios accomplished, hours played, records (tower height, width, value, population, etc.), and maybe also the towers themselves.

Gaming Servers

There's a dedicated server version of the game which doesn't include any of the graphics stuff. This server should be easy to extend and tie into and existing gaming platform. Like setting up the validation of a player trying to log into the server for playing via a HTTP request. This will allow server providers to setup their own account system, have their player register there and do the account checking on their own.

Model-View Coding and Multithreading

I think it desirable to completely separate the game logic and state from the actual rendering. We may accomplish this through the Model View Controller coding scheme in use widely in UI programming. I started experimenting with this idea in the "Settlement" repository (that also contains some OpenGL tampering).

We should separate the whole game logic into a Model tree that contains all the simulation-specific information. This information is serialized upon load/save and is modified in a separate simulation thread.

The rendering moves into the View tree that is created/destroyed on-the-fly as the player moves through the world. Controller classes check what portions of the game world are visible and maintain a view tree that render all the model information that is currently visible on the screen. This means that a view::Office object is created for each model::Office object that comes into view, and is also destroyed as soon as the object drops out of view.

This ensures maximum separation between rendering and simulating, making it particularly easy to parallelize the two: Each model object has a mutex that is unique-locked when a simulation step occurs and unlocked after that, which is a fairly short period of time.

For this to work, a notification system must be in place through which model objects signal themselves as changed, with the system properly dispatching these signals on the rendering thread through the controllers and the view tree.

Installing on Linux

Does the Game have support for linux ? If yes could anyone assist me on how to install the game in linux.

How Long Would an OpenSkyscraper Game be?

Related to designing a protocol: Are we going to design for the quick-game-with-your-friends usage case, or the persistent-world usage case? How long would you imagine that a openskyscraper game would last? One hour? Two hours? A couple days? Into theoretical infinity?

Ultimate result: Should we design for a distributed, ad-hoc system where each client calculates overlapping parts of the world and achieve consensus, or a centralized server-based model where each client is dumb? The former would make everlasting worlds hard, and would make playing across the internet hard (requiring port-forwarding afaik). The latter would make everlasting worlds easy, but would not work well for short games (unless the server was bundled into the client in such a way to make setting up a server easy).

Room Interface

Go provides a concept of "interfaces": essentially bits of functionality that all types to implement that interface must have. A similar concept can be emulated in C++ by using base classes, but it is implicit rather than explicit in go.

E.g. something like this:

type Fooer interface {
    Foo()
}

Any type that has a method Foo() will automatically implement the Fooer interface.

Now, after that interlude, what do you think that the interface defining rooms should look like? This is for the server-side, the interface on the client-side will likely be different (although have many of the same methods). How is this handled in the current code, where it is presumably emulated through a base class?

Overlapping Stairs

Stairs may be built overlapping.

In fact this only happens for the top stairs of a stack. Looks like the lower floor is not checked properly for intersections.

Screen Shot 2013-02-14 at 11 22 46

libsigc++ Headers Not Found (Ubuntu)

When I pulled today, the build failed, as it was unable to find sigc++.h:

OpenSkyscraper/source/game/external.h:7:27: fatal error: sigc++/sigc++.h: No such file or directory

I assumed that it was just a new dependency that had not yet been added to Cmake, so I decided to install it:

sudo apt-get install libsigc++-2.0-dev 

However, I still got the same error. Then, I tried installing the package without the version:

sudo apt-get install libsigc++-dev

This still did not fix it :(

I decided to check if the headers existed on my system, and sure enough, there they were in /usr/include:

/usr/include$ cd si
sigc++-1.0/  sigc++-2.0/  silgraphite/ 

However, I noticed that they were in a versioned folder--sigc++-1.0--rather than a generic sigc++ folder. For now, I'm considering just making a sigc++ symlink to one of the versions of the library, although i'm not sure which, and working from there. Unfortunately, this adds another step for linux users looking to compile the program, and not a particularly intuitive one. Is there a better way to solve this issue?

CI Builds lack `sndfile.framework` and `freetype.framework`

When downloading http://openskyscraper.org/binaries/openskyscraper-20140816-1202-184b5d6-macosx.tar.bz2 and trying to execute it, I get an error that libraries cannot be found:

dyld: Library not loaded: @executable_path/../Frameworks/sndfile.framework/Versions/A/sndfile
  Referenced from: /Users/adam/Downloads/OpenSkyscraper.app/Contents/Frameworks/../MacOS/../Frameworks/sfml-audio.framework/Versions/A/sfml-audio
  Reason: image not found
Trace/BPT trap: 5

Downloading SFML and copying sndfile.framework and freetype.framework from extlibs to the Frameworks folder solves the issue.

Error when I use command "make"

[toutoul@bart build]$ make
[ 1%] Building CXX object CMakeFiles/OpenSkyscraper.dir/source/Route.cpp.o
In file included from /home/git/OpenSkyscraper/source/Item/../GUIManager.h:7:0,
from /home/git/OpenSkyscraper/source/Item/../Application.h:10,
from /home/git/OpenSkyscraper/source/Item/Item.h:86,
from /home/git/OpenSkyscraper/source/Route.cpp:2:
/home/git/OpenSkyscraper/source/Item/../Rocket/SystemInterface.h:38:55: erreur: ‘sf::Key’ has not been declared
Rocket::Core::Input::KeyIdentifier TranslateKey(sf::Key::Code Key);
^
/home/git/OpenSkyscraper/source/Item/../Rocket/SystemInterface.h:38:65: erreur: expected ‘,’ or ‘...’ before ‘Key’
Rocket::Core::Input::KeyIdentifier TranslateKey(sf::Key::Code Key);
^
In file included from /home/git/OpenSkyscraper/source/Item/../Application.h:10:0,
from /home/git/OpenSkyscraper/source/Item/Item.h:86,
from /home/git/OpenSkyscraper/source/Route.cpp:2:
/home/git/OpenSkyscraper/source/Item/../GUIManager.h:23:55: erreur: ‘sf::Key’ has not been declared
Rocket::Core::Input::KeyIdentifier translateKey(sf::Key::Code key);
^
/home/git/OpenSkyscraper/source/Item/../GUIManager.h:23:65: erreur: expected ‘,’ or ‘...’ before ‘key’
Rocket::Core::Input::KeyIdentifier translateKey(sf::Key::Code key);
^
CMakeFiles/OpenSkyscraper.dir/build.make:57: recipe for target 'CMakeFiles/OpenSkyscraper.dir/source/Route.cpp.o' failed
make[2]: *** [CMakeFiles/OpenSkyscraper.dir/source/Route.cpp.o] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/OpenSkyscraper.dir/all' failed
make[1]: *** [CMakeFiles/OpenSkyscraper.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2

Librocket fails (sf::Key::Code Key) not declared

Using Arch Linux, I tried to install librocket from repository, which doesn't work any more. Compiled successfully from source though.

When trying to compile OpenSkyscraper, I find that cmake will work flawlessly, but trying to use make will fail:

OpenSkyscraper/source/Rocket/SystemInterface.h:38:55: error: ‘sf::Key’ has not been declared
Rocket::Core::Input::KeyIdentifier TranslateKey(sf::Key::Code Key);

the library "OpenSkyscraper/source/GUIManager.h" seems to suffer from the same problem of "sf::key has not been declared"

Abandon Rocket and move to our own UI

In the Settlement experiments I realized that a nice windowing mechanism may be implemented by using the cairo drawing library (in use in GTK+, etc.) to draw the GUI to an image buffer. Then a simple UI stack wraps these image buffers as windows and displays their contents. This is about the same as your everyday OS does it.

Cairo has the advantage that it provides beautiful antialiased rendering and is in general faster than redrawing the whole GUI every frame with OpenGL. GUI rendering may even be moved to its own thread!

Does not compile on OSX with Base SDK 10.9

Using Xcode on Mac OSX 10.9 with base SDK 10.9 I get the following error. With base SDK 10.8 everything works.

Undefined symbols for architecture x86_64:
"sf::SoundBuffer::LoadFromFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
OT::SoundManager::load(OT::Path, sf::SoundBuffer&) in SoundManager.o
"sf::Font::LoadFromFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, unsigned int, sf::Unicode::Text const&)", referenced from:
OT::FontManager::load(OT::Path, sf::Font&) in FontManager.o
"sf::Image::LoadFromFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
OT::BitmapManager::load(OT::Path, sf::Image&) in BitmapManager.o
"sf::Window::Create(sf::VideoMode, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, unsigned long, sf::WindowSettings const&)", referenced from:
OT::Application::init() in Application.o
"Rocket::Core::Element::GetElementsByTagName(std::__1::vector<Rocket::Core::Element*, std::__1::allocatorRocket::Core::Element* >&, Rocket::Core::StringBase const&)", referenced from:
OT::ToolboxWindow::reload() in ToolboxWindow.o
"sf::SoundBuffer::SaveToFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const", referenced from:
OT::SimTowerLoader::dump(OT::Path) in SimTowerLoader.o
"sf::Image::SaveToFile(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const", referenced from:
OT::SimTowerLoader::dump(OT::Path) in SimTowerLoader.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Unable to locate objlua

I have been unable to find what objlua is so I can build branch restart. Where can I find this?

Migrate to SFML 2

SFML 2 is stable and usable. In most cases, the API change consists only of a change in naming convention from capitalized camel-case (SetWidth) to the more sensible regular camel-case (setWidth). This should be achievable with a minimal amount of fuzz.

Networking Protocol

What protocol is going to be used for networking? I've come up with a rough draft/idea at https://github.com/fabianschuiki/OpenSkyscraper/wiki/NetworkProtocol, based on the Minecraft protocol with a few modifications to correct what I understand to be the biggest pitfalls. There's some discussion questions there that we could discuss here, namely:

  • Do we want to have a type for each key/value pair? This makes it easier to create generic network code, but does cost an extra byte per key/value pair. Granted, the bigger overhead is the Key name, which is at LEAST 2 bytes, probably more like 10.
  • Do we want a key for each value in the packet, or hard-coded rules for what order elements should be in? E.g. floor first, then x coordinate on floor, then action. The former is safer, more generic, and easier to future proof. However, the latter is smaller in size, and the unsafeness could at least by offset by having a type identifier for each value and/or a byte key.

(you should read the page first, or else these questions don't make much sense)

I wasn't sure if an issue was the best place to bring this up, but i'm itching to get started on a server. Due to the lack of networking, however, I am unable to. Thus, I would consider it an issue :).

Game crashes when janitor cant find route

Testing the game, I realized a sudden crash. The output is:
<hotel/janitor 0x4058280> updateRoute: *** can't find route from ((0, 0), (0, 1)) to ((-12, 1), (15, 1))!

janitor.cpp:134: virtual void OSS::Classic::Janitor::think(): Assertion `getAssignedHotel()' failed.
Aborted

Checked the code in /source/game/classic/people/individuals in think function and getassignedhotel, to find the case it cant find the destination is now yet written (but i lack the c++ knowedge to do so). I also checked the elevators code...

I assume other situations when a person cant do a route, also crashes the game

Getting resource files without Windows is impossible.

There's no way to get the proprietry game's original resource files without installing it on Windows or WINE. The files are compressed for the Windows Installer to extract.

This is a really big probem and prevent developers (read: me) from contributing.

Multiplayer Interaction

How would multiple players interact in a multiplayer game of openskyscraper?

  • Cooperative: All players share the same tower, building on their own section.
    • Should this section be computer-enforced or approximately agreed-upon?
  • Competitive: All players have different towers, and have the ability to compare their resources and style with other players. E.g. see the other towers built beside them, and build their own.
    • In this case, what would be added to actually allow players to interact with other players?
    • Would you be able to "buy" natural disasters to unleash on other players?
    • How would you deal with transient players? Would their towers simply disappear from the openskyscraper "world"?
    • What if one person plays every night for 4 hours, gets a crazy huge tower, and owns everyone (with disasters) who joins the server? What can we do to to alleviate this unfairness?

And please, unless you are willing to implement it yourself, don't say "both". Each would require an entirely different set of rules, and would probably have a networking protocol designed to work best for that purpose. Changing the interaction like this really results in a different game, and having too many options will result in no (completed) game. However, a middle ground of these two possibilities is certainly an option, but I cannot think of what that might look like right now.

Error when I use command "make"

[toutoul@bart build]$ make
[ 1%] Building CXX object CMakeFiles/OpenSkyscraper.dir/source/Route.cpp.o
In file included from /home/git/OpenSkyscraper/source/Item/../GUIManager.h:7:0,
from /home/git/OpenSkyscraper/source/Item/../Application.h:10,
from /home/git/OpenSkyscraper/source/Item/Item.h:86,
from /home/git/OpenSkyscraper/source/Route.cpp:2:
/home/git/OpenSkyscraper/source/Item/../Rocket/SystemInterface.h:38:55: erreur: ‘sf::Key’ has not been declared
Rocket::Core::Input::KeyIdentifier TranslateKey(sf::Key::Code Key);
^
/home/git/OpenSkyscraper/source/Item/../Rocket/SystemInterface.h:38:65: erreur: expected ‘,’ or ‘...’ before ‘Key’
Rocket::Core::Input::KeyIdentifier TranslateKey(sf::Key::Code Key);
^
In file included from /home/git/OpenSkyscraper/source/Item/../Application.h:10:0,
from /home/git/OpenSkyscraper/source/Item/Item.h:86,
from /home/git/OpenSkyscraper/source/Route.cpp:2:
/home/git/OpenSkyscraper/source/Item/../GUIManager.h:23:55: erreur: ‘sf::Key’ has not been declared
Rocket::Core::Input::KeyIdentifier translateKey(sf::Key::Code key);
^
/home/git/OpenSkyscraper/source/Item/../GUIManager.h:23:65: erreur: expected ‘,’ or ‘...’ before ‘key’
Rocket::Core::Input::KeyIdentifier translateKey(sf::Key::Code key);
^
CMakeFiles/OpenSkyscraper.dir/build.make:57: recipe for target 'CMakeFiles/OpenSkyscraper.dir/source/Route.cpp.o' failed
make[2]: *** [CMakeFiles/OpenSkyscraper.dir/source/Route.cpp.o] Error 1
CMakeFiles/Makefile2:63: recipe for target 'CMakeFiles/OpenSkyscraper.dir/all' failed
make[1]: *** [CMakeFiles/OpenSkyscraper.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2
[toutoul@bart build]$

Migrate to SFML2

I get this message with latest master:

[  1%] Building CXX object CMakeFiles/OpenSkyscraper.dir/source/PathFinder/GameMap.cpp.o
distcc[2656] ERROR: compile /home/bla/git/OpenSkyscraper/source/PathFinder/GameMap.cpp on 192.168.2.3 failed
distcc[2656] (dcc_build_somewhere) Warning: remote compilation of '/home/bla/git/OpenSkyscraper/source/PathFinder/GameMap.cpp' failed, retrying locally
distcc[2656] Warning: failed to distribute /home/bla/git/OpenSkyscraper/source/PathFinder/GameMap.cpp to 192.168.2.3, running locally instead
In file included from /home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../GUIManager.h:7:0,
                 from /home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../Application.h:10,
                 from /home/bla/git/OpenSkyscraper/source/PathFinder/../Item/Item.h:86,
                 from /home/bla/git/OpenSkyscraper/source/PathFinder/GameMap.cpp:2:
/home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../Rocket/SystemInterface.h:38:55: error: ‘sf::Key’ has not been declared
/home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../Rocket/SystemInterface.h:38:65: error: expected ‘,’ or ‘...’ before ‘Key’
In file included from /home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../Application.h:10:0,
                 from /home/bla/git/OpenSkyscraper/source/PathFinder/../Item/Item.h:86,
                 from /home/bla/git/OpenSkyscraper/source/PathFinder/GameMap.cpp:2:
/home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../GUIManager.h:23:55: error: ‘sf::Key’ has not been declared
/home/bla/git/OpenSkyscraper/source/PathFinder/../Item/../GUIManager.h:23:65: error: expected ‘,’ or ‘...’ before ‘key’
distcc[2656] ERROR: compile /home/bla/git/OpenSkyscraper/source/PathFinder/GameMap.cpp on localhost failed
CMakeFiles/OpenSkyscraper.dir/build.make:54: recipe for target 'CMakeFiles/OpenSkyscraper.dir/source/PathFinder/GameMap.cpp.o' failed
make[2]: *** [CMakeFiles/OpenSkyscraper.dir/source/PathFinder/GameMap.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/OpenSkyscraper.dir/all' failed
make[1]: *** [CMakeFiles/OpenSkyscraper.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2

Using this GCC version:
gcc version 4.9.2 (Debian 4.9.2-10)

Maybe related to issue #51 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.