(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-01-24 09:26 AM
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
Posted on 02-11-06 03:07 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-11-06 10:44 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-12-06 03:32 AM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-13-06 02:41 AM, in Low-Power Random Numbers Link
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
Posted on 02-13-06 01:04 PM, in Low-Power Random Numbers Link
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
Posted on 02-13-06 01:40 PM, in C# editor problems.. Link
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
Posted on 02-13-06 01:57 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-13-06 05:47 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-13-06 07:05 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-13-06 10:04 PM, in Low-Power Random Numbers Link
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
Dim Shared N(0) As Byte, BigN As Long
Dim Shared CurN As Long 'Sliding Variable


'Generate the next number in the sequence
Public Function rndGenRand() As Byte
Dim NexN As Long, PreN As Long, Ret As Byte

'Obtain the previous and next buffered values
PreN = CurN - 1: If PreN = 0 Then PreN = BigN
NexN = CurN + 1: If NexN > BigN Then NexN = 1

'Calculate the new value
N(CurN) = N(PreN) XOr N(NexN)

'Increment sliding variable
Ret = N(CurN): CurN = CurN + 1
If CurN > BigN Then CurN = 1

'Return the value
rndGenRand = Ret
End Function


'Initialize the number generator
Public Sub rndInit(HistCount As Long)
Dim Q As Integer

'Redimension array with new value
BigN = HistCount
ReDim N(1 To BigN) As Byte

'Initialize the array
N(1) = &HFF
For I = 2 To BigN - 1
N(I) = Q: Q = Q + 37
If Q > 255 Then Q = Q - 255
Next

'Set up sliding variable
CurN = BigN

'Run a few startup mixing cycles
For I = 1 To 50: rndGenRand: Next
End Sub
And, of course, run rndInit before calling any rndGenRand's. I've found that calling rndInit passing a parameter of 100 works just fine.
Guy Perfect









Since: 11-18-05

Last post: 6314 days
Last view: 6313 days
Posted on 02-13-06 11:37 PM, in Low-Power Random Numbers Link
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
Posted on 02-14-06 12:34 AM, in Low-Power Random Numbers Link
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
Posted on 02-14-06 02:20 AM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-14-06 03:16 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-14-06 07:54 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-15-06 11:02 AM, in .NET Bitmap Problems Link
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
Posted on 02-15-06 11:13 AM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-15-06 12:55 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-15-06 05:21 PM, in General Super Mario 64 hacking / TT64 Progress thread Link
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
Posted on 02-15-06 05:50 PM, in Math -- Finding the angle of a line Link
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 expressed in radians.

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
Public Function AngleToPoint(Horz As Double, Vert As Double) As Double
Dim Temp As Double

If Horz = 0 Then 'Undefined slope
If Vert > 0 Then Temp = Pi / 2
If Vert = 0 Then Temp = 0
If Vert < 0 Then Temp = Pi * 1.5
Else 'Defined slope
Temp = Atn(Vert / Horz)
If Horz < 0 Then Temp = Temp + Pi
If Temp < 0 Then Temp = Temp + 2 * Pi
End If

'Return the value
AngleToPoint = Temp
End Function
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


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.048 seconds; used 443.89 kB (max 567.23 kB)