Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
Acmlm's Board - I3 Archive - - Posts by Guy Perfect |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
User | Post | ||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Monky Hair 64. Fine. That's the name of the editor.
Can we keep it on-topic, now? |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
3D objects are usually loaded into display lists before any decoding is conducted in the first place. This means that no matter what is used for any given level, the 3D data is already there for it and ready to use. Simplistic 3D things like general N64 use a series of display lists interconnected with a modular skeleton, such that each display list represents a static "piece" of the whole where the model needs not generate new polygons each frame; even when it moves.
That's the approach I took for the F-Zero X editor. The track itself is generated into a display list once and displayed. Every kind of object that can possibly be used in a level is loaded into display lists before any levels are even decoded. Then, the entire level to be used is decoded into RAM. All variables, values, references, etc. The whole thing. Then it's all just a matter of drawing the display lists with the correct modelview matrix values (that's a GL thing) to build the final scene. Here's an example to help demonstrate exactly what I'm trying to say: (edited by BGNG on 02-11-06 09:54 PM) |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Well, in comparison... Loading 184 textures, 169 of which come from decoding MIO0 files, vertically mirroring 8 of them, loading a course, course names, course descriptions, course horizons, course musics, decoding course data, generating the 63 display lists of Mute City 3 with segments no longer than a quarter unit (for roughly 160 units)--times 8 for geometry splines, displaying 25 display lists (after generating 14 of them) and sticking in the venue floor all amounts to about a third of a second on my computer for F-Zero X. Most of that's textures. Switching between courses (new splines/display lists are generated each time) is nearly instantaneous.
I'd say that the #1 reason your editor is slow is because of file access. It's well worth your while to look into options to improve this performance. Load all of the needed file data into RAM once if necessary. At least that way you won't have to fetch from hard disk each time a map is loaded. |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
I'm looking for a random number generator. For the longest time, I've been researching what makes a good one. What is good from the programmer's perspective is something that eventually generates all values for a given data size and generates them evenly (diversity), and the rate at which it repeats itself is as low as posible (period). To top it all off, I'm looking for a method that uses as little CPU time as possible.
What I've found is a very fast method, but of course uses more memory than most pseudorandom algorithms. The idea is v[a] = v[a-1] XOR v[a-n], where n is some arbitrary value. This requires a history buffer n+1 records long, which means RAM usage. Just set up a sliding variable for c that cycles through the entire history buffer from start to finish, then loops to start, and you get the algorithm v[c] = v[c-1] XOR v[c+1], assuming c-1 and c+1 will wrap around the bounds of the buffer (1 simle If statement each). I've tested this algorithm with a history of 5000 8-bit values initialized with a fixed-seed pseudorandom built into the OS (so it'd be the same each execution) (the first value is initialized to 255 to ensure all bits are active), and I can verify that its diversity is good; all values generated are roughly equal in occurence. And because of how it's set up, you can extend the period to max out at some 3.232e+616 for 8-bit values alone just by changing the length of the history buffer. My question, though: Does anyone else know of any faster, simpler, or better algorithms that provide good randomness with little processing? |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
I know there has been unlimited research conducted on this stuff, but I honestly can't tell why this method may be considered inapproperiate. I ran a test overnight that counted up all combinations of 8 bits that occurred (even the distribution was sufficiently random) and used the generated numbers to draw colored pixels to locations on the screen. Even watching the initial speckle of incoming pixels was adequately random from a human perspective.
Are there perhaps any inherant flaws or problems with generating numbers this way for random use? From what I can observe, it's sufficiently adequate and the simplicity of implementation and speed of processing serve only as additional perks. |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
As a rule of thumb as far as optimization is concerned, speed quality is inversely proportional to memory usage quality. You can either use little memory and make it slower, or make it really fast and use more memory.
Computers have migs and megs of memories (as Strong Bad put it), so don't be afraid to go for the high speed, high memory (sounds directly proportional if you put it that way) route. Your users will thank you. |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
You might want to consider writing your drafts for posts in a text editor and saving often. (-:
I have no problems with a nag screen. I'll be setting up a donation fund myself for Heian-794's N64DD and software, so you won't be alone in that regard. Do what makes it work best, despite any cosmetic set-backs. Solutions will be provided over time. |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
It's not a "please donate" box; it's a "please register the component that you used to make this program" box. VL-Tone would rather have no pop-up at all if that was a viable option. | |||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
VL-Tone is running Mac OS X, HyperHacker. I'm pretty sure Notepad is nowhere to be found. | |||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Well, the laws of physics prevent true randomness and the properties of any random number generator will eventually repeat a sequence in its entirety indefinitely given an infinite number of iterations. I was just asking if there's any kwirks that this particular method has.
Anyhow, I've FreeBASIC'd together a generator to use this method. It can be translated into other languages fairly easily: 'Variables used by the functions |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Fortunately, my primary application for randomization is games. This little, fast method works wonders for level generation and AI. | |||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Erm... Was that directed to me? I'm referring to the code I posted, not some OS generator. | |||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
What I've found to be effective is to do a first draft all the way through. Even if you keep learning new things along the way. Once you create a "tentative final," you can use everything of what you know and build a new one for scratch. I've ended up doing that twice already with F-Zero X.
Get what you feel would be sufficient editor put together, then take a step back and design something from scratch that utilizes everything you've learned. That way, you can devise a fully-functional software architecture for the project that operates smoothly with its various components and release something in good stature. |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
I'd hate to burst your bubble, VL-Tone, but that fish is in the game. Check the beginning of Dire, Dire Docks.
|
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
For any given game, there's ubdoubtedly an unmeasurably high number of beta prototypes that were used for testing. It's highly unlikely that Super Mario 64 had only one of these in its lifetime. To say "the beta version" is somewhat indescriptive.
But I'm not aware of any such prototypes making it out of testing land. Anyone else have any insights to this subject? |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
You can upload images as attachments to this forum. New feature. And OGG files, which I think is durn awexome.
Post a screenie of your problem. Actually seeing graphical anomalies is far more effective than looking at code and assuming a problem exists. |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
I've OGGified the video to make it smaller and a little more cross-platform. If you can't play OGG, whoever you are, then you need a better computer. (-:
EDIT: Well, it looks like the world-renouned mastermind behind Acmlm's Board's uploading script (that'd be Xkeeper, for those of you who like sending angry PMs) seems to be unable to realize that 1KB is too small for even text files, so the capacity for uploads is a wee bit insufficient for my 794KB OGG video. Anyone have a meg of uploading space that they can stash this up on such that I don't have to subscribe to any sites? (edited by BGNG on 02-15-06 10:15 AM) |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Works for me. Here ya go:
http://www.badongo.com/file.php?file=Super+Mario+64+beta+video__2006-02-15_mario64.ogg |
|||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
Rapidshare has that little "you can only download so much an hour unless you pay us" and You Send It has a 25 download maximum. I wanted to avoid such issues. | |||
Guy Perfect Since: 11-18-05 Last post: 6314 days Last view: 6313 days |
| ||
In retrospect, you can use the angle and velocity of a vector to project a point in cartesian space. Just use Sin * Vel for Y and Cos * Vel for X.
For detecting the angle to a point, I think I can improve on MoN's method a bit. This is majoratively cosmetics and a few logical messings with. It's also written in BASIC, which many people wouldn't consider an improvement. Specifically, I wouldn't use modulus to return the value. It may work in C, but memory is telling me that you'll get an integer value doing that. BASIC's automaticity might be giving me false knowledge, however. And of course, in languages that support it, I recommend returning the value the instant it's finalized instead of proceeding through the remainder of the unnecessary conditional statements. "Return 0" as opposed to "Temp = 0" This function takes two parameters, which are referred to as the "horizontal" and "vertical" points, depending on the perspective. It works for X and Y, but it also serves well in 3D applications. It uses the built-in trigonometric functions for speed purposes, which means that it returns an angle exp Pi is assumed to be defined, but if it isn't, you can calculate it with 4 * Tan-1(1). That'd be atan() in C. 'Calculates the angle to a point |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Acmlm's Board - I3 Archive - - Posts by Guy Perfect |