Legends of Rathnor [WIP]
Re: Brandons Adventure [WIP]
Ive also noticed that the frame rate is low when your not moving, drops to like 12 or so but when moving is when i get decent frame rates
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Brandons Adventure [WIP]
I tried it, and it works fine.
I am on Windows 8, x64, for what it's worth.
It's a bit buggy, though, but looks good. Maybe i'll send some pull requests on Github next.
Keep up the good work.
I am on Windows 8, x64, for what it's worth.
It's a bit buggy, though, but looks good. Maybe i'll send some pull requests on Github next.
Keep up the good work.
Re: Brandons Adventure [WIP]
It's not a bit buggy its a lot buggy. Im still not use to lua, and most the code was slapped together very quickly to try and make the lpc deadline.
Right now im trying to clean up/comment all the code, there are area's that need complete re-writes, and alot of the games systems need implemented.
I am very open to comments on how I coded things and would love the input on how to make it better.
Right now im trying to clean up/comment all the code, there are area's that need complete re-writes, and alot of the games systems need implemented.
I am very open to comments on how I coded things and would love the input on how to make it better.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Brandons Adventure [WIP]
Nice job setting everything up! I see you're using tiled, but the game is lagging way more than it should be.
Here you can see I'm getting like 13fps. Perhaps it's because you're not limiting the draw range?
On luascripts/Map.lua:80 it seems like you have some code, but then there's a lot of commented out stuff. Are you sure you have it set up right?
Also, you'll notice that the map doesn't center on the character, and if you keep moving in one direction, you can walk off the map.
Here you can see I'm getting like 13fps. Perhaps it's because you're not limiting the draw range?
On luascripts/Map.lua:80 it seems like you have some code, but then there's a lot of commented out stuff. Are you sure you have it set up right?
Also, you'll notice that the map doesn't center on the character, and if you keep moving in one direction, you can walk off the map.
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Brandons Adventure [WIP]
It should only be rendering just outside the bounds of the screen, i tested by making it only render a smaller portion in the center of the screen and my frame rates are about the same (70+ while moving and 13-17 when standing still). I still dont know why the better frame rate while moving. My tiled map is has a lot of layers (about 20) and a lot of tilesheets (about 20 as well) and im assuming thats what keeping my frame rate down. I did notice that the enemies are still rendering out side the camera bounds, so that needs to be fixed as well.
The player will move out of the camera view, after going in the building and going back out, thats something that still needs fixed.
EDIT: I tried the map out using zoetrope and I only got 13-16fps and that was with using one large tilesheet 1024x1024 compared to the 20 smaller ones. I also tried using gamera and had similar results, but im not sure i had it set up 100% correctly. I think its not so much the size the map but that it has 20 layers, and even with limeting the draw area its still a whole lot of tiles that need rendered.
The player will move out of the camera view, after going in the building and going back out, thats something that still needs fixed.
EDIT: I tried the map out using zoetrope and I only got 13-16fps and that was with using one large tilesheet 1024x1024 compared to the 20 smaller ones. I also tried using gamera and had similar results, but im not sure i had it set up 100% correctly. I think its not so much the size the map but that it has 20 layers, and even with limeting the draw area its still a whole lot of tiles that need rendered.
Re: Legend of Rathnor [WIP]
The game name has been changed, and there is a massive increase on the framerate.
In the works
Redo of the camera code
Pathfinding
NPC AI
Data Storage
Using Tiled fully for easy placement of NPC's (quest, items, dialog, ect...)
A Character generation screen
A working inventory
In the works
Redo of the camera code
Pathfinding
NPC AI
Data Storage
Using Tiled fully for easy placement of NPC's (quest, items, dialog, ect...)
A Character generation screen
A working inventory
- SneakySnake
- Citizen
- Posts: 94
- Joined: Fri May 31, 2013 2:01 pm
- Contact:
Re: Legend of Rathnor [WIP]
I use LuaJit, and got the same error the others are talking about, so I did a bit of debugging.
The problem lies in the variadic functions. arg does not actually hold the arguments, rather the command line arguments. Why?
I don't know if there are more, the game seems to work fine now.
The problem lies in the variadic functions. arg does not actually hold the arguments, rather the command line arguments. Why?
Here is a patch that fixes the two problematic uses of arg.http://luajit.org/faq.html wrote: Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?
Q: My vararg functions fail after switching to LuaJIT!
LuaJIT is compatible to the Lua 5.1 language standard. It doesn't support the implicit arg parameter for old-style vararg functions from Lua 5.0.
Please convert your code to the Lua 5.1 vararg syntax.
Code: Select all
diff --git a/main.lua b/main.lua
index 92caf10..ea890f0 100644
--- a/main.lua
+++ b/main.lua
@@ -43,6 +43,7 @@ function Game:removeEnemys()
end
function Game:registerMap(...)
+ local arg = {...}
for k,map in ipairs(arg) do table.insert(Game.mapList,map) end
end
diff --git a/scripts/Enemy.lua b/scripts/Enemy.lua
index fe7c33f..7afe576 100644
--- a/scripts/Enemy.lua
+++ b/scripts/Enemy.lua
@@ -18,6 +18,7 @@ end
function Enemy:registerEnemy(mapId , ... )
self.container[mapId]= {}
+ local arg = {...}
for k,enemy in ipairs(arg) do
table.insert(self.container[mapId],enemy)
enemy:setLocation(enemy:getTileX(),enemy:getTileY(),enemy:getFacing())
Re: Legend of Rathnor [WIP]
Thanks for the fix ill get that in as soon as i can.
Re: Legend of Rathnor [WIP]
Hey, just tried your latest version from github and there's still sometimes a huge framerate drop when changing moving direction, I've opened an issue for that:
https://github.com/jasonisop/lpc_game/issues/6
https://github.com/jasonisop/lpc_game/issues/6
experimental art since 13.75 gigayears
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
Re: Legend of Rathnor [WIP]
Added SneakySnake's changes.
Working on the camera code now, I think thats where the most bugs in the game are.
Working on the camera code now, I think thats where the most bugs in the game are.
Who is online
Users browsing this forum: No registered users and 8 guests