• What Are You Working On? - August 2014
    1,181 replies, posted
[QUOTE=Ac!dL3ak;45718352]It's probably a rounding error. Go into the XML file and try to find the position definition for it and round it up/down.[/QUOTE] I figured it out right before you posted. I had my height set to an odd number (31). Changing it to 30 fixed it. Now I just have to modify everything else to work with 30.... Thanks though.
[QUOTE=trashmaster;45717978][QUOTE=geel9;45715284]Teleportation! [img]http://puu.sh/aW3CT/f3b8881297.png[/img][/QUOTE] I like how your basic server already has instanced NPCs when probably 99% of "proper" private servers lack those. they seriously use an integer overflow bug with coordinates or something similar to do instances. RSPS is so much fun, such a shame the community is 1 guy who can program per 1000 "how is server coddes formed?? pls help me fix 100 compiler errors I got from copypasting tutorials" kiddos[/QUOTE] It helps that I'm starting from scratch. Back when I was actually trying to make servers from an existing base (pimpscape bitch) when I was ~13 I didn't really understand what I was doing at all. It doesn't help that all existing bases that I've seen have horrible methodologies. Conversations are done using giant switch statements, buttons are giant switch statements in the packet handler, no real scheduling of events... I could go on. It is absolutely horrible.
[QUOTE=Richy19;45710293]Cant you just port it over to C#?[/QUOTE] I concur, if it's really that terrible and has few salvageable parts you should ask whether that's an option. [QUOTE=Richy19;45710293]Im not sure if this is the best place to ask, or maybe webdev. Ive been looking into encryption, specifically server-client encryption and found this as a good example [url]https://github.com/chengxianga2008/node-cryptojs-aes[/url] So in their simple example the data is 'secure', but I dont see the point in using the encryption for something like that... surely the 'hacker' could use a MitM attack to get hold of the encrypted data, then just call the API to get the passphrase and decrypt it himself?[/QUOTE] You'd usually use a Diffie-Hellman key exchange to generate an uninterceptible key for the symmetrically encrypted channel. Active MitM is prevented by signing the key exchange with a certificate, but this requires prior knowledge which is why CAs exist. If you control the client (for example by supplying a browser extension like MEGA does), you can use your own certificate though since you can compare to the public key embedded in the add-on.
[QUOTE=Tamschi;45719679]I concur, if it's really that terrible and has few salvageable parts you should ask whether that's an option.[/QUOTE] They'd love to have it on a modern language that people actually know from what I understand. But neither they nor I actually have the time to try and understand why some of it works. They can't have it change too much or something without risking something going wrong in a core component of their current pipeline. It probably wouldn't be hard to re-teach the guys who use it how to use it, but just working out what it does would take a while by itself, and creating a replacement from scratch wouldn't be accepted by the business managers it seems, we were lucky to get the money to port some 15 year old C++ for C# and F# a few months before I started. The company isn't an software company, it just has a massive internal software department. I'm trying to think of a project to do in my spare time for portfolio and fun reasons, but I just cannot thing of a single one and it's driving me insane. A small game could be cool, but I dunno what kind of thing I'd be capable of making. A more functional application would be better as I quite like making them, but I can't think of a niche to aim for (drive cleaner #3452 is not a good idea). The idea of doing a ray-tracer sounded cool, maybe even using OpenCL to learn that, but ehh, been done to death and I don't have much downtime right now to learn the stuff required.
[QUOTE=Sidneys1;45712716]Because imageshack is shit and converts all uploads to JPG, but keeps "png" in the file name/URL =P If you hit "save images as" it'll show jpg. I really ought to switch my image host, but I've been using imageshack forever... Any suggestions?[/QUOTE] [URL]http://jesusfuck.me/[/URL] seems to be popular with a few people on this forum. [editline]17th August 2014[/editline] [QUOTE=proboardslol;45712945]I don't know if this is already included in your languages library, but if it's not, what was your algorithm to have bullets shot directly at the player instead of at right angles/45 degree angles? for example, I tried calculating the slope of the two points between the enemy and the player, but if the slope was a decimal, it would have issues because I can't tell something to move 2.69 pixels away, only 2. It would then ultimately miss even if the player was standing still since it would automatically become a whole number[/QUOTE] I think the usual way to handle this is by keeping floats internally and only doing collisions/rendering using whole numbers. [editline]17th August 2014[/editline] [QUOTE=Bumrang;45713390]you'll need to get the delta of the time between frames, here are some good links on the subject [url]http://gafferongames.com/game-physics/fix-your-timestep/[/url] [url]http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step[/url] [editline]16th August 2014[/editline] unless I misunderstood what you're asking[/QUOTE] That first one is not a good link... In the case of this space game, it's much better to run everything as fast as you can get input, which means you shouldn't use a fixed time step but instead do continuous collisions over whatever you get dynamically. If you want to keep replays just record the FPS, like Touhou does. [editline]17th August 2014[/editline] I think Touhou has a fixed time step and just slows down if you don't get 60 FPS though. The FPS counter is more for showing off replays. [editline]17th August 2014[/editline] [QUOTE=Dr. Evilcop;45714132]What? MS still supports all those languages, even if they aren't continuing to develop them. Technologies dying and being replaced are just a natural part of the software industry. [editline]16th August 2014[/editline] Speaking of, what do you guys think of Monogame? I want to move away from Java and towards C#, but I need to maintain the cross platform capabilities of Java and LibGDX. Is it worth it? Or should I just bide my time until I know C++ well enough?[/QUOTE] I think there's a fork that has a unified renderer and is truly platform agnostic somewhere, so you can use that. Otherwise you can use the same low level OpenGL in C# as in C++ using OpenTK.
[IMG]http://i.imgur.com/VNeGww2.png[/IMG] Writing a Lua virtual machine in C# because i'm bored. For now it can parse the dump (with and without debug info) and print it.
[QUOTE=Zyx;45715406][B]And it's done.[/B] Every single person within my age group and area is now liked. Today I made it run a batch of 100 cycles 3 times. Every batch has 10 people in them, so 3000 people today. Yesterday I had it run in batches of 50 a few times, so that's 1000 more. Add 200 more for good measure that I did before I implemented the batches. A grand total of ~4200 people liked in <24 hours. Not bad.[/QUOTE] Don't forget to make a female account to optimise your profile by checking out others. [editline]17th August 2014[/editline] [QUOTE=geel9;45717602]Depends. Firstly, I don't think the current state of the server is very impressive, because all I've done is lay a foundation for content creation. I've also stolen some code from some popular (but bloody awfully written) Java 317 servers that has to do with logging in and unpacking text, just so I could get it to actually run. Once I rewrite all that, and make it super fly~, I might release the source, because it's the only C# server of its kind I think. Then again, if I actually take it somewhere, and try to use it in an interview/portfolio with Jagex ("Hey look I made your game again! Hire me!"), I don't know if "Oh and I released the source which directly violates your copyrights" would be the greatest idea.[/QUOTE] It only does that if it contains parts not written from scratch and/or their product name in case it's a trademark. If you purge that from the repository it's legal. [editline]17th August 2014[/editline] [QUOTE=sabreman;45718091]Facepunch I need your help. Why the fuck is my WPF progressbar slightly off-set in the actual application when it's not in the editor? In editor: [t]http://i.imgur.com/m5npwpE.png[/t] When running: [t]http://i.imgur.com/lZ0sxrY.png[/t] Moving it down by one pixel actually makes it worse, because you get those retarded fuzzy edges still but coming out of the bottom now (And with a gap at the top). There is no border or anything on it as well. Any ideas how to fix this?[/QUOTE] Make sure SnapToDevicePixel(?) is set to the same thing on everything you want to align. [editline]17th August 2014[/editline] [QUOTE=hexpunK;45719820]They'd love to have it on a modern language that people actually know from what I understand. But neither they nor I actually have the time to try and understand why some of it works. They can't have it change too much or something without risking something going wrong in a core component of their current pipeline. It probably wouldn't be hard to re-teach the guys who use it how to use it, but just working out what it does would take a while by itself, and creating a replacement from scratch wouldn't be accepted by the business managers it seems, we were lucky to get the money to port some 15 year old C++ for C# and F# a few months before I started. The company isn't an software company, it just has a massive internal software department. I'm trying to think of a project to do in my spare time for portfolio and fun reasons, but I just cannot thing of a single one and it's driving me insane. A small game could be cool, but I dunno what kind of thing I'd be capable of making. A more functional application would be better as I quite like making them, but I can't think of a niche to aim for (drive cleaner #3452 is not a good idea). The idea of doing a ray-tracer sounded cool, maybe even using OpenCL to learn that, but ehh, been done to death and I don't have much downtime right now to learn the stuff required.[/QUOTE] You could combine them, make a defraggler that is also a shmup for example :v:
If you're bored, invent a new programming language and write a parser/compiler for it. It's really fun once you get things rolling. Speaking of, I've just added BEGINASM/ENDASM keywords to Kaleedee. In between those you can hand-write custom assembly, and it just gets pasted as-is to the output compiled assembly. So for instance since Kaleedee doesn't have any built-in memory access features, I can hand-write those in assembly like so: [code] BEGINASM ; function which writes a value to memory _FUNC_memwrite: push %ebp mov %ebp %esp pop %eax ;pop the pointer off of the stack pop %ebx ;pop the value off of the stack mov [%eax] %ebx ;copy value to memory location pop %ebp ret 0 ; function which reads a value from memory _FUNC_memread: push %ebp mov %ebp %esp pop %ebx ;pops the pointer off of the stack mov %eax [%ebx] ;copy value from memory to register pop %ebp ret %eax ENDASM var i = 10; var ptr_test = 0; memwrite( i, ptr_test ); var x = memread( ptr_test ); var i_equals_x = ( x == i ); // if i was written to memory correctly, and x was read from memory correctly, this will be TRUE (1), otherwise FALSE (0) [/code]
So my .NET WPF app runs fine in debug, but crashes without any helpful info (even if I attach the debugger) when I run it in release mode. Error is "System.Reflection.TargetInvocationException", but I use absolutely no #if DEBUG and definitely no reflection in this project. Any suggestions for figuring out what's wrong? All visual studio says is that the stack trace is entirely in unmanaged code.
Working on reading the RuneScape cache files. [img]http://puu.sh/aWMLD/c921da4798.png[/img] Fully reads index files (pretty easy to do). [img]http://puu.sh/aWQFw/9acd123171.png[/img] Unpacks all the files!
[QUOTE=Sidneys1;45720587]So my .NET WPF app runs fine in debug, but crashes without any helpful info (even if I attach the debugger) when I run it in release mode. Error is "System.Reflection.TargetInvocationException", but I use absolutely no #if DEBUG and definitely no reflection in this project. Any suggestions for figuring out what's wrong? All visual studio says is that the stack trace is entirely in unmanaged code.[/QUOTE] Do you use [I]dynamic[/I], Reflection, or generic instantiation of a class with the [I]new()[/I] constraint anywhere?
[QUOTE=Tamschi;45720769]Do you use [I]dynamic[/I], Reflection, or generic instantiation of a class with the [I]new()[/I] constraint anywhere?[/QUOTE] Nope, it only happens when scrolling a listbox with a VirtualizedWrapPanel layout manager.
Success! I can now load item and NPC information from the 317 cache. [img]http://puu.sh/aWZvY/1ff77786ef.png[/img]. The 317 cache format is as follows: -Main cache data file. Is essentially a large archive of files. -5 index files. Each index file simply tells you how many files are indexed by it, how large they each are, and where you can find each one in the main data file. However, files that are listed in the 0th index file are actually archives themselves [b]in a different format.[/b] So after you extract those ones, you need to do more work to look into the file contents of these archives. So that's fun.
Things have progressed quite nicely with Kaleedee, and the compiler is close to done. I've got it compiling this: [code] import( ""lib_mem.kld"" ); import( ""lib_gfx.kld"" ); const var FIELDSIZE = 4; const var PLAYER_MEMSIZE = 4 * FIELDSIZE; var ptrPlayer = memalloc( PLAYER_MEMSIZE ); var playerX = 0; var playerY = 0; var playerVelocityX = 0; var playerVelocityY = 0; setfield( ptrPlayer, 0, playerX ); setfield( ptrPlayer, 1, playerY ); setfield( ptrPlayer, 2, playerVelocityX ); setfield( ptrPlayer, 3, playerVelocityY ); // initialize setSprite( 0, 0 ); // start loop main( ptrPlayer ); // cleanup memfree( ptrPlayer, PLAYER_MEMSIZE ); function main( ptr_PlayerPos ) { var playerX = getfield( ptr_PlayerPos, 0 ); var playerY = getfield( ptr_PlayerPos, 1 ); var playerVelocityX = getfield( ptr_PlayerPos, 2 ); var playerVelocityY = getfield( ptr_PlayerPos, 3 ); while( TRUE ) { // increment player position playerX += playerVelocityX; playerY += playerVelocityY; // update hw sprite pos updateSprite( 0, playerX, playerY ); // wait for next vblank vblank(); } setfield( ptr_PlayerPos, 0, playerX ); setfield( ptr_PlayerPos, 1, playerY ); } function getfield( ptr, index ) { return memread( ptr + ( index * FIELDSIZE ) ); } function setfield( ptr, index, value ) { memwrite( ptr + ( index * FIELDSIZE ), value ); } [/code] To this huge indecipherable pile of assembly: [code] push 16 call _FUNC_memalloc add %esp 4 push %eax push 0 push 0 push 0 push 0 mov %eax [-8(%ebp)] push %eax push 0 mov %eax [-4(%ebp)] push %eax call _FUNC_setfield add %esp 12 mov %eax [-12(%ebp)] push %eax push 1 mov %eax [-4(%ebp)] push %eax call _FUNC_setfield add %esp 12 mov %eax [-16(%ebp)] push %eax push 2 mov %eax [-4(%ebp)] push %eax call _FUNC_setfield add %esp 12 mov %eax [-20(%ebp)] push %eax push 3 mov %eax [-4(%ebp)] push %eax call _FUNC_setfield add %esp 12 push 0 push 0 call _FUNC_setSprite add %esp 8 mov %eax [-4(%ebp)] push %eax call _FUNC_main add %esp 4 push 16 mov %eax [-4(%ebp)] push %eax call _FUNC_memfree add %esp 8 _FUNC_main: push %ebp mov %ebp %esp push 0 mov %eax [8(%ebp)] push %eax call _FUNC_getfield add %esp 8 push %eax push 1 mov %eax [8(%ebp)] push %eax call _FUNC_getfield add %esp 8 push %eax push 2 mov %eax [8(%ebp)] push %eax call _FUNC_getfield add %esp 8 push %eax push 3 mov %eax [8(%ebp)] push %eax call _FUNC_getfield add %esp 8 push %eax _TestKaleedee_lbl0: push 1 pop %eax cmp %eax 0 je _TestKaleedee_lbl1 mov %eax [-4(%ebp)] push %eax mov %eax [-12(%ebp)] push %eax pop %eax add %eax [%esp] mov [-4(%ebp)] %eax add %esp 4 mov %eax [-8(%ebp)] push %eax mov %eax [-16(%ebp)] push %eax pop %eax add %eax [%esp] mov [-8(%ebp)] %eax add %esp 4 mov %eax [-8(%ebp)] push %eax mov %eax [-4(%ebp)] push %eax push 0 call _FUNC_updateSprite add %esp 12 call _FUNC_vblank add %esp 0 jmp _TestKaleedee_lbl0 _TestKaleedee_lbl1: mov %eax [-4(%ebp)] push %eax push 0 mov %eax [8(%ebp)] push %eax call _FUNC_setfield add %esp 12 mov %eax [-8(%ebp)] push %eax push 1 mov %eax [8(%ebp)] push %eax call _FUNC_setfield add %esp 12 add %esp 16 pop %ebp ret 0 _FUNC_getfield: push %ebp mov %ebp %esp mov %eax [8(%ebp)] push %eax mov %eax [12(%ebp)] push %eax push 4 pop %eax mul %eax [%esp] mov [%esp] %eax pop %eax add %eax [%esp] mov [%esp] %eax call _FUNC_memread add %esp 4 pop %eax pop %ebp ret %eax pop %ebp ret 0 _FUNC_setfield: push %ebp mov %ebp %esp mov %eax [16(%ebp)] push %eax mov %eax [8(%ebp)] push %eax mov %eax [12(%ebp)] push %eax push 4 pop %eax mul %eax [%esp] mov [%esp] %eax pop %eax add %eax [%esp] mov [%esp] %eax call _FUNC_memwrite add %esp 8 pop %ebp ret 0 [/code]
[IMG]http://i.imgur.com/ssR3QtP.png[/IMG] It can now execute it! Lua local A = GetA() local B = GetB() function P(p) print(p) end print("A: " .. tostring(A) .. ", B: " .. tostring(B)) P(A + B) Bytecode [code] 1 [2] GETGLOBAL 0 -1 ; GetA 2 [2] CALL 0 1 2 3 [3] GETGLOBAL 1 -2 ; GetB 4 [3] CALL 1 1 2 5 [7] CLOSURE 2 0 ; 01C28AB8 6 [5] SETGLOBAL 2 -3 ; P 7 [9] GETGLOBAL 2 -4 ; print 8 [9] LOADK 3 -5 ; "A: " 9 [9] GETGLOBAL 4 -6 ; tostring 10 [9] MOVE 5 0 11 [9] CALL 4 2 2 12 [9] LOADK 5 -7 ; ", B: " 13 [9] GETGLOBAL 6 -6 ; tostring 14 [9] MOVE 7 1 15 [9] CALL 6 2 2 16 [9] CONCAT 3 3 6 17 [9] CALL 2 2 1 18 [10] GETGLOBAL 2 -3 ; P 19 [10] ADD 3 0 1 20 [10] CALL 2 2 1 21 [10] RETURN 0 1 --- 1 [6] GETGLOBAL 1 -1 ; print 2 [6] MOVE 2 0 3 [6] CALL 1 2 1 4 [7] RETURN 0 1 [/code] Edit: I also discovered [URL="https://github.com/zdevito/terra"]Terra[/URL]
So C# is great but setting up MonoGame and VisualStudio or Xamarin straight up doesn't fucking work :v: Guess I'll just move on straight to C++ when I'm ready.
FastColoredTextBox is amazing. A few glitches here and there, but hey, I have syntax highlighting! Time to make a proper Manhood IDE, at last... [IMG]http://i.imgur.com/kdPohHh.png[/IMG]
[QUOTE=Dr. Evilcop;45723487]So C# is great but setting up MonoGame and VisualStudio or Xamarin straight up doesn't fucking work :v: Guess I'll just move on straight to C++ when I'm ready.[/QUOTE] humm what? Have you tried using NuGet? MonoGame works fine here.
[QUOTE=MatheusMCardoso;45724228]humm what? Have you tried using NuGet? MonoGame works fine here.[/QUOTE] On Windows, you may run into a small number of problems with the content pipeline, but on other platforms you'll get this encouraging message in addition. [quote]At this time MonoGame does not include an independent implementation of the XNA content pipeline. We depend on Microsoft's XNA content pipeline implementation and Visual Studio 2010 on Windows to build content for all MonoGame platforms. This means you must have a Windows system or virtual machine available to run the content pipeline regardless of what platform you're developing for. [/quote] At least they're making progress.
Got polygon shrinking working. It was not as easy as I first expected, but now things look pretty. I forget what I'm supposed to do next but I'm sure it'll come to me soon. [img]http://i.imgur.com/RUA9zbW.png[/img] Oh and there's a bug in that screenshot, I should figure it out.
Wrote two tutorials on behavior trees: [url]http://notmagi.me/behavior-trees-number-1/[/url] [url]http://notmagi.me/behavior-trees-number-2/[/url]
Started learning shaders, GLSL ES to be more precise... it's fun! Here's my topdown water shader (and a little project I'm working on). [vid]https://dl.dropboxusercontent.com/u/5103111/gm/speedboat_water.webm[/vid]
[QUOTE=Berkin;45723838]FastColoredTextBox is amazing. A few glitches here and there, but hey, I have syntax highlighting! Time to make a proper Manhood IDE, at last... [IMG]http://i.imgur.com/kdPohHh.png[/IMG][/QUOTE] Except for the tiny little detail where it ALWAYS replaces tabs for spaces and there's no way around it.
[QUOTE=Hypershadsy;45724675]On Windows, you may run into a small number of problems with the content pipeline, but on other platforms you'll get this encouraging message in addition. At least they're making progress.[/QUOTE] If by small number of problems you mean MonoGame doesn't work with MonoDevelop/XamarinStudio because the plugin is outdated and Xamarin doesn't offer downloads of earlier versions of Xamarin Studios and the only third party recompile of the plugin still doesn't work and Visual Studio barely works with the default C# then sure. That's another problem too, I strongly prefer developing on Linux. I'll just stick to Java for now then C++ later. Having a working framework and truly cross platform development environment is worth it to me. WebGL support is nice too, difficult as the initial setup might be.
[QUOTE=Darwin226;45725499]Except for the tiny little detail where it ALWAYS replaces tabs for spaces and there's no way around it.[/QUOTE] Source is up on github, perhaps you could correct that behaviour for your project?
[IMG]http://i.gyazo.com/133c121278e78db410f207c99c805e43.png[/IMG] Lighting :0
Adding a little personality. [img]http://i.imgur.com/2Go4aK5.png[/img] [img]http://i.imgur.com/lZh02dR.png[/img]
[QUOTE=chaz13;45727090]Adding a little personality.[/QUOTE] That text is really hard to read.
[QUOTE=Socram;45727241]That text is really hard to read.[/QUOTE] Agreed! I guess I'll not bother with the layer effect, that might help. Failing that I'm not too sure how to improve it.
Octree ladies and gentlemen... [IMG]http://3devs.bplaced.net/wp-content/uploads/2014/08/octree.jpg[/IMG] [IMG]http://3devs.bplaced.net/wp-content/uploads/2014/08/octree.gif[/IMG] need to figure out why it stores models multiple times in the nodes while i just represent models as POINTS at this moment !!! -.-
Sorry, you need to Log In to post a reply to this thread.