GithubHelp home page GithubHelp logo

tbye101 / magicallife Goto Github PK

View Code? Open in Web Editor NEW
229.0 13.0 26.0 273.18 MB

A 2d game that aspires to be similar to Rimworld, with more depth, magic, and RPG concepts.

License: MIT License

C# 100.00%
fantasy game game-2d csharp magic monogame help-wanted roguelike rimworld multiplayer

magicallife's Introduction

MagicalLife

Thanks for the logo Batarian711!

Magical Life

A fantasy world that imagines what a Rimworld style game could truly do if it had more elements in common with an RPG.

Master Branch: Build status Codacy Badge

Development Branch: Build status

Project Needs

  • Textures

  • Sound Effects

  • Songs/Soundtrack

  • Quests/Written story/Lore

  • Programmers

  • Testers

If you can provide one of the above things, let me know!

You can email me at [email protected] or create an issue in this repository.

I would appreciate the help. Thanks!

Features

  • Multiplayer support
  • Hardware accelerated graphics via Monogame

Check out the demo to see the latest progress!

Roadmap (In no particular order)

AKA TODO:

Not buggy graphics

Items

Character Actions (such as mining or building)

Save/Load Game

Natural objects such as trees

Character Classes and XP system

Inventory

Agriculture

Traders

Creatures (Enemies and Animals)

AI

Spells/Abilities

Fantasy Loot

Dungeons

Randomized Quests

Mod support: Always a priority

Installation Instructions

  1. Download and install the .Net Framework 4.7.1 Runtime
  2. Find and download a release from the releases tab of this project
  3. Extract the release
  4. Enjoy!

Development Instructions

  1. Download and install any version of Visual Studio 2017
  2. Download and install Monogame 3.7.1 for Visual Studio.
  3. Download and install the 2012 VC++ x64 Redistributable
  4. Clone this repository
  5. Open the solution, and set the solution configuration to debug, x64.
  6. That's all!

Hint: Due to something weird with Monogame in Visual Studio, I advise building the GUI or Dedicated server (Depending on what you want to debug) everytime you make a code change and want to run this game. Hitting start doesn't always seem to compile your changes/insert breakpoints when working with Monogame.

Vision

A polished game with aspects similar to RimWorld, but with magic and aspects of RPG.

Goals

  • High replayability value
  • Balanced gameplay
  • Fun multiplayer game experience

Dungeons

  • Should be kinda scary (Scary sound, Scary visuals, nasty monsters)
  • Dungeons are spawned in the world with random difficulties
    • Go into one at your own risk
    • Higher the difficulty, the higher the reward
    • Some components for spellcasting or tech components might be found here
  • Unlike games like D&D there are no restrictions on how many characters go exploring a dungeon
    • A large population might enable you to raid a more difficult dungeon, abeit with high casualties

Economy

  • Based on supply and demand
  • Everything the merchants sell has to come from somewhere
    • If supplies dry up, merchants don't have much to sell, and prices spike
  • You can have your colonists do trade routes with other players, trading goods for other goods or money at a preagreed rate

Multiplayer

  • Should support at least 10 players running on a dedicated server
  • Diplomacy system enabling various treaties (As well as war)
    • Peace treaty, trade treaty, defensive pact, Alliance
  • You can claim territory by building a special structure
    • Other players cannot do anything besides pass through unless you give them the correct permissions

Enemies

  • Enemies will be based upon various mythology, such as Greek mythology, Norse mythology...

World

  • Procedurally generated world
  • Custom world sizes
  • Other "Dimensions", with different creatures, plant life, and materials

Food

  • Everything needs to eat
  • You start the game with two different bags of seeds
    • Seed bags never run out
  • To get a new type of seed, you have to purchase it from a merchant, or craft a lot of the crop into a seed bag
  • Merchants only carry a few seeds of a type, so on a large multiplayer server you will have to trade for it

Tech and Magic

  • Both technology and magic are availible
    • Technology is based more upon resource processing and research
    • Magic is based upon character leveling up, learning new spells, and gathering components for permenent spells

Classes

  • Various character classes exist
    • Wizard, Cleric, Thief, Paladin, Necromancer (Evil Cleric), Monk, Warrior, Knight *Each of these can have subclasses
  • Characters with classes like above are not really capable of participating in the tech progression
    • They aren't allowed to research technology or construct tech items
  • When a character levels up, they can choose to gain various abilities
    • At low levels, they are allowed to instantly choose which abilities they get when leveling up
    • At high levels, they may level up, but to actually get a new ability and spend ability points they need to be trained by a trainer in that specific skill

Skills

  • Everything is a skill
  • Construction, Mining, Hauling, shooting, melee, research, trading
  • Even things from RPG classes are skills
    • Just because the wizard gained the ability to cast a new spell, doesn't mean he is good at casting that spell
    • Fighters have to get good at the various moves and abilities they learn

Technologies

  • The tech tree starts in basically the stone age
  • You know how to make fire, hunt, and make crude weapons and tools
  • Tech tree ends in the far off future, where everything is digital, artificial intelligence runs your base, and the dying can be healed of everything

Magic

  • There is a spell for doing almost everything
  • Spellcasters only know a few spells to begin with
    • They have to find scrolls with the correct words to memorize
  • Some spells are permenent, others are one time effects *Permenent spells require components, and have a high mana cost
    • Permenent spells can be destroyed/dispelled
  • Examples of permenent spells *Light, grow crops, intruder alarm...
  • Temporary spells
    • Terraform land, fireball, energy bolt, magic barrier...
  • Spellcasters only have so much mana, so they can only cast so many spells until they run out *Mana is regenerated by sleepa
  • Casters of the same type can work together
    • Ex: Two clerics could work together to cast a spell with mana requirements higher than they could meet alone

Credits

Contributors

Lynngr - Did all of the artwork

ockenyberg - Made all of the sound effects

Batarian711 - Created the logo for this project

Assembly Descriptions

MagicalLifeAPIStandard

  • The main game API, manages most things except for graphics and server commands

MagicalLifeAPIClientStandard

  • Manages how the client interprets messages from the server

MagicalLifeDedicatedServerCore

  • Controls the server
  • Run server commands

MLGUIWindows

  • Windows only graphical client

MagicalLifeMod

  • The core game content, added into the game in the form of a mod *This is done to ensure that mods have a good API to interact with, and not limit modding capabilities *If the main game can do it, so can any mod

MagicalLifeServerStandard

  • Handles server functionality such as:
    • Sending information to clients
    • Handling information from clients
    • Generating the world
  • Handles both dedicated and local server logic

MagicalLifeSettingsStandard

  • Holds some settings for all of the assemblies in the project

Libraries Utilized

MonoGame

Released under the Microsoft Public License and the MIT License

Does the heavy lifting for graphics, asset loading, and more!


FMOD

Released under the FMOD END USER LICENCE AGREEMENT

Audio


MonoGame.Extended

Released under the MIT License

Used to capture keyboard and mouse input


A* Algorithm by Roy-T

Released under the MIT License

Provides the pathfinding for Magical Life


ProtoBuf-net

Released under the Apache License 2.0

Used for quickly serializing objects into a small payload to be sent over the network


Simple TCP

Released under the Apache License 2.0

Utilized to send data over the network


C# Spatial Index (RTree) Library

Released under the GNU Lesser General Public License

Used for quickly finding objects nearest to a location, or getting all objects within a certain area.


magicallife's People

Contributors

a2937 avatar abuonanni avatar batarian711 avatar callowaysutton avatar horacedude avatar imgbot[bot] avatar imgbotapp avatar lynngr avatar ockenyberg avatar philipbawn avatar tbye101 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

magicallife's Issues

Item Amount Indicator

A little number in the corner of a tile would go a long way in terms of seeing how much of a resource is laying around

Map location doesn't exist

Clicking outside of the map bounds causes an error during the logo screens.

MagicalLifeGUIWindows.Util.GetMapLocation() is the offender.

Job System

When assigning jobs to character in singleplayer (and maybe multiplayer too), characters start new jobs without finishing their old ones. Something to do with who is doing what job is not right.

Menus Ignoring Visibility

Menus and their items are currently ignoring whether or not they are invisible when determining what should be clicked on.

Input Box Carrot Rendering Issues

The carrot of input boxes displays incorrectly until it is clicked on for the first time. It bugs me, and I don't even have OCD. The carrot should be centered, like after the input box is clicked on.

Multiple Message Handlers

The initial code for message handlers is being called twice, throwing a exception as it was never meant to be run twice. This is directly caused by issue #18 , as the invisible yet still accepting clicks menu is triggering the message handler init code multiple times.

Logo contribution

Hi. I am a graphic designer. I volunteer to design a logo for open source projects. I can design it for you to use it in the readme file. What dou you say?

Music / Sound effects

Hi guys! I replied to your request for a composer on Reddit. My name is Sam Hammoudeh and I compose and produce music for games and short films, as well as produce edm.

Artwork batch #2

@Lynngr Here's a few more textures to add to your TODO list.

mineactionoverlay

This is used to place over stone that is marked to mine. Whatever you come up with, it doesn't have to end up as a pickaxe. That was just the first thing I came up with. Example of how it is used below.

mineaction

This is used as a button to toggle whether or not a click assigns a mining job. It is located in the example below, in the bottom toolbar.

Thanks @Lynngr !
explanation

Action System

Characters need an action system to queue up, then perform actions such as walk from a point to another point, mine stone, chop tree, etc...

Integrate Lynngr's art

To do this, this will take some dev time.

TODO:

-Write framework for using animations
-Use framework to render new character animations
-Rewrite render system to allow for automatic layers of rendering
-Use this on grass/dirt

Rewrite Menu System

Currently the GUI menu system's "back" functionality just goes to the last displayed GUI. This is incorrect in some cases, and should be rewritten to follow a system of "parent" and "children" windows, so that going back goes up to the parent window.

Need Better In Game Object System

Currently things like stone are represented by "Resources". They should really be considered a wall or something, and be made part of a system for objects, including things like furniture, and other colonist creations.

Cloud Save

We should use Dropbox, and maybe Onedrive to backup save files.

Character Loses Focus

While queuing up jobs, the character will pathfind over to the latest queue job, instead of staying still and working on its current job.

Route Created Errors

When the client creates a route and sends it to the server, the server doesn't send it to all of the clients besides the one who sent it. It should. The clients also don't know what to do if they were to receive such a message.

Dedicated Server Character Creation

When a client joins, the dedicated server needs to spawn in a player character for them, or load a existing one for them.

This will fix a bug where the dedicated server doesn't assign the characters jobs because the characters don't belong to the player.

Mod Support Last on Roadmap?

Is Mod Support the last thing you're going to work on? That's going to be really tough because when you want to embrace mods, then you want to have an open system/game that can be easily modified so having it to be the last thing to work on will add a ton of revising to be done on the code to.
Unless your just saying that in a random order...
I don't know, but to me it just would seem like a bad idea to make that the last thing to work on.

Tree

This game needs trees
- Spawnable on dirt
-Trees are a type of Resource
-Stumps are left behind
-Trees drop logs when harvested
-Add more types of trees since we have the textures for them

Character Ignores Orders

Sometimes the character will get stuck going in one direction, and no matter how you order it, it will continue in that direction until it goes off screen.

Point2D == Operator

The == operator should be overloaded on Point2D, as the default behavior doesn't compare Point2D's properly, and is resulting in bugs.

Rewrite path finding

Path finding library currently doesn't easily support fog of war or changing conditions.
It needs to be written so that A: it is in house code, and B: so it can handle the constraints mentioned above.

Infinite Mining Distance

Sometimes when there is a lot of stone queue up to be mined, the character stops, and mines many stone at once disregarding distance requirements for mining.

In-Game Content

This game needs more content such as water tiles, basic resource items, etc...

Multiple Workers Completion Bug

When having multiple workers work on mining jobs, 2 of my 3 test workers get stuck, due to the fact that they don't execute job completion code properly.

Map Movement

Moving the map so we can see different sections/different chunks is a necessary feature
This should use "wasd" by default, but should be a changeable keybinding

Clean Up Item Registry

It's messy, and has WAY too many different classes that represent Points and Rectangles.
It also doesn't have support for multiple dimensions. Oops.

Map Selection

Drag selection of creatures would be nice, as well as some way to visualize what creatures are selected at any given time

Simplify GUI Creation

Making GUIs is currently a slow process with lots of boilerplate tasks for a developer, and utilizes hardcoded locations. GUI creation should be simplified to the point where a developer tells some sort of UIContainer what children elements the developer wants to add to it, and this UIContainer auto arranges/resizes elements.

Job Loader

The job loader progress report in the log says 29 out of 24 jobs.
Not a super critical bug, but could be annoying to the user if the progress is ever showed to them.

Clicking Outside of Map Bounds

Clicking outside of map bounds causes an exception due to the selector not realizing this was out of the map bounds.

System.IndexOutOfRangeException
HResult=0x80131508
Message=Index was outside the bounds of the array.
Source=MagicalLifeGUIWindows
StackTrace:
at MagicalLifeGUIWindows.Input.History.HistoricalInputFactory.SingleSelect(InputEventArgs e) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Input\History\HistoricalInputFactory.cs:line 32
at MagicalLifeGUIWindows.Input.History.HistoricalInputFactory.Generate(InputEventArgs e) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Input\History\HistoricalInputFactory.cs:line 19
at MagicalLifeGUIWindows.Input.History.InputHistory.MapMouseClick(MouseEventArgs e) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Input\History\InputHistory.cs:line 142
at MagicalLifeGUIWindows.Input.BoundHandler.ContainerClick(MouseEventArgs clickData) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Input\BoundHandler.cs:line 101
at MagicalLifeGUIWindows.Input.BoundHandler.MouseListener_MouseClicked(Object sender, MouseEventArgs e) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Input\BoundHandler.cs:line 70
at MonoGame.Extended.Input.InputListeners.MouseListener.CheckButtonReleased(Func`2 getButtonState, MouseButton button)
at MonoGame.Extended.Input.InputListeners.MouseListener.Update(GameTime gameTime)
at MagicalLifeGUIWindows.Input.BoundHandler.UpdateMouseInput(GameTime time) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Input\BoundHandler.cs:line 80
at MagicalLifeGUIWindows.Game1.Update(GameTime gameTime) in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Game1.cs:line 87
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at MonoGame.Framework.WinFormsGameWindow.RunLoop()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at MagicalLifeGUIWindows.Program.Main() in D:\Git Repositories\EarthWithMagic\MagicalLifeGUIWindows\Program.cs:line 25

Faulty Character Order

When left clicked upon, characters always go to (0, 0). They shouldn't go anywhere at first.

Disk Save

  • Have menus to load and save the game
  • Save the game to disk
  • Load the game from disk

Character Teleports

The character teleports when moving diagonally. This seems to be reproduceable by reordering the character while it is moving diagonally.

Projects To Utilize

Text Generation Engine for randomized quests and things.
Similar Image Creator for terrain generation. http://www.procjam.com/tutorials/wfc/
tutorial for above

Steam Stats
Compression
Genetic Algorithms for a more dynamic world.
Game Analytics
Stack Trace Simplification
Statistics Graphs
AI for machine learning AI
Error Reporting

Integrations:
Discord
Onedrive for cloud saves
Dropbox for cloud saves
Google Drive

Some sort of OpenCL library, for utilizing the dedicated server's graphics card for mass computation.

Modding Stuff
Audio Conversion for when people want to use weird/obscure formats.

Story Generation
Natural Language Generation
Rant

Tools:
Resx auto translation
Shader Editor

Not a project:
Multi-monitor support
Cyclic Dungeon Generation
https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm

Character Disappears

The character disappears from the screen when moving to another tile sometimes.

This is most likely due to the other tile being drawn after the entity was drawn mostly on that other tile, effectively covering up the entity.

Solution: Rework the system so that entities have their own list in the world, and can be rendered after tiles from said list.

Use MonoGame

Use monogame for a bunch of the GUI stuff, as I am not skilled enough to roll my own.

Audio

This project needs programming done to play audio whenever certain things happen, such as a button being clicked on, or a human taking steps on dirt or grass.
Sound files are located in /Assets/Sound
They need to be utilized through the MonoGame content pipeline, and loaded at game load time.

Keep in mind that the dedicated server doesn't need to load these sounds, so they should only be loaded client side.

Input Box Empty

When an input box is empty, and the player backspaces this causes a exception to be thrown, and the game to crash.

Broken Networking

Networking no longer works in the master branch. (Should have tested that)
Protobuf-net cannot serialize the net structure.

Pricing

Item pricing in the dynamic price market is always 0. We need to implement the dynamic market.

Artwork Batch #1

This is suppose to be the stone texture. This is for when there is stone completely around it.
marblefloor

The below 4 textures are suppose to be for when stone is connected on some sides.
marbleresourceconnected1

marbleresourceconnected2

marbleresourceconnected3

marbleresourceconnected4

This texture is used as a button texture, and is displayed behind some button text.

menubutton

This texture is a colonist.
basic human

This is the cursor carrot for an input box.
cursorcarrot

This is the dirt tile texture that all worlds are generated out of currently.
dirtfloor

This will eventually be used as a grass tile. Maybe throw in some connection textures for when it is connected to grass on some sides, and not connected on others?
grassfloor

This is the inputbox texture, where users type stuff in.
inputbox100x50

This is dropped when a colonist mines stone. Maybe have a few textures so I can visually represent how much stone is on the ground?
marblechunk

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.