Comments (5)
how are you patching the game? I'm able to play it through just fine, and I can't see a way orientation or snap_to could become invalid in such a way that it'd crash like this.
also, don't hack the game, just don't get hit :P
from ludum-dare-37.
Pretty trivially:
diff --git a/src/scenes/play.lua b/src/scenes/play.lua
index b9d74bb..ef9b6c7 100644
--- a/src/scenes/play.lua
+++ b/src/scenes/play.lua
@@ -326,7 +326,7 @@ function scene:enter()
self.player.animation:play("fall")
self.player.anim_cooldown = self.player.animation:length("fall")
self.player.iframes = self.player.anim_cooldown * 2
- self.player.health = math.max(self.player.health - love.math.random(2800, 3200), 0)
+ self.player.health = math.max(self.player.health - love.math.random(0*2800, 0*3200), 0)
local audio = load.sound("assets/sfx/player_attack_hit.wav")
audio:setVolume(_G.PREFERENCES.sfx_volume)
I seriously doubt it's related to my hack. Unless the boss' behaviour changes with player's health, that is.
from ludum-dare-37.
I still can't repro, but that hack definitely has nothing to do with it.
from ludum-dare-37.
I've tried to reproduce it again and I was unable. But here's a data point. I'm displaying the ctypes of orientation
and snap_to
. They both come up as ctype<struct 167>
every time. The error complains about struct 162
, though, and the affected line has w in the last place, and it doesn't complain about x, y, or z. That makes me think that one of the passed values is a vector rather than a quaternion.
Edit: I've printed the typeof of player.position (which I assume is a vector) and it's indeed 162.
Now the question is, how can that happen? Is it possible that in certain degenerate cases the result is a vector instead of a quaternion? (e.g. the player immediately below the monster)
from ludum-dare-37.
That would be the only possibility, if a quaternion is being turned into a vec3. But the question is, where? The only time quat should be converting to a vec3 is when converting orientation to a direction. So that means in some obscure case, I am probably using direction instead of orientation and using the lovnform way of writing the code (quat.whatever(entity.direction, whatever2)
instead of entity.direction:whatever(whatever2)`)
from ludum-dare-37.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ludum-dare-37.