Jump to content

SoulofDeity

Member
  • Posts

    437
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by SoulofDeity

  1. Now thats awesome! I'm definately downloading the demo!
  2. So this is a homebrew game? That's beast
  3. yeah, I've been using C for so long, I got used to the syntax. I did make a fixed version after writing that (which I tested), but when I went to post it my internet cut out and I didn't feel like doing it a second time. Basically, just use a separate variable for speed and if h == 0, set pol to -v*90, otherwise do the cartesian to polar conversion.
  4. That's what it seemed like to me as well. After reading the first 5 lines, I was almost certain it was complete bologna code meant to confuse you. But as I read down, it seemed more like he was trying to do something, but was blaming the language for his code being illegible. There are many ways to optimize your code (generally, for any language). Some examples: Instead of checking keypresses repeatedly, store them to variables and use the variables to access them. This is much faster. If you need to swap 2 variables (eg. make A=B and B=A), instead of creating a temporary variable to swap them, do an XOR swap. (A = A XOR B; B = B XOR A; A = A XOR B ) This is much faster. When writing a controller for moving an object that can move in any direction (0-360 degrees) with the arrow keys, convert the key values to cartesian coordinates, and then into polar. This will yield a direction between 0-360 in which can then be used to move the object with some simple trigonometry (x += cos(direction * pi / 180); y -= sin(direction * pi / 180)). The pi / 180 is used to convert degrees to radians. This method is faster, cuts down on code size tremendously, and is fairly useful in 3d graphics as well (such as when you want to move something with respect to the camera angle) When comparing a single variable with several values, switch / case is your best friend. It produces smaller and faster code, and is much easier to read. When writing large files, make it a habit to make a lot of comments throughout the file explaining what is going on. It doesn't matter if your project is planned to be open source or not, those comments will help you pick up where you left off when you decide to take a break, which increases the likelihood that you will actually finish the project.
  5. Sorry about being an ass about it. To me, when you posted your code the first time and asked if anybody understood it, it seemed like you were insulting the GML language for your script being illegible.
  6. What bothered me wasn't your code, it was that you were blaming GM for it being illegible. That's wiping your ass with bread and making a sandwich, then complaining that it tastes terrible because the bread wasn't baked properly. btw, repeatedly checking for keypresses will make your game slow. Store them to a variable and check those.
  7. I updated my post with more things that were rather pointless in the script. If he wanted to move the player with direction, this would've worked fine. h = -2*keyboard_check(vk_left)+2*keyboard_check(vk_right); v = -2*keyboard_check(vk_up)+2*keyboard_check(vk_down); h += !h; pol = -(180*(h<0)-(arctan(v/h)*180/pi)); x += speed * cos((direction+pol) * pi / 180); y -= speed * sin((direction+pol) * pi / 180); That little snippet right there would move the player up, down, left, and right based on the player direction. EDIT: For people trying to figure out whats going on in my code: The first line sets h to -2 if the left key is being pressed or 2 if the right key is being pressed The second line set v to -2 if the up key is being pressed or 2 if the down key is being pressed The third line sets h to 1 if it's 0 The fourth line converts h,v from cartesian to polar coordinates The sixth line is simple trigonometry to move the x coordinate in a direction The seventh line is simple trigonometry to move the y coordinate in a direction
  8. Absolutely nothing. Just some shit you threw together to confuse people. Either that, or you're a terrible coder. if not keyboard_check(vk_up)&& not keyboard_check(vk_right) && not keyboard_check(vk_down)&& not keyboard_check(vk_left) { vspeed = 0 hspeed = 0 global.animated=false} if keyboard_check(vk_left)&& keyboard_check(vk_right) The last line right there is completely insignificant, it would never be reached because you already made sure that none of the arrow keys are being pressed. Aside from that, it's obvious that this script controls an object with manual collision detection, and uses the built-in direction, hspeed (horizontal speed), and vspeed (vertical speed) variables to move the object. And btw, there's more than 1 pointless thing in there. You're if / thens are contradictory You're calling external scripts to move the player where a simple addition or subtraction would be fine. (even if you're moving relative to the player direction, a simple x += speed * cos(direction*pi/180); y-= speed * sin(direction*pi/180); would suffice) You're apparently only letting all the objects in the game be animated if the player is moving (which makes no sense) You don't need to use manual collision detection, a simple drag and drop of the 'bounce off' or 'move to contact point' buttons would suffice. If there's extra whitespace between the player and the object, just edit the collision masks.
  9. Ah, I didn't notice there was a free package, I just saw the $50, $90, and $500 ones. And I had no idea they partnered up with Steam. I've been using cracked 8.1 for quite some time. Idk, I stopped watching the community after GM6 when they redesigned the entire website.
  10. umm..wrong Game Maker dude. We're talking about the Yoyo games one, not the Steam one (btw, do you really consider $50 "easy to get"?)
  11. Obviously you don't know what hexidecimal is. It's not something new, it's just a different way to write numbers. In hexadecimal, 0-F = 0-15. For example, in hexadecimal, 05 is still 5, 0A is 10, and 10 is 16 (because F = 15). eg. How to count to 20 in hexadecimal: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 As for asm, you'll need to learn MIPS R4000 assembly, here's the users manual But I can tell you right now, most people don't move on to assembly until after years of programming experience, and it'll probably be to much for you to handle. From there, you can just enable the debugging tools in PJ64 and dump the memory to assembly, or you can use other tools like Galatea on the actor / code files themselves.
  12. Hails yes. There are some things that are tricky though, like collision on a platform game (mainly because the slanted hills lead to laggy collision). What I do is set the player's collision mask to circular, set the objects for the slanted platforms to NOT solid, and manually add or subtract from the player's y position when they're moving on it. This allows the player to smoothly run up and down hills. For gravity, you can just use the 'move to contact point' button with direction 270 and set the speed to whatever you want gravity to be. Then you don't have to worry about turning on and off the gravity when the player makes contact with the ground (if you don't, the player with bounce off and fly off the screen). The only thing about using my method for platform games is that you have to set the collision to ALL OBJECTS instead of ONLY SOLID, otherwise you'll fly through your diagonal platforms, which also means if you want background details like grass or trees you'll have to use tilesets.
  13. Mybad. Still, my point's the same. You can't directly translate a GS code to a rom offset.
  14. Thanks Btw, I just finished adding a good 20 download links for patches in the SoD's Mods topic, and am about to upload my Minty Fresh retextures. You should join
  15. I finally got my forums set up at http://z13.invisionfree.com/Kami_No_Tamashi The site is focussed on gaming, modding, and software development for various platforms. All of my projects will be hosted there, including the Storm game engine, Soul operating system, SoD's Mods, and the new homebrew Zelda game I'm working one. I'm also working on the homepage http://kaminotamashi.co.nf which is powered by AJAX for instant page loading and minimal bandwidth. Anyway, if you're a fan of my work, wanna share some programs you've created, talk about some games, or borrow my brain, feel free to join.
  16. You're assuming the entire rom is loaded consecutively at 0x80000000, which is not the case. The roms can be either 24MB or 48 MB, plus most of them are compressed, and the n64 only has 32MB of ram. So, the rom is divided into files who's logical addresses (where they are loaded at in RAM) are the sometimes the same. eg. 0xABCD could be in 4 or 5 different files.
  17. um..no it's not. Hell, it was flexible enough for me to make a virtual desktop, F3DZEX & Wavefront Obj viewers, a F3DZEX->Wavefront Obj converter, and a utility to detect the (inner) data types of files from Zelda TP and open the with the correct software. Using the timeline tool, you can use it to create sprite animations, you can host your games online with the yoyogames plugin, networked games are a piece of cake to set up, and the first thing I do when I'm showing any of my friends how easy it is to use is how to make a game in 5 minutes without writing a single line of code. You just don't know how to use it properly. That said, I don't use it to make games anymore, I've moved on to 3D dev. so I use Unity. Though I still use it for it's powerful and simple to use image editor (which is why all of my images are named sprite0 if you look at their url's)
  18. Honestly, I've always hated matrices. Some stuff just takes a ridiculous amount of effort to do, eg. determinants and cofactors...ugh...But still, they make maneuvering in 3d a breeze.
  19. Aight, HC's source was getting really messy and hard to work with, so today I've been rewriting the engine from scratch and making some serious improvements. Changes To The Scene Hierarchy: New item type called mesh. Meshes contain vertex groups and are parented by objects. For the sake of simplicity, objects now contain their animations instead of them being in a separate resource tree Changes To The Class Structure:A new class type has been added for matrices that makes use of overloaded operators, custom indexing properties, and a fairly powerful library of functions allowing you manipulate matrices as a 3d transforms (translation, rotation, and scale). All scene objects (cameras, lamps, waterboxes, objects, etc.) now use matrices to store their transforms. The texture class has been replaced by the material class. Texture data is no longer stored after being loaded into OpenGL, materials are planned to have support for masks, bump/normal/specular maps, and they keep track of important information such as horizontal and vertical velocity. All classes have been separated into header and source files. People viewing the HC source tree should have no trouble finding what they're looking for. A new namespace has been added called HC_Math On a final note, I've decided that I don't plan to ever port Hylian Cartographer from .NET to another library such as the GTK. Every time I've tried to do so, I always get set back further and run into problems. Contributors can either do it themselves or people can just use WINE to emulate it (its been tested, it works). ;======================================= EDIT: Just to show that I'm not blowing false updates out my ass, here's the source to the CMatrix class I've been working on all day: Matrix.h Matrix.c It's not 100% complete yet, I still have to write the functions for retrieving the cofactor and inverse matrix then port the 3d transformation matrix functions from the Storm game engine; but even now it's a rather powerful library. Below is the usage. Initializers: CMatrix(void) - Creates an empty matrix CMatrix(rows, columns) - Creates a matrix of Rows*Columns in size (contains all 0's by default) CMatrix(list of lists of floats) - Creates a matrix using a list of lists of floats for the data CMatrix(matrix) - Creates a matrix that is a duplicate of the input Sizing:AddRows(number) - Appends number of rows to the matrix InsertRows(position, number) - Inserts number of rows at position in matrix RemoveRows(number) - Removes number of rows from the end of the matrix RemoveRows(position, number) - Removes number of rows at position from the matrix AddColumns(number) - Appends number of columns to the matrix InsertColumns(position, number) - Inserts number of columns at position in matrix RemoveColumns(number) - Removes number of columns from the end of the matrix RemoveColumns(position, number) - Removes number of columns at position from the matrix Operators:Matrix + value Matrix + list of lists of floats Matrix + matrix Matrix += value Matrix += list of lists of floats Matrix += matrix Matrix - value Matrix - list of lists of floats Matrix - matrix Matrix -= value Matrix -= list of lists of floats Matrix -= matrix Matrix * value Matrix * list of lists of floats (uses real matrix multiplication) Matrix * matrix (uses real matrix multiplication) Matrix *= value Matrix *= list of lists of floats (uses real matrix multiplication) Matrix *= matrix (uses real matrix multiplication) Matrix / value Matrix /= value Matrix Manipulation:Zero - fills the matrix with 0's Identity - turns the matrix into an identity matrix Transpose - returns the transpose of the matrix as a new matrix DeterminantN - gets the determinant of an N-sized matrix (used by Determinant, don't use this) Determinant - gets the determinant of the matrix Normalize - returns the normalized matrix as a new matrix An example use: HC_Math::CMatrix ^matrix = gcnew HC_Math::CMatrix(3, 3) // Create a 3x3 matrix matrix[0][0] = 1; matrix[0][1] = 4; matrix[0][2] = 7; // Row 1 - {1, 4, 7} matrix[1][0] = 4; matrix[1][1] = 5; matrix[1][2] = 8; // Row 2 - {4, 5, 8} matrix[2][0] = 3; matrix[2][1] = 6; matrix[2][2] = 9; // Row 3 - {3, 6, 9} double det = matrix->Determinate(); // det = determinant of the matrix (12) HC_Math::CMatrix ^nm = matrix->Normalize(); // nm = normalized matrix HC_Math::CMatrix ^tp = matrix->Transpose(); // tp = transpose matrix matrix *= matrix + matrix - matrix * 2; // matrix = matrix * (itself * 2) (extra math thrown in for the sake of example)
  20. Nice I was actually ripping them because I was thinking about creating a Zelda game engine. Probably not gonna happen.
  21. Sup people. I was ripping special effects from the game for an idea I had, and wanted to make a note of something for people who want to do texture mods. Sometimes, you might not be able to find the textures for certain effects using Rice's plugin (such as the fire effect). This is because rather than having a texture for each frame or just animating it, they are actually using 2 textures. The background texture has all the detail and its offsets are animated to make it move. The foreground texture is used as a mask for a particular shape. For example, the textures for the fire animation are: If you decrement the left texture's y-offset by 8 each frame and use the right texture as a mask, you get the full effect: The color of the flame is set using an F3DZEX drawing instruction like FA (set primitive color). Another example where this effect is used is in the title. Using this knowledge, you can modify the burning effect of the title to your own logos. For example, here's the full mask for the original logo. It's comprised of 9 64x64 textures: Here's my logo: So, I make a 192x192 mask: Then, I cut my mask into 64x64 tiles, use my utilities to convert the old mask rips to raw I4 data, find them in the rom, and replace them with my new mask. The result: Before: After: I also posted a video of this mod on my youtube channel.
  22. Here, I'll post pics and vids of my mods. I've done more, I just don't keep records of them all.Beta Jumpslash and frontfllip for the debug rom Unfinished play-as wolfos for the debug rom Custom map for debug rom, dubbed "the grotto" Iron Knuckle Axe ported over Megaton Hammer for 1.0 (U) Beta Jumpslash and always flip when jumping for MM (U) Twilight Realm from TP ported over Room 117 in debug rom I've already decided that my next mod will be an actor mod, though I'm not entirely sure what it'll be yet.
  23. Just so everyone knows, there'll probably be a lack of updates on Hylian Cartographer the next few days because I'm porting it to the Storm game engine. (a game engine I wrote that I eventually plan on selling). It'll be a step backwards for development, but the engine is faster, cross platform, less buggy, and far more flexible.
  24. Now this is cool. It makes me wanna try to play the game blindfolded
×
×
  • Create New...

Important Information

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