Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Welcome to our site

Take a moment to join our board

All Activity

This stream auto-updates     

  1. Today
  2. Omicron

    UI Framework Discussion for Map Editor

    @Spirited Webpack's main purpose is to compile. What you have is the additional plugins (not really called plugins but fits the purpose here) that allow you to run things like 'hot-reload' which automatically pick up changes you make in your js(x) or (s)css files. This is meant for just development purposes. Once you are done developing and ready to release, you let webpack create a production built where you don't have a lot of development plugins. What you end up with is a minified javascript file and minified css file or possibly multiple with chunks (only load what you need). TLDR: If you want to check the 'real' performance of your application which consists of webpack, you just have to run a production built to see.
  3. Yesterday
  4. Spirited

    UI Framework Discussion for Map Editor

    Sorry, I meant "unsuitable". So, I think I have two main options now. I tried using Electron and React without Webpack, and I got it working with less memory consumption than Windows 10's calculator app. It loaded UIKit 3 pretty well, but compatibility with JS/CSS frameworks was pretty rough without webpack. If I wanted to use Electron "right" with React, then I'd have to use webpack. I'd also have to make a middleware app just to pipe assets into memory from the filesystem. It's not that big of a deal, but just a hassle for an app that's going to perform worse in all categories. With Qt supporting themes pretty well (didn't know that), I might just go with Qt. I'm looking into that now with QtWidgets and QStyle.
  5. Last week
  6. Spirited

    UI Framework Discussion for Map Editor

    Yeah. I'll be working on it on my GitLab and I'll post about it here once I have something to show. Right now, I'm still researching technologies. I really like the idea of Electron and React for a launcher or content focused application (using middleware to launch apps), but may be really unsuitable for a disk heavy application. I may try using Qt as I was recommended to, and just try and theme it. Again though, still looking into it.
  7. Smallxmac

    UI Framework Discussion for Map Editor

    Are you going to be doing this development on github/gitlab? I would like to see it progress and possibly help if I find the time.
  8. Spirited

    Learning the 3D Asset Pipeline

    A lot of people from my work who do game design and modeling use Substance and really like it. It has a really good community for it, apparently. I don't know much about it myself, but my colleagues recommend making a box and applying a wall texture to it using Substance painter. Pretty simple idea to get you started with the controls and workflow. I'd be super interested to see your progress with this, as a non-designer. Good luck and happy learning!
  9. jadenfrancis

    Learning the 3D Asset Pipeline

    I have been making 2D games for a long time, and recently I have become more interested in 3D games. I would like to create my own assets, so it is time for me to learn the 3D asset pipeline. I have access to lots of software for free so I think I will use Maya, ZBrush, and Substance. I understand how difficult these can be and am willing to put in lots of time per day over many many months, but I am not sure how to go about learning them. Should I learn them all together or one by one? Should I learn via a large tutorial using all, or just get an overview of their function and UI and then jump in. Thank you for any help.
  10. Earlier
  11. Spuzzum

    C# Server Application with Win32

    Specially when I'm trying to run 15.000 monsters in the World with the AI active on all without interruptions even when the map is empty. I'm using an private Azure Repository, humm
  12. Spirited

    C# Server Application with Win32

    Well, if you'd like some feedback on your routines, let me know. You can always add me to a private GitLab repo, @Spirited. It's hard to squeeze out performance for a single core, one executable server.
  13. Omicron

    C# Server Application with Win32

    What also really helps is indexing your data in your tables. Also in code, try not to use things like ToList() or ToDictionary()
  14. Spuzzum

    C# Server Application with Win32

    Sometimes the Generator Thread get's congested due to the volume of monsters to generate when everyone has 2-3 accounts on auto-hunt on all maps and then it takes a few 'ms' to make what it have to do, then the server itself stucks for ~800-1500ms. And since I'm running on a single-core VPS I don't know what to think, because I changed the server from Win32 to Console. It has almost the same structure of the old source, but this one has this problem.
  15. Spirited

    [Go] Xor Encryption Issues

    Oh, I don't mind. That's why there're public under an open source license.
  16. W1cked

    [Go] Xor Encryption Issues

    I think what I may have done is copied the functions and rewrote it to match your Comet source, because the code comments don’t look like something I would write. I’m not that detailed. I think really the only thing I did differently was GenerateKeys, and swapped Encrypt/Decrypt to use one key instead of two. Hope you don’t mind me using it. I can’t fully test it til I get back to my PC but it looks like that did the trick!
  17. Spirited

    [Go] Xor Encryption Issues

    Gosh, it looks so crazy similar to my current implementation of Chimera that I didn't even realize it wasn't. Ok, so it looks like the EO source is using an older encryption. Looking at other server sources though, those counters are unsigned shorts. If you change your data types to Uint16, then you should be good to go. I'll make some changes to Comet to reflect that change. Sorry for the confusion. I blame CptSky's implementation, but it's entirely possible that I just mistyped. 😰
  18. Spirited

    C# Server Application with Win32

    I agree with you, but I think there're better ways to improve the performance of a server application. Appropriate data structures is one thing, like using a dictionary for key lookup rather than doing a search. Linq is a lovely addition to .NET, but usually encourages bad implementations from misuse. Algorithms are also very important, such as knowing your big-O and distributed big-O against a database. Database queries are also very costly in comparison to a cache lookup. So again, I agree with the GUI not being in a server executable, but at the same time I think there's a lot more that could be impacting performance more heavily.
  19. W1cked

    C# Server Application with Win32

    IMO, if you're worried about performance you should separate the GUI from the server all together. Something like RPC to get server stats/details on a by-need-basis only. This way you're not utilizing resources for the GUI even when you're not even utilizing it.
  20. W1cked

    [Go] Xor Encryption Issues

    So it appears that Comet suffers from the same affliction, which I forgot is where I referenced this cipher, not Chimera. I'm looking in the EO source now though.
  21. Spirited

    C# Server Application with Win32

    It really depends on how you implemented the GUI. If the window is being created using a single threaded apartment model, then your server could be under very serious performance constraints as it mashes all CLR threads into a single OS thread. You can easily check for this by calling Thread.CurrentThread.GetApartmentState on one of your server threads. Generally, having a GUI on a server executable (especially as the main thread) is bad practice, but if you're not looking for ways to squeeze performance out of every nook and cranny, then having a GUI under a multithreaded apartment model is probably fine for your use case.
  22. Spirited

    [Go] Xor Encryption Issues

    So, potentially my code doesn't handle wrapping and the client is expecting wrapping at an unsigned short range. Let me look into it more when I get home, but the EO source should show what it expects. Maybe it does a mod op that I'm not doing in my implementation. I based mine off of CtpSky's work and never compared it.
  23. I've been coding my server using C# and I did it with an user Interface only to show the server statistics and log in a friendly way. Of course the game logic and everything runs outside of the GUI Thread but, can the GUI make the server slower in any way? There's anything like GC or something in the UI that can make it slower in any way? It's been doing fine with 30-40 players in a 1 Thread 2 GB RAM VPS, but I'm not sure if it will scale well in a production server environment.
  24. W1cked

    [Go] Xor Encryption Issues

    Interesting, 65536 is where it fails. (65536 >> 8 ) + 0x100 would be 512, so 512 is where it's running out of range.
  25. Spirited

    [Go] Xor Encryption Issues

    I'm at work right now, but that XOR cipher they made is also a counter based cipher. Do you know what your counters are for the decrypt and encrypt directions when the failure occurs? It might be that the data type is wrong for those counters. I can't check right now, but the EO source should be a good reference for that as well.
  26. I've noticed that after being logged in for quite some time that my Xor encrypt function runs out of range. I have tried to debug this for hours now and can't figure it out. It appears that @Spirited's source uses two keys, where I am trying to use one key. I can't figure it out, and I only noticed it now because I left my client running all day and came back to realize that my encrypt function didn't work as expected. It appears to happen around the 2730th time the encrypt function runs. I've attached the code to the playground so you can what I mean. https://play.golang.org/p/HfnKFeqnVh_Z I know it has something to do with with line: dst[i] = dst[i] ^ c.dKey[(c.encrypt>>8)+0x100] More specifically, I know it has something to do with adding 256 (0x100) I'm just not sure why. Below is the same thing on the playground, I've attached it here for archival purposes. package main import ( "encoding/binary" "fmt" ) func main() { x := NewXor() nonEnc := []byte{24, 0, 241, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,} for i := 0; i < 3000; i++ { fmt.Println(i) enc := make([]byte, 24) x.Encrypt(enc, nonEnc) } } // DefaultKey for the Conquer Online game client. Used for interoperability with the game client. var DefaultKey = []byte{0x9D, 0x0F, 0xFA, 0x13, 0x62, 0x79, 0x5C, 0x6D} //Xor cipher used for encrypting/decrypting client/server stream. //dKey is the default key that will be used until the player requests //that the game key (gKey) be initialized using accountId and token. //thereafter, the gKey will be used for encrypting/decrypting. type Xor struct { decrypt, encrypt uint32 dKey [0x200]byte gKey [0x200]byte gameInit bool } // NewCipher assumes the input key is correct (that the length of the key is // 8 bytes) and returns a new instance of the cipher after generating the // initial keystream. func NewXor() *Xor { c := new(Xor) key := DefaultKey for i := 0; i < 0x100; i++ { c.dKey[i] = key[0] c.dKey[i+0x100] = key[4] key[0] = (key[1]+byte(key[0]*key[2]))*key[0] + key[3] key[4] = (key[5]-byte(key[4]*key[6]))*key[4] + key[7] } return c } // GenerateKeys uses the token and identity of the client (in this project, // the 64-bit token buffer from MsgConnect if it were supported by the client // patch) as the key for altering the keystream. func (c *Xor) GenerateKeys(accountId uint32, token uint32) { temp1 := uint32(((token + accountId) ^ 0x4321) ^ token) sqr := uint32(temp1 * temp1) tmp1 := make([]byte, 4) tmp2 := make([]byte, 4) binary.LittleEndian.PutUint32(tmp1, temp1) binary.LittleEndian.PutUint32(tmp2, sqr) for i := 0; i < 0x100; i++ { c.gKey[i] = c.dKey[i] ^ tmp1[i%4] c.gKey[i+0x100] = c.dKey[i + 0x100] ^ tmp2[i%4] } c.gameInit = true c.encrypt = 0 } // Encrypt sets dst with the result of XORing src with the key stream. Dst and // src may be the same slice, but otherwise should not overlap. Decrypt uses // the encryption counter (encrypt). func (c *Xor) Encrypt(dst, src []byte) { for i, v := range src { dst[i] = v ^ 0xAB dst[i] = dst[i]>>4 | dst[i]<<4 dst[i] = dst[i] ^ c.dKey[byte(c.encrypt&0xff)] dst[i] = dst[i] ^ c.dKey[(c.encrypt>>8)+0x100] c.encrypt++ } } // Decrypt sets dst with the result of XORing src with the keystream. Dst and // src may be the same slice, but otherwise should not overlap. Decrypt uses // the decryption counter (decrypt). func (c *Xor) Decrypt(dst, src []byte) { if c.gameInit == false { for i, v := range src { dst[i] = v ^ 0xAB dst[i] = dst[i]>>4 | dst[i]<<4 dst[i] = dst[i] ^ c.dKey[byte(c.decrypt&0xff)] dst[i] = dst[i] ^ c.dKey[(c.decrypt>>8)+0x100] c.decrypt++ } return } for i, v := range src { dst[i] = (byte)(v ^ 0xAB) dst[i] = (byte)(dst[i]>>4 | dst[i]<<4) dst[i] = (byte)(dst[i] ^ c.gKey[c.decrypt&0xff]) dst[i] = (byte)(dst[i] ^ c.gKey[(c.decrypt>>8)+0x100]) c.decrypt++ } } //BlockSize is here to satisfy the cipher.Block interface. It is unimplemented func (c *Xor) BlockSize() int { panic("Xor BlockSize should never be called. Implemented to fulfill interface.") }
  27. Spirited

    UI Framework Discussion for Map Editor

    I see. Wow, that's not well outlined in their introduction article. Oh well, Electron it is then.
  28. Omicron

    UI Framework Discussion for Map Editor

    WPF on core 3 is currently still Windows only though. I believe they are working on making it cross platform but aren't there yet.
  29. Spirited

    UI Framework Discussion for Map Editor

    I could, perhaps. Another option is WPF. Apparently, .NET Core 3.0 has cross platform WPF support now. I'm not sure what requirements the Linux build has or what it looks like, but that might be interesting if it can support OpenGL. I'm probably less excited to use WPF than I am Electron, though. Microsoft makes me uneasy when it comes to cross platform UI.
  1. Load more activity
×

Important Information

By using this site, you agree to our Terms of Use.