![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on RPG Demo V6 within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Everything has been completely rewritten. The Overworld uses tile based maps. Also the battle system has been rewritten to use ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() |
Everything has been completely rewritten. The Overworld uses tile based maps. Also the battle system has been rewritten to use table based systems as well.
Can another dev peer review my code. I'm not happy with it. http://www.sendspace.com/file/0ly5ha [Release] http://xteaphn.blogspot.com/2009/07/rpg-demo-v6.html Last edited by Xteaph-N; 07-13-2009 at 08:57 PM.. |
|
|
|
|
|
#2 |
![]() |
not too shabby! throw an extra tile out there for land to show off the tile system, like mountains or something. The battle system needs some limiters though. play with some input delay timers to get a good feel so it doesnt feel like the menu system is fritzing or moving to slow when you press a button. Good progress in a good direction. Keep it up!
|
|
|
|
|
|
#3 |
![]() |
well you repeat code everywhere..
stuff like Code:
if Counter[2].num == 6 then.... Code:
if Counter[2].num >= 6 and Counter[2].num <= 26 and Counter[2].num % 4 == 0 then
TileX = TileX - 4;
end
also you have lots of global variables. basically every variable in your game is global (bad). You should (imo) place all game state vars inside a table which is global (and the only global variable) so its super easy to serialse for save/load and make every other variable local. Lua's power comes from tables and that its functional, if you want to step up in using lua's power, start using anonymous functions or passing functions around. The state system could easily be replaced with functions as state rather than if statements. eg: Code:
if Player[setPlayer].turn == "Option" then Code:
Player[setPlayer].turn() Code:
Player[setPlayer].turn = "Attack_Choose"; Code:
Player[setPlayer].turn = state_Attack_Choose once you grok anonymous functions and passing functions around, things really start to open up.
__________________
-- Code Monkey : Sarien, Fishguts, Cracks and Crevices -- "Did IQ's just drop sharply while I was away?" (Ripley) |
|
|
|
|
|
#4 |
![]() |
@_df_
Thanks! I was upset that I was uselessly iterating my code, so this is going to help me a lot. Especially the thing about anonymous functions and function passing. I have a feeling that will help the most! But I'm not entirely sure how I would use them in my code per se. @Miclowgunman Thanks for the words of encouragement. Last edited by Xteaph-N; 07-15-2009 at 01:11 AM.. |
|
|
|
![]() |
| Tags |
| demo , rpg |
| Thread Tools | |
|
|