• What do you need help with? Version 5
    5,752 replies, posted
[QUOTE=robmaister12;37350141]Sometimes values are bitfields/flags. Look at which bits are set and see if there's anything common. Also if there's anything that's completely random, it's probably a checksum of some kind. At least that's what I've seen through the formats I've reversed. If it's always a high value or low value, it might be two shorts put together, see if that yields any values that make sense. Worst case scenario, you could try disassembling the game and seeing what it does with those values... [editline]21st August 2012[/editline] and the unknown vector might be a scale vector...[/QUOTE] I don't think disassembling the game would go over very well as it's running on an emulator. That's just adding a layer of complications to everything that I really don't think I can handle. Even when I split apart Unknown5-7 into shorts, they still end up as either 0 or some common big number. It'd help if I could figure out what other data the collision system would use, I have: Vertexes Faces (each face stores 3 indexes for the triangle + two Type_t indexes) Special Flags (water/lava/default) Unknown1 does look like it could be a scale vector which would explain 1,1,1 being the most common. It also fits in that every usage but one so far has three identical values ([url]http://i.imgur.com/Dcj2y.png[/url] was my written record of values). However the problem with it being a scale: The Type_t information is equivalent to a surface property. Each triangle references a Type_t (far less Type_t's per map than triangles), so I couldn't think of what it'd scale.
[QUOTE=Lord Ned;37350518]I don't think disassembling the game would go over very well as it's running on an emulator. That's just adding a layer of complications to everything that I really don't think I can handle. Even when I split apart Unknown5-7 into shorts, they still end up as either 0 or some common big number. It'd help if I could figure out what other data the collision system would use, I have: Vertexes Faces (each face stores 3 indexes for the triangle + two Type_t indexes) Special Flags (water/lava/default) Unknown1 does look like it could be a scale vector which would explain 1,1,1 being the most common. It also fits in that every usage but one so far has three identical values ([url]http://i.imgur.com/Dcj2y.png[/url] was my written record of values). However the problem with it being a scale: The Type_t information is equivalent to a surface property. Each triangle references a Type_t (far less Type_t's per map than triangles), so I couldn't think of what it'd scale.[/QUOTE] It might be easier to disassemble if you have an emulator that's open source, cause you could compile in debug mode and add in your own conditional breakpoints then attach the debugger. You could probably even modify the emulator to trigger a breakpoint when it accesses a certain section of the ROM file (the model you're trying to reverse engineer). If you can get that set up you'll have exact answers on what every byte is doing. Other than that just keep looking for patterns until you find them. Remember that sometimes with console games you get weird methods of data storage as a result of optimization, so don't be surprised if data is packed in weirdly.
[QUOTE=robmaister12;37351092]It might be easier to disassemble if you have an emulator that's open source, cause you could compile in debug mode and add in your own conditional breakpoints then attach the debugger. You could probably even modify the emulator to trigger a breakpoint when it accesses a certain section of the ROM file (the model you're trying to reverse engineer). If you can get that set up you'll have exact answers on what every byte is doing. Other than that just keep looking for patterns until you find them. Remember that sometimes with console games you get weird methods of data storage as a result of optimization, so don't be surprised if data is packed in weirdly.[/QUOTE] I'm looking into that. I'm not too up to speed on how emulators work (Frankly, the people who write them blow my mind, how do you even find a place to start?), but I don't know how you'd add breakpoints when it's running code inside of it, since Nintendo would have written their own file-loader code inside the Gamecube's executable... Or would you break on the calls that it makes and walk up the chain? Going to give this some more investigation.
ok next question what is the proper way to get the damn dos screen to stay open and not close milliseconds after it opens. This is irritating the fuck out of me [editline]21st August 2012[/editline] c++ just so you know. I tried different things none of them work
getchar()
Are there any guides or anything on parsing Valve's keyvalue files (C++)?
ok so i have searched google and there is no answer to this, any one have a clue? error C2661: 'getchar' : no overloaded function takes 1 arguments [editline]22nd August 2012[/editline] i do appreciate all the help i can get :)
You're passing something to getchar(), but it has no parameters.
how can i use getchar correctly? right now I'm using system("pause") (yes i know it is not proper but hey i am learning)
[cpp] getchar(); [/cpp]
[QUOTE=dajoh;37354039][cpp] getchar(); [/cpp][/QUOTE] I've did that, it returns errors
[QUOTE=confinedUser;37354140]I've did that, it returns errors[/QUOTE] Post full code.
[QUOTE=dajoh;37354154]Post full code.[/QUOTE] I fixed it however i now have a issue with char holding name[5] [code] #include "iostream" #include "stdio.h" using namespace std; int main(int argc, const char *argv[]) { float nums[3]; nums[0] = 1.5; nums[1] = 2.75; nums[2] = 3.25; char name[5] = { 'm', 'i', 'k', 'e', '/0' }; int coords[2][3] = { {1,2,3}, {4,5,6,} }; cout << "nums[0]: " << nums[0] << endl; cout << "nums[1]: " << nums[1] << endl; cout << "nums[2]: " << nums[2] << endl; cout << "name[0]: " << name[0] << endl; cout << "string: " << name << endl; cout << "coords[0][2]: " << coords[0][2] << endl; cout << "coords[1][2]: " << coords[1][2] << endl; getchar(); return 0; } [/code]
You are already including iostream so use cin.get() instead of getchar().
figured it out char was storing name which was too long for char since it only can store a character
[QUOTE=confinedUser;37354414]figured it out char was storing name which was too long for char since it only can store a character[/QUOTE] The problem was that your null character was wrong. It is \0 not /0 [editline]22nd August 2012[/editline] Change that and your code works fine. [editline]22nd August 2012[/editline] You can avoid writing the null character like this: [code]char name[] = "mike";[/code]
Just wondering if there is any good resource that anybody knows of for studying Binary Trees and Nodes. LinkedLists and that sort of thing. I have a repeat for college on Friday and I need to know how to make Nodes and some methods for binary trees, which I find sort of hard
I'm so proud of myself i had to take a snapshot [IMG]http://puu.sh/XH0w[/IMG] [editline]22nd August 2012[/editline] whoops there is a 0 at the end of mike :v: [editline]22nd August 2012[/editline] just for the record i am learning from a book, apparently it had two things wrong with it
-oops, didn't read-
So I'm working on a snake game in SFML. I actually completed it (movement, collision, food). The thing is that I limit the frame rate to control the speed of the snake. But lowering the frame rate makes the input checking less responsive. I know I should use timers, but I have no idea how to implement them and how to use them in my game. Any help ?
Check out QueryPerformanceCounter, was ages since I used it myself but its quite easy to calculate the frame time using that. Then its just a matter of multiplying the speed with the frame time.
[QUOTE=Ramdac;37361182]Check out QueryPerformanceCounter, was ages since I used it myself but its quite easy to calculate the frame time using that. Then its just a matter of multiplying the speed with the frame time.[/QUOTE] SFML comes with its own timer class.
[QUOTE=MakeR;37361195]SFML comes with its own timer class.[/QUOTE] You see I have no idea what to do. How to calculate it, what to calculate, how to use it to change the speed of the game (or movement). I've never done this before. It's my first "real" game.
You need to use the timer to calculate the time elapsed since the last frame. All movement needs to be multiplied by this value, this make it framerate independent. Here is some psuedo-code that may help you. [cpp]void main() { sf::RenderWindow window(sf::VideoMode(800, 600), "Snake"); sf::Clock timer; while (window.isOpen()) { sf::Event ev; while (window.pollEvent(ev)) { // handle events } float dt = timer.restart().asSeconds(); Update(dt); // render } } void Update(float dt) { MoveSnake(speed * dt) // All movement should be multiplied by dt }[/cpp] Note that this code uses SFML 2.0. [editline]22nd August 2012[/editline] I'm assuming you are using C++ and not .NET or an external binding.
I am writing a game that involves a very simplified simulation of a basic rocket for teaching purposes to 12/13 year old kids. If anyone thinks they can teach me about how to calculate thrust output, acceleration and so on in regards to a rocket then can you please add me on Steam or PM me on here? I don't really know anything about rockets so I could do with some help. Thanks in advance!
Im using these matricies: [csharp] MVP = Matrix4.CreateOrthographicOffCenter(0.0f, Settings.width, Settings.height, 0.0f, -1.0f, 1.0f); Matrix4 mvp = MVP * Matrix4.CreateTranslation (Pos.x, Pos.y, 0.0f); GL.UniformMatrix4 (shader.GetUniform ("MVP"), false, ref mvp); [/csharp] And this vert shader [cpp] #version 120 uniform mat4 MVP; attribute vec3 Position; attribute vec2 UV; varying vec2 uv; void main() { uv = UV; gl_Position = MVP * vec4(Position, 1.0f); } [/cpp] So the effect I want it to accomplish is for me to enter Pos.xy as a value within the screen size and have it positioned there (as expected with a 2d system) however it seems to take values within the 0 - 2 range meaning if I use 1,1 the text is in the middle of the screen. Anyone know why?
[QUOTE=MakeR;37361324] ...[/QUOTE] So, I implemented that, but the thing is.. It's too slow. The piece that moves the snake is [CODE] switch(direction) { case 0: sprites[0].move(-60*dt,0); break; case 1: sprites[0].move(0,-60*dt); break; case 2: sprites[0].move(60*dt,0); break; case 3: sprites[0].move(0,60*dt); break; } [/CODE] The movement was grid-like(move by 60px), but now it's not since it's multiplied by the time. What am i missing to make it move like before but slower like there would be a delay between movements ?
I dont know what I have done but something just crashes Mono. Can someone with .Net try this out (put your mouse somewere and press W,S,A,D) and tell me if it crashes or if it subdivides the sector to the Up, Down, Left, Right? PS: you will need to be somewhere where the Above, bellow, east or west sector isnt subdivided. [url]http://dl.dropbox.com/u/18453712/Debug.zip[/url]
[QUOTE=demoTron;37361851] The movement was grid-like(move by 60px), but now it's not since it's multiplied by the time. What am i missing to make it move like before but slower like there would be a delay between movements ?[/QUOTE] If you still want grid-based movement you need to define some constant like seconds_per_square and only step the snake (and restart the timer) when the timer is greater than that value. If precision is really important, you should also take into account any remainder left on the timer after it steps. Note that if you want other stuff to be animating each frame, you'll need two timers: one for the snake movement, one for frame-by-frame movement.
[QUOTE=Richy19;37366241]I dont know what I have done but something just crashes Mono. Can someone with .Net try this out (put your mouse somewere and press W,S,A,D) and tell me if it crashes or if it subdivides the sector to the Up, Down, Left, Right? PS: you will need to be somewhere where the Above, bellow, east or west sector isnt subdivided. [url]http://dl.dropbox.com/u/18453712/Debug.zip[/url][/QUOTE] Don't know if it counts but it throws a StackOverflowException
Sorry, you need to Log In to post a reply to this thread.