As most of you may not know, I am in production of a game called Demonic Roots. I've made the basic engine and am proceeding in actual production of the game. However, recent problems have brought into question a certain swimming method I have.
Ok, pretend this ~ and this - are water, and this | is the player...
~~~~~~~~~~~~~~~~~
--------------|----------------
-------------------------------
-------------------------------
The way my current method of swimming works is when the player presses the left or right key...
~~~~~~~~~~~~~~~~~
--------------\----------------
-------------------------------
-------------------------------
The player object tilts.
When they press up...
~~~~~~~~~~~~~~~~~
-------------------------------
-------------------\-----------
-------------------------------
The player object goes forward in the direction he is tilted towards.
Now this is all fine and good, but I recently have made a certain object which transports the player to the next room through contact. I noticed that 75% of the time, the player would not go into the next room, and I had to go back and forth until it worked.
This was a mystery to me why this happened until I happened to be screwing about in de-bug mode. I asked the program to record the player's x and y values, and found that when in the water, the x would go from, say 475 to 476.98330923587.
In short, the player was a fraction of a pixel off the regular grid, thus causing collision problems.
Knowing this would frusterate players during gameplay, and the fact that the current method of swimming already has problems, I have begun considering a new way to interact in water...
~~~~~~~~~~~~~~
-----------|--------------
--------------------------
--------------------------
Instead of tilting...
~~~~~~~~~~~~~~
--------------------------
------------|-------------
--------------------------
~~~~~~~~~~~~~~
--------------------------
--------------------------
-------------|------------
...Why not just decrease the gravity? That way, I won't have already existing problems with the current swimming method AND those object's will work!
Only thing stopping me, however, is that quite a few objects are only activated when in the water, and I'm afraid the new way might cause other, internal problems. I don't know what to do, SO...
YOU decide!
Should I keep with the tilting method, besides the quirks, or should I invest time into the new low-gravity method and take the risks?
Ok, pretend this ~ and this - are water, and this | is the player...
~~~~~~~~~~~~~~~~~
--------------|----------------
-------------------------------
-------------------------------
The way my current method of swimming works is when the player presses the left or right key...
~~~~~~~~~~~~~~~~~
--------------\----------------
-------------------------------
-------------------------------
The player object tilts.
When they press up...
~~~~~~~~~~~~~~~~~
-------------------------------
-------------------\-----------
-------------------------------
The player object goes forward in the direction he is tilted towards.
Now this is all fine and good, but I recently have made a certain object which transports the player to the next room through contact. I noticed that 75% of the time, the player would not go into the next room, and I had to go back and forth until it worked.
This was a mystery to me why this happened until I happened to be screwing about in de-bug mode. I asked the program to record the player's x and y values, and found that when in the water, the x would go from, say 475 to 476.98330923587.
In short, the player was a fraction of a pixel off the regular grid, thus causing collision problems.
Knowing this would frusterate players during gameplay, and the fact that the current method of swimming already has problems, I have begun considering a new way to interact in water...
~~~~~~~~~~~~~~
-----------|--------------
--------------------------
--------------------------
Instead of tilting...
~~~~~~~~~~~~~~
--------------------------
------------|-------------
--------------------------
~~~~~~~~~~~~~~
--------------------------
--------------------------
-------------|------------
...Why not just decrease the gravity? That way, I won't have already existing problems with the current swimming method AND those object's will work!
Only thing stopping me, however, is that quite a few objects are only activated when in the water, and I'm afraid the new way might cause other, internal problems. I don't know what to do, SO...
YOU decide!
Should I keep with the tilting method, besides the quirks, or should I invest time into the new low-gravity method and take the risks?