Jump to content

XerShade

Contributors
  • Posts

    38
  • Joined

  • Last visited

Everything posted by XerShade

  1. Walk it up to a map border and try. If it was a properly coded entities system all that would matter is the npcs location data. If they are doing it where entities are loaded on the maps then probably not. But until any of them chime in walk it over a map border.
  2. Find the original size of the dragon. Multiply the dimensions by four, then copy and paste the same image right next to the others. What you could also do is put all of the same dragons on the same sprite sheet, will improve resource management.
  3. Pretty much. I usually set my minecraft and ark server to what I think might peak times two, and if it hits that i double the slots. Honestly would just remove that cap if I could. What putting a cap on it does is basically announce to the world, "Hey, I don''t think my game/server can handle more then this amount of people." So then people look for other games with more/no limit because they do NOT want to be unable to play the game.
  4. So started up the good old ark server, it is setup to have faster xp, tame, breeding, harvest, and other rates to make the game a bit less grindy. The details are below: IP: ark.xershade.ca Server Settings Map -> Ragnarok bServerPVE -> true bAllowCaveBuildingPvE -> true bDisablePvEGamma -> false bEnablePvPGamma -> true PassiveTameIntervalMultiplier -> 1.0 MaxTamedDinos -> 99999 MaxPersonalTamedDinos -> 99999 EggHatchSpeedMultiplier -> 10.0 BabyCuddleGracePeriodMultiplier -> 1.0 BabyCuddleIntervalMultiplier -> 1.0 BabyCuddleLoseImprintQualitySpeedMultiplier -> 1.0 BabyFoodConsumptionSpeedMultiplier -> 1.0 BabyMatureSpeedMultiplier -> 10.0 MatingIntervalMultiplier -> 0.1 MatingSpeedMultiplier -> 1.0 TamingSpeedMultiplier -> 8.0 HarvestHealthMultiplier -> 2.0 HarvestAmountMultiplier -> 2.0 XPMultiplier -> 8.0 Installed Mods ARK Servers Plus (AS+) https://steamcommunity.com/sharedfiles/filedetails/?id=1357771552 Super Spyglass https://steamcommunity.com/sharedfiles/filedetails/?id=793605978 Snappy Saddles & Rafts https://steamcommunity.com/sharedfiles/filedetails/?id=725398419 Platforms Anywhere https://steamcommunity.com/sharedfiles/filedetails/?id=779897534 Redwoods Anywhere https://steamcommunity.com/sharedfiles/filedetails/?id=722649005 Platforms Plus https://steamcommunity.com/sharedfiles/filedetails/?id=719928795 Structures Plus https://steamcommunity.com/sharedfiles/filedetails/?id=731604991 Stack Me More https://steamcommunity.com/sharedfiles/filedetails/?id=1184731864 Cross Aberration https://steamcommunity.com/sharedfiles/filedetails/?id=1267677473 Automated Ark https://steamcommunity.com/sharedfiles/filedetails/?id=812655342 Automated Resource Pumps https://steamcommunity.com/sharedfiles/filedetails/?id=855761786
  5. Yeah the way Intersect hands its sprites is by dividing the width and height by four. Open the image, and without resizing it extend the width and height to four times the original. Then if needed copy and paste it a few times. If you need some help doing this DM me and we can see if something can be arranged.
  6. The difference is this, Local/Player variables are only stored on the object/player that is using it, an example for this is if you want each player to have their own progress with a quest/event. Global variables are shared across the server, an example for this would be if you wanted to do an event/quest where the community as a whole works towards completing it.
  7. Also just want to point out that limiting the number of staff you have logged in is kind of a bad practice. Staff should only be limited by the number of them, I've been on a team before with a feature like this, it was a pain in the **InvalidWordException** to co-ordinate our login times, and then even if we just wanted to play when not working we had to co-ordinate that because of the "group limit".
  8. It's not that hard to do manually, just open up an existing actor sprite, look at the format, then copy + paste the dragons on their own sprite sheet in the same format.
  9. Eh, getting it done the way I was thinking, you have an enum and a global and npc specific seting, might be a tad more involved then easy but still close to easy. But yeah they have bigger fish to fry right now so it might get done might not.
  10. So was thinking the next thing I should do for my game is the Input system but not sure if I should do Polling or Event driven with Sfml. The way I was thinking about is having an InputController class in my engine and having that run first on the update cycle, that way it gets the input for the current cycle then does not modify it until the next, preventing some shenanigans from happening mid loop in some rare cases. The downside to this is that it's only done once per cycle, which means if the cycle takes longer for some reason then there is more lag on input. Just for those who want to know, my game is written from scratch on a custom made engine, using SFML as its Audio/Video system and I will be using SFMLs input events if events should be used instead of polling.
  11. Yeah it's an easy solve but only the devs can do it right now.
  12. I went and posted a suggestion based on this idea here: Gave you credit for the idea.
  13. So I'm working on a system in my game/engine to generate positions of the frames for actor sprites, the issue is when I run the code I get these "South, South, West, West, Right, Right, Up, Up, All" when I should be getting "South, West, East, North, Down, Left, Right, Up, All". Been looking for about 20 minutes now and can not figure out why the code is doing this. The code generating the file: /// <summary> /// Generates a default texture matrix container. /// </summary> /// <param name="resource">The texture resource object.</param> /// <returns>The generated texture matrix container.</returns> public static TextureMatrixContainer Actor(TextureResource resource) { // Generate the container. var container = new TextureMatrixContainer(resource); // Calculate the frame dimensions. var frame = new Vector2f(resource.Size.X / 3, resource.Size.Y / 4); // Loop through the directions. foreach (Direction direction in Enum.GetValues(typeof(Direction))) { // Add the matriceis to the collection. container.Add(new TextureMatrix($"{direction.ToString()}-Idle", frame.X, frame.Y * direction.AsByte(), frame.X, frame.Y)); } // Return the container. return container; } The direction enumeration: https://github.com/XerShade/Astrendaria/blob/0.0.1/source/Astrendaria.Game/Enumerations/Direction.cs And the file it generates: { "$type": "Astrendaria.Media.Matriceis.TextureMatrixContainer, Astrendaria.Media", "Components": { "$type": "Astrendaria.Classes.ComponentType[], Astrendaria", "$values": [ { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 0.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 0.0, "Width": 52.0, "Height": 72.0 }, "Name": "South-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 0.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 0.0, "Width": 52.0, "Height": 72.0 }, "Name": "South-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 72.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 72.0, "Width": 52.0, "Height": 72.0 }, "Name": "West-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 72.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 72.0, "Width": 52.0, "Height": 72.0 }, "Name": "West-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 144.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 144.0, "Width": 52.0, "Height": 72.0 }, "Name": "Right-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 144.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 144.0, "Width": 52.0, "Height": 72.0 }, "Name": "Right-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 216.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 216.0, "Width": 52.0, "Height": 72.0 }, "Name": "Up-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 216.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 216.0, "Width": 52.0, "Height": 72.0 }, "Name": "Up-Idle" }, { "$type": "Astrendaria.Media.Matriceis.TextureMatrix, Astrendaria.Media", "X": 52.0, "Y": 0.0, "Width": 52.0, "Height": 72.0, "Bounds": { "$type": "SFML.Graphics.FloatRect, sfmlnet-graphics-2", "Left": 52.0, "Top": 0.0, "Width": 52.0, "Height": 72.0 }, "Name": "All-Idle" } ] } } Any and all help is appreciated because once this is fixed I can start refining and cleaning up the sprites code and it will be done, then I can move on to other systems.
  14. This was the fruit of about four hours of trying to figure out how to do this, it's a simple script that reads the folder id of the page the block is displayed on, then lists the pages inside that folder. I mostly made this for use as an index page for most of the sites folders, however I am thinking of doing up a sidebar version at a later date. Source code: http://www.xershade.ca/content/articles.html/programming/invision-power-board/folder-index-block-r1/ Demo: http://www.xershade.ca/content/index.html/
  15. Not sure why I wanted to make a social login based site, just did thought it would be different. And @PhenomenalDev I do have a site, it should be on my profile. As it stands I have it setup so people can't make an account with the User/password login or change passwords. The login systems still enabled, with admins having passwords, in case the OAuth goes down like jc said.
  16. Anyone know how to disable Invisions username/password login method, I only want people to be using the OAuth stuff from google, etc. I mean short of disabling registrations and making it so you can't set a password I have no idea as the Enable/Disable button is locked.
  17. So I am currently trying to design the structures for entities in my game and have run into a little snag with how it calculates the max vitals for the vitals structure. The snag is that the formula needs EntityStats but EntityVitals does not have access to that, and I would prefer to keep it that way so I am not tossing references around the place. Here is my project structure for what I am working with. Data Entity - The entity object. Logic LogicEntities - The static class where my GetEntityMaxVital function will be. Strcutures EntityStat - A single entity stat structure. EntityStats - The structure that defines entity stats. EntityVital - A single entity vital structure. EntityVitals - The structure that defines entity vitals. Any help would be greatly appreciated. -XerShade
  18. Not sure if this should go here or not, but will try it out anyways. Anyhow coded me up a simple multi-threaded loop for my game Esmiylara Online and though I would share. Needs to be optimized though, very optimized. Demo of the code in action: https://www.youtube.com/channel/UCgedQWDNldjmHiFJvjN3Hxg using Esmiylara.Online.Client.Media.Graphics; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using SFML.Graphics; using SFML.Audio; using SFML.System; using SFML.Window; using Timer = Esmiylara.Online.Components.Timer; using KeyEventArgs = SFML.Window.KeyEventArgs; using System.Windows.Forms; namespace Esmiylara.Online.Client { /// <summary> /// Esmiylara Online game engine, defines engine functions. /// </summary> public static partial class Engine { private static Thread cpu; private static Thread gpu; private static bool RunEngine; static SfmlWindow win; public static void Run() { if (!RunEngine) thread(); } public static void Stop() { RunEngine = false; } private static void thread() { RunEngine = true; cpu = new Thread(() => { Timer tickMove = new Timer(1000 / 60); while (RunEngine) { if(tickMove.CheckInterval()) { if (TempCode.Move.Up) { TempCode.Direction = TempCode.DIR_UP; if (TempCode.Y - 1 > TempCode.MinY) { TempCode.Y -= (TempCode.Movement * 1); } } if (TempCode.Move.Down) { TempCode.Direction = TempCode.DIR_DOWN; if (TempCode.Y + 1 < TempCode.MaxY) { TempCode.Y += (TempCode.Movement * 1); } } if (TempCode.Move.Left) { TempCode.Direction = TempCode.DIR_LEFT; if (TempCode.X - 1 > TempCode.MinX) { TempCode.X -= (TempCode.Movement * 1); } } if (TempCode.Move.Right) { TempCode.Direction = TempCode.DIR_RIGHT; if (TempCode.X + 1 < TempCode.MaxX) { TempCode.X += (TempCode.Movement * 1); } } if (TempCode.Move.Up || TempCode.Move.Down || TempCode.Move.Left || TempCode.Move.Right) TempCode.Step = (TempCode.Step >= 60 - (TempCode.Movement * 2)) ? 0 : TempCode.Step + (TempCode.Movement * 2); else TempCode.Step = 0; tickMove.Update(); } if (TempCode.Test.CPU) { Thread.Sleep(TempCode.Random.Next(50, 200)); } } }); cpu.Start(); gpu = new Thread(() => { Timer tickMove = new Timer(1000 / 60); Image sprite_img = new Image("whitemage_f.png"); Texture sprite_tex = new Texture(sprite_img); Sprite sprite = new Sprite(sprite_tex); win = new SfmlWindow(); win.Closed += (a, b) => { RunEngine = false; }; win.KeyReleased += Win_KeyReleased; win.KeyPressed += Win_KeyPressed; while (RunEngine) { if (tickMove.CheckInterval()) { win.Clear(Color.Green); int st = (TempCode.Step / ((60 - (TempCode.Movement * 2)) / 4)); st = (st >= 4) ? 3 : st; sprite.Position = new Vector2f(TempCode.X - 16, TempCode.Y - 48); sprite.TextureRect = new IntRect(32 * st, 48 * TempCode.Direction, 32, 48); win.Draw(sprite); win.Display(); win.DispatchEvents(); if (TempCode.Test.GPU) { Thread.Sleep(TempCode.Random.Next(50, 200)); } tickMove.Update(); } } sprite.Dispose(); sprite_tex.Dispose(); sprite_img.Dispose(); sprite = null; sprite_tex = null; sprite_img = null; win.Dispose(); win = null; }); gpu.Start(); while (RunEngine) { Thread.Sleep(1); Application.DoEvents(); if (win != null && win.IsOpen) win.DispatchEvents(); } cpu = null; gpu = null; } private static void Win_KeyPressed(object sender, KeyEventArgs e) { switch(e.Code) { case Keyboard.Key.Up: TempCode.Move.Up = true; TempCode.Move.Down = false; break; case Keyboard.Key.Down: TempCode.Move.Up = false; TempCode.Move.Down = true; break; case Keyboard.Key.Left: TempCode.Move.Left = true; TempCode.Move.Right = false; break; case Keyboard.Key.Right: TempCode.Move.Left = false; TempCode.Move.Right = true; break; case Keyboard.Key.LShift: TempCode.Movement = 2; break; } } private static void Win_KeyReleased(object sender, KeyEventArgs e) { switch (e.Code) { case Keyboard.Key.Up: case Keyboard.Key.Down: TempCode.Move.Up = false; TempCode.Move.Down = false; break; case Keyboard.Key.Left: case Keyboard.Key.Right: TempCode.Move.Left = false; TempCode.Move.Right = false; break; case Keyboard.Key.LShift: TempCode.Movement = 1; break; case Keyboard.Key.Num1: TempCode.Test.CPU = false; TempCode.Test.GPU = false; break; case Keyboard.Key.Num2: TempCode.Test.CPU = !TempCode.Test.CPU; TempCode.Test.GPU = false; break; case Keyboard.Key.Num3: TempCode.Test.CPU = false; TempCode.Test.GPU = !TempCode.Test.CPU; break; } } public static class TempCode { public static int X; public static int Y; public static int Direction; public static int Movement = 1; public static int MinX = 16; public static int MinY = 48; public static int MaxX = 1024 - 16; public static int MaxY = 576 - 48; public static int Step = 0; public const int DIR_UP = 3; public const int DIR_DOWN = 0; public const int DIR_LEFT = 1; public const int DIR_RIGHT = 2; public static Random Random; static TempCode() { X = (1024 / 2) - (32 / 2); Y = (576 / 2) - (48 / 2); Direction = DIR_DOWN; Random = new Random(); } public static class Move { public static bool Up; public static bool Down; public static bool Left; public static bool Right; } public static class Test { public static bool CPU; public static bool GPU; } } } }
  19. Engine's are not coded over night. Took me four hours now to code an extremely basic, bare bones, buggy as all banannas game loop. Still got at least a few days to go on something simple like that.
  20. Started to work on multi-threading the loop, code can be seen here: https://gitlab.com/XerShade/Esmiylara.Online/blob/master/source/Esmiylara.Online.Client/Engine.cs I will be re-writing it from scratch later to be more optimized and for two threads instead of one. Suggestions are still appreciated.
  21. So I have the game loop for my game coded here. I've been trying to figure out how to make Update() not get lagged out when Draw() takes it's time and slows the game out. Game Loops have always been a weak point so any help would be greatly appreciated. Source Code: https://gitlab.com/XerShade/Esmiylara.Online/blob/master/source/Esmiylara.Online.Client/Engine.cs using Esmiylara.Online.Client.Components; using System; using System.Threading; using System.Windows.Forms; using Timer = Esmiylara.Online.Client.Components.Timer; namespace Esmiylara.Online.Client { /// <summary> /// Esmiylara Online game engine. /// </summary> public partial class Engine { /// <summary> /// The game loop's thread. /// </summary> private static Thread LoopThread; /// <summary> /// Tells the engine if it should continue looping. /// </summary> private static bool DoLoop; /// <summary> /// [Hook] GameLoopInitialize, called when the game loop is initialized. /// </summary> public static event EventHandler<EventArgs> GameLoopInitialize { add { GameLoop.GameLoopInitialize += value; } remove { GameLoop.GameLoopInitialize -= value; } } /// <summary> /// [Hook] GameLoopStart, called when the game loop is started. /// </summary> public static event EventHandler<EventArgs> GameLoopStart { add { GameLoop.GameLoopStart += value; } remove { GameLoop.GameLoopStart -= value; } } /// <summary> /// [Hook] GameLoopUpdate, called when the game loop is updated. /// </summary> public static event EventHandler<EventArgs> GameLoopUpdate { add { GameLoop.GameLoopUpdate += value; } remove { GameLoop.GameLoopUpdate -= value; } } /// <summary> /// [Hook] GameLoopDraw, called when the game loop is drawn. /// </summary> public static event EventHandler<EventArgs> GameLoopDraw { add { GameLoop.GameLoopDraw += value; } remove { GameLoop.GameLoopDraw -= value; } } /// <summary> /// [Hook] GameLoopStop, called when the game loop is stopped. /// </summary> public static event EventHandler<EventArgs> GameLoopStop { add { GameLoop.GameLoopStop += value; } remove { GameLoop.GameLoopStop -= value; } } /// <summary> /// [Hook] GameLoopDispose, called when the game loop is disposed. /// </summary> public static event EventHandler<EventArgs> GameLoopDispose { add { GameLoop.GameLoopDispose += value; } remove { GameLoop.GameLoopDispose -= value; } } /// <summary> /// Runs the game engine. /// </summary> public static void Run() { // Call the loop method. Loop(); } /// <summary> /// Stops the game engine. /// </summary> public static void Stop() { // Tell the engine to stop looping. DoLoop = false; } /// <summary> /// Aborts the game engine thread. /// </summary> public static void Abort() { // Do the thing! LoopThread.Abort(); } /// <summary> /// The game engine loop function, do NOT call this directly. EVER. /// </summary> private static void Loop() { // Construct a new thread and assign the game code. LoopThread = new Thread(() => { // Tell the engine to loop. DoLoop = true; // Construct the game loop's variables. GameTime tick = new GameTime(); Timer tickUpdate = new Timer(1000 / 30); Timer tickDraw = new Timer(1000 / 30); // Initialize the game. GameLoop.Initialize(); // Start the game. GameLoop.Start(); // The game loop, simple for now. while (DoLoop) { // Update the GameTime object. tick.Update(); // Check to see if we need to update the game. if (tickUpdate.CheckInterval(tick.Value)) { // Update the game, do NOT draw any part of the game here. GameLoop.Update(tick); // Update the timer. tickUpdate.Update(tick.Value); } // Check to see if we need to draw the game. if (tickDraw.CheckInterval(tick.Value)) { // Draw the game, do NOT draw any part of the game here. GameLoop.Draw(tick); // Draw the timer. tickDraw.Update(tick.Value); } // Update the message pump. Application.DoEvents(); } // Stop the game. GameLoop.Stop(); // Dispose the game. GameLoop.Dispose(); }); LoopThread.Start(); } } }
  22. ARK: Survival Evolved PVE Server Server Information Name: lodicolo (on the ARK Unofficial Server browser) Host: ark.lodicolo.info Port: 7777 DLC: The Center (Free) Mods: Will auto-install on first connect to the server (make sure you don't have any first though) ARK Server Discord Information Invite URL: https://discordapp.com/invite/aQ4bZh7 Channel: ARK: Survival Evolved
  23. One of the beauties of the newer language is unlike older engines like Mirage built in VB6, i that the newer languages are smarter about how they serialize types. On older engines changing any data in the middle of a class would break the data and require a manual conversion. The newer languages are smarter about this. So as long as JCS doesn't do anything drastic you should be good, even then he would probably write up a manual updater if it was required.
  24. True, just whenever I do fonts in SFML the framerate takes a hit, not sure if its my gpu or what but will probably go for SFML, failing that SharpDX.
  25. Long story short, my project Xeris is getting to the point where I need to start working on rendering the game objects so I can actually see them processing on screen. I was thinking of going with SFML.NET but figured I would ask around for opinions first. Please keep in mind that being able to google information on how to use the library is a plus, as I am not too familiar with them.
×
×
  • Create New...