Jump to content

Loosing variables


Recommended Posts

I've been working on porting a classic Game-and-watch game to the DS.

 

I'm damned close to finished but I'm noticing some wierd behaviour.

 

I have got a passthrough now and have tested the following on hardware and it works exactly as it should.

 

Using Dualis yeilds some interresting bahaviour. It appears that some of the boolean variables I am using don't seem to change from false. Two examples:

(1) When oil is missed fire should appear (I set a flag called "fire")

(2) When oil is poured over either side the character should pour (I set a flag called "pour").

 

Both of the above are ignored on Dualis but work fine on hardware.

 

The main reason I think this might be happening is that I am using up all the global memory allocated by Dualis.

 

I might be wrong though...

 

Anyway, here is the link to the binaries:

 

http://www.zapfbandit.com/downloads/Oil_Panic.zip

 

As usual a work in progress (but very close :huh: )

 

Zapf

Edited by Zapf Bandit
Link to comment
Share on other sites

I tried it on the other emus but no go. Only runs on Dualis.

 

I'm just trying to understand the problem.

 

(1) On the top screen, if the oil misses the bucket and hits the floor, are you saying that a fire should start?

 

(2) On the bottom screen, when the oil is poured from the top floor, you don't see it "pour". Is that the problem?

 

Something for Mic to ponder.

 

It looks like it will become a nice game, it's basically working already. Nice job! :huh:

Link to comment
Share on other sites

You really need to see it on hardware to see the expected behaviour.

 

I have just added sound effects which also work on the hardware (still needs a bit of fixing).

 

I have updated my ndslib to the most recent version and I am still seeing the same behaviour.

 

<a few moments later>

 

OK... I changed all my bools to uint16 and it now works correctly.

 

Mic, could you check how you are allocating memory for bools? I am pretty sure this is causing the woes...

 

For completeness I will Now include both emu versions so they can be compared...

 

http://www.zapfbandit.com/downloads/Oil_Panic_Bool_Err.zip

Link to comment
Share on other sites

Ah yes I see the differences.

 

Firstly between yesterday's and today's binaries, the score now works and has the leading zeros removed.

 

Between today's binaries, I see black fire, I see oil pouring, I see a MISS symbol appearing, I see a very upset woman covered in oil. There are a lot of consequences of 2 faulty variables.

 

The addition of sound is welcome, it will be a good test for when Dualis gains audio capabilities.

 

Now, it's up to Mic to work out a solution to the Boolean Crisis. :rolleyes:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...