Spooky Dungeon RPG v4.1.1!

zardOz2 - Custom level - from Windows
Play80 players liked this.Log in to like this level.

v4.1.1: transitioning to coding lua on PC,
*fixed some graphics issues for PC I couldnt see on my phone
*Added text hud buttons and Z-info button

!!!New Features for v4.0!!!
*v4.1: Animated Torch Pillars, Fixed fireball not passing over water and fireball assing through wall if moving forward.
*4-direction Fireball spell and graphics
*Speed boost spell and graphics
*4-direction animated sword attack!
*Fireball vs walls collision code
*Mana/regen system with mana bar
*Hit points/regen system with Hp bar
*Deadly lava pit! (For something to test the HP with...)
*Next update... a monster that isnt completely inept!
*Pending: Doors, Barrels, gold, exp, hp/mana potions. New floor layout..

Pre 4.0 Features:
*Repeating floor tile system, only draws tiles within 7 of the player.
*Spooky circle of darkness! (See "Anti-circle" level),
*Efficient Collision detection vs walls by table location code, and system to draw walls from same table.
*Fully animated Kain the Dragoon Knight character! It was very tedious... but very cool!

Lag free and proud to be!

Views: 8219 Downloads: 2998 Unique objects: 1 Total objects: 53

Discuss this level

Log in to comment on this level.
  • Tobot_GX7: Now that is awesome!
  • toni15538: Awesome
  • Aceheliflyer: @zardOz: oh.
  • zardOz2: @Aceheliflyer: theres sooo many things to update and lately ive lost the motivation... I need to delete some other games and focus. will try to actually make a card game this week and cross that one off the list
  • Aceheliflyer: @zardOz: any other updates to come or is that it?
  • venusnoobtrap: There is no end to the comments
  • Aceheliflyer: @zardOz: cool little update!
  • zardOz2: @Coolblocks749: biggest problem is the code isnt really designed to be added on so i have to redo much of it when improving... also its been awhile so i have to rememorize how this code works lol
  • Coolblocks749: Must be alot of coding (and ALOT of comments). Cool (not refers to my name)
  • zardOz2: @Demon666: yes someday soon
  • Demon666: needs enemies to kill lol
  • that guy2: DANG! That just HAPPENED!
  • Golden: Ok
  • Winfrid9: Woah that was fast!
  • zardOz2: ...lol and I forgot, reset timers, lockout timers, mana cost, mana requirement met?...:)
  • zardOz2: ...detect,destroy and stop at interactive (door/barrel) etc.
  • zardOz2: @Golden: For example on just the fireball spell all of these things need to be figured out... 1)pattern, detect facing, animate movement, d and etect destroy and stop at interactive, detect nearest wall, explode/stop at wall, detect is enemy hit and enemy type... then damage that enemy by resist and hp, kill or burn enemy, skill increases etc... Just for one spell!
  • zardOz2: @Golden: It is very time consuming... I have to reoraganize the code now, everything I add inccreases complexity exponentially... also Im fiddling with other stuff too I have lots of interesting things on my backlog:) ...
  • Golden: Whay about skeletons, zombies, ghost or other mobs
  • that guy2: Where have I been?
  • Ctjet: @zardOz: lol
  • zardOz2: @Ctjet: Fireball assing is no laughing matter!
  • Ctjet: @zardOz: you may want to modify your description
    v4.1: Animated Torch Pillars, Fixed fireball not passing over water and fireball assing
  • zardOz2: @FirePhenixFire: cool thanks for the reports!
  • zardOz2: @ElementalGenius98: I already have a Title... "Bikini Inspector"!
  • ElementalGenius98: @zardOz: Got a new title :D The Legend of LUA :D
  • FirePhenixFire: The fireball also has that same problem
  • FirePhenixFire: Also when the player is facing downward and you use the sword a small white line appears in the wrong place
  • FirePhenixFire: Awesome I didn't think you would end up finishing this game but ur well on the way and 0 lag :D
  • zardOz2: @pajlada: I have a sprite flashing for 4 count in the center of the screen but it's not showing. It's at the very bottom of the code.
  • zardOz2: Doh screenshot, now I have to redo it
  • Winfrid9: @zardOz: I LOVE PACMAN!!
  • zardOz2: @Winfrid9: heh ok, I have pacman ghosts I could use:)
  • Winfrid9: @zardOz: well if u only have to choose one. Choose skeletons!
  • zardOz2: @Winfrid9: might only be one type of enemy, Ill see where the lag is at after I get the attack and spell animations done
  • Winfrid9: Good work now all needs is ghosts and skeletons and stuff THUMBS UP DUUUUUDE
  • Golden: @zardOz: :D nice
  • ElementalGenius98: Leveling and looting ^_^ ♡
  • zardOz2: @Golden: sheesh, almost 350 lines of code already, but im ready to do more now.
  • Golden: First upgrade
  • zardOz2: @golden: "sprite vs walls" may help, but this has so many other things going on it would be hard to adapt
  • Golden: Cause i gonna look into the code (lua) by ***** ********* ;)
    (Words are blocked that im not let anyone know that app can help)
  • Golden: @zardOz: will that help on my flappy bird beta?
  • Aceheliflyer: Annd I loose...
  • Aceheliflyer: It reminds me of graal online clasic
  • zardOz2: @imAman: im stuck for now, there is a bug I have to wait for 1.5... see tthe desciption
  • imAman:
    Good work, but could you make the attack function work better, it just work normaly if you go to east.
  • JOELwindows7: @zardOz: so sad version. That's still fortunate 'til update off! ;)
  • zardOz2: @woodnut: @JOELwindows7: thx guys!
  • woodnut2: Very impressive coding. Floored me :)
  • zardOz2: @JOELwindows7: not a bug... Im out of space in the lua until 1.5
  • JOELwindows7: Oh man Awesome!
    Well there's a bug to Attack when not facing right (~Right) the sprite strech sparsifylhahahahahaa!ha
  • that guy2: Well look who just took up all that space for two fr- no, not even two scentences. Calling me stupid...
  • ricardito08: @that guy: :1

    Well that's stupid.
  • that guy2: @ricardito08: =1 well I just discovered new emoticons.
  • ricardito08: Nooo! Not the limit!
  • ricardito08: @Demon666: The >= 0 and >= 1 looked like faces. LOL
  • ricardito08: @zardOz: mmhmm! I'll wait.
  • zardOz2: @ricardito08: yeah I screwed up and should have made it with two corner positions I might try to redo it to make it easier... this dungeon took awile to position everything.
  • ricardito08: @zardOz: Oh ok. Adding walls is pretty hard.
  • zardOz2: @ricardito08: Not yet:) I have more I want to do... I put the fog and wall programs up if you want to play with them.
  • ricardito08: @zardOz: Derivatives?
  • zardOz2: @The_Blacksmith_: not too depressing? :)
  • The_Blacksmith_: Lol, love what it says when you find the electronics!
  • zardOz2: math.modf is an exceedingly useful command... the Int in the code below is the number of revolutions for example
  • Demon666: oh! your only paying attention to the decimal part..... duh.... i hate math.... thanks tho....
  • zardOz2: That makes any object into a gyroscope so you dont need the lua or gyro on the craft... an underused feature
  • zardOz2: @Demon666: from "Ultra if gyro-tiltmeter"... A=targetObj:get_angle()/(math.pi*2)
    if Dec<0 then
    else this:write(0,Dec) end
  • Demon666: what i dont understand how to stop it from wraping around. i just want it to output the same results as a gyroscope.
  • Demon666: no what i want this to do it i want it to display the angle of an entity. but i wont want the angle to wrap around. because if it wraps then it either goes negative or goes above 1
  • zardOz2: In most cases the angle will roll over so 1.25=.25
  • zardOz2: this:draw_sprite(0,0,(math.pi*2)*this:read(0),
    Or just input a number like .125 to turn 45 degrees. Or if you have or need the degree number... 90/360=.25
  • zardOz2: @Demon666: I may also go the zelda route, butt you know how it is I'll start something new at some point and never return
  • Demon666: im ashamed to be asking this but how to you convert get_angle() back into principia angles? (angle >= 0, angle a <= 1).
  • ricardito08: :( No escape from Lua hell. :(
  • ricardito08: @zardOz: Caught the value system!!
  • Demon666: never played them lol. those games always frustrated me. I prefer games where I can run around with a rocket launcher and blow up everyone lol.
  • zardOz2: @Demon666: ...whistles as if he never read that:) heh I'm actually leaning towards trying to do a jrpg battle system like FF/dragon warrior
  • Demon666: or traps, like spikes and fire lol. that might be easier
  • Demon666: it'll be interesting to see an AI in a future update lol.
  • zardOz2: @pajlada: fixed thanks for the report!
  • pajlada: @zardOz: Ah, alright :)
  • zardOz2: This works by scanning for all walls in the sirection you are holding it ignores all surfaces for the other three directions... one of my optimisation efforts.
  • zardOz2: Oh, I forgot the two button diagonal.. @pajlada: I reccomend not walking diagonally :)
  • pajlada: When walking diagonally, you can pass through walls to the left and right (but not up or down).
  • zardOz2: @TechZ: doh! I thought i had that solved, @FirePhenixFire: thanks Ill add it to the list lol @x32g: thx X
  • TechZ2124: Really cool update, but sometimes when I start the game it shows the "end message" just after stop falling.
  • FirePhenixFire: Nice update you should make a sprint button and a stamina bar like.
  • x32g: Also kewl ending.
  • zardOz2: @x32g: yeah without anything to do the speed makes it tolerable;)
  • x32g: I didnt know Kain was Sonic the Hedgehog :P I like the speed sliders.
  • zardOz2: @Demon666: 8 directions would require amuch larger and more annoying code:) also this is an attempt to make elements of Fanal Fantasy 3(us) so Im not planning on 8-d
  • Cralant: @Demon666: sure I can try, need to sleep now because its 2am but as soon as I wake up I can work on it for you. Just tell me what you need and I'll give it a shot.
  • Demon666: @Cralant: mind helping me with a simple object sensor? Your not horrible at math like me so it shouldn't be difficult for you.
  • Demon666: You should make the dpad work in all 8 directions. it seems so restrictive right now.
  • Cralant: if this:first_run() then
    a = {1,1,1,1}
    b = {0,0,1,1}
    c = {0,1,0,1}
    one = {a,a,a,
    two = {a,a,a,
    for x = 1, 3 do
    for y = 1, 3 do
    colour = one[x+((y-1)*3)]
    end end
    for x = 1, 3 do
    for y = 1, 3 do
    colour = two[x+((y-1)*3)]
    end end end


    This works perfect for me, I basically copied techz code but simplified certain aspects.
  • zardOz2: Oh but they have to show at the same time thats what I cant figure
  • zardOz2: No problem @Cralant: do TechZ's robot outfits.. He has the one seperate luas and he used my basic pattern code. Show me how to put two of them on one lua properly if you have some time:)
  • Cralant: @zardOz: I don't really know what to say, I have never encountered that before or anything like it. If you upload something I will be happy to debug it for you though.
  • zardOz2: Damn this keyboard lol, I dont have anything handy to show you at the moment.
  • zardOz2: If I set a texel pattern it changes all my sprites in that lua... for this character I have four patterns drawn in first run but Im calling one of the patterns doint a for for set_texel loop for one bit each time it turns.
  • Cralant: Just upload a level or post some code and I will take a look at it, that's probably the easiest way.
  • Cralant: You mean you want to only use one for x and for y loop for both texel patterns? I don't really understand what you need, are you setting the last texel image over the old one?
  • zardOz2: Lol thats "i cant draw two things in one lua without setting the texel each bit..."
  • zardOz2: ...without drawing the setting both patterns each bit
  • zardOz2: Like if I want to set two texel patterns in first run and show both, I can only get the last one I set to show... I don't know how to draw two patterns at the same time in one lua.
  • Cralant: You mean like this:

    for x = 1, 10 do
    for y = 1, 10 do
    for x = 1, 10 do
    for y = 1, 10 do

    That will set the texels of the first image to 1,1 - 10,10 and the second to 11,1 - 21,10. You just have to add to one of the coordinates until its away from the other images.
    The above code should work for my website, just call the two arrays a different name and replace imageArray and 2ndimageArray with the respective variables. Also don't forget to change the x and y max size to whatever your image res is.
    Come to think about it I may add another part to the website the writes out everything that's needed so people could just copy and paste the text and be done.
  • zardOz2: @Cralant: thanks Ill look it over... Can you make me an example of how to set two or more texels patterns in first run... something small is plenty... Im missing something and Im re-doing the entire code for this and I gotta get it right.
  • Cralant: Thought this might be of use to you zard0z, I know you edit your sprite arrays by hand like me. I modified demons script and made it user friendly. http://rgbarray.comuf.com/
  • spyninja242001: @zardOz: it's soo much batter
  • spyninja242001: @zardOz: tnx
  • zardOz2: @Alfajim: thanks! ..well it took me about 60 levels to do this much:) If you look at my "camera shaker basics" that was my starting point. And one tiny thing after another adds up to a pyramid!
  • Alfajim: Wow! Amazing. I can't even start to understand how you're doing this. I like how after escaping the dungeon I could have a walk around your electronics. :)
  • zardOz2: ..different..sigh
  • zardOz2: @The_Blacksmith_: yeah, it's just for people to play with and to show the collision working at dirrerent sizes and speeds, in actual play size/speed wont be controlable
  • The_Blacksmith_: Just so you know, if you keep moving into a wall and change size, you go through the wall.
  • zardOz2: @Blood: thanks b @spyninja242001: all set with a D-pad
  • Blood: Very good* fail message
  • Blood: I like this level. Awesome. Very
  • spyninja242001: @zardOz: tnx
  • The_Blacksmith_: @zardOz: oh. Ok then. Lol
  • zardOz2: @The_Blacksmith_: It's just my way of offending no one by offending everyone;)
  • The_Blacksmith_: By any chance, was "Thank The Gods" a reference to Battlestar Galactica? LIKE
  • zardOz2: @spyninja242001: Yep... it's even easier than that with lua;) next update Ill have it for ya.
  • spyninja242001: @zardOz: oh you can just use a RC controller and a sincos then you can round the vault to 1-0 at each of the then you can move it when you press the button do u want me to show what I ment?
  • keeghan: Thank you!
  • zardOz2: @keeghan: first try to make your RC buttons work with the lua, then start with something simple like moving the camera, the camera codes are in the object description. Then try to center the camera on an object that moves, then try moving the camera to two spots with rc buttons... and keep trying different numbers until you know each thing pretty good. Then you will be able to understand the next command a little easier, and find other peoples stuff that has the codes you want and play with those too... but find the simple codes and help codes, looking at techz endless jumper wont help much until you know more...
  • keeghan: @zardOz: Ok, I will try until I get one.
  • zardOz2: @keeghan: Well keeghan it's almost impossible for me to teach over chat... Also lots of stuff can't be done without knowing basic algebra, calculus and triginometry. I made the Lua 101 series as simple as I could, but there is no way to learn without playing with each command until you figure it out. Find a simple code and look at it, change a number and press play to see what happens and test, test, test, test....
  • keeghan: @zardOz: can you teach me how to use lua script?
  • zardOz2: @Cralant: it's actually a pretty low res giant sprite like 25*25 and only about 1/3 the width is clear so you can see the sprites underneath... Ill post it hang on
  • Cralant: @zardOz: does the circle take up the whole texel? If so how did you fit the sprites onto it.
  • zardOz2: @Cralant: I inverted(1-...) the alpha code for drawing a circle (see sdac example or "super bouncy ball" so the center would be clear and the edge dark. I made it one huge sprite with the radius small so only a small part in the middle is clear and just center on the PC and draw onn top of all else...
  • zardOz2: @spyninja242001: yep I was planning on it... but this darn wall problem had to come first:) check out "widget wizardry vol III" for my pre lua 8 direction d-pad.
  • Cralant: Ooh also, nice job! ;)
  • Cralant: Thanks Z, I worked something out but yours seems to be more optimized them mine. Also how did you manage the fog. Is it a square of black texels with the middle invisible and then filtering set to 1?
  • spyninja242001: @zardOz: it's just experimental
  • spyninja242001: @zardOz: why can u add a D- pad instead of the directional buttons but still can switch back
  • spyninja242001: @zardOz: I have an idea
  • zardOz2: @Cralant: all done, whew it was brutal! Give me a day or two and Ill clean all of the non-collision stuff out of my codes, make some notes and put it all into one lua code for you.
  • zardOz2: @Cralant: well I overlooked something major... sigh It's gonna kill me, works perfectly if no two walls are the same x or y distance... but thats unacceptable.
  • Cralant: @zardOz: nice one, I have a system in place that assigns map tiles depending on what the map array value is and I'm working on a system for item pickup and a sort of menu.
    It would be great if we could make just an engine and then we could release a series of games using the engine.
  • principia_rus: @zardOz: nice lua work :-)
  • FirePhenixFire: @zardOz: ah lol didn't read disruption
  • zardOz2: @FirePhenixFire: yep, left/right isnt working yet only up/down
  • FirePhenixFire: U can walk through some of the walls
  • zardOz2: @Andr3w246: well tthe plan is just for a generic system for maps, more a dungeon game test than anything
  • Andr3w246: @zardOz: So your making a maze?
  • zardOz2: @Andr3w246: thx, check back in a bit... Ive almost got it where I can add walls which stop the PC by adding a few numbers.
  • Andr3w246: Wow! This is really cool! Good job bro!
  • zardOz2: @Cralant: Sweet Jesus! I think I just cracked it! I gotta adapt it for the other 3 directions but I think it should work... I may havve to tweak some numbers for hallways only 1 wide tho.
  • Cralant: @zardOz: Revisited my script and I have made it work if you are inside a square of walls but the outside boundaries are not working at all :/
  • zardOz2: Yep Ive noticed that lol... I actually got it to slow down slightly at each wall!
  • Cralant: @zardOz: Yeah my script worked fine for one wall, but on multiple walls it just didn't work.
  • Demon666: @zardOz: because lua hates programmers.
  • zardOz2: @Cralant: I feel your pain... grr damn code refuses to cooperate. Why you no work code?
  • Cralant: @zardOz: Ahh thanks Z, well if you get it working then congrats because I never managed to ;)
  • zardOz2: @Cralant: the first wall was just a test, im working on an array thing now... it's proving tricky. If I decide to keep it locked Ill send you a PM on the forum with the code
  • zardOz2: @principia_rus: coming soon:) I need to learn first
  • Cralant: @zardOz: Wall works perfectly for me as well, just wondering what is your system for the wall collision. Are you saving the wall to an array of the map and checking values to test for collisions or are you just using a bunch of if commands. Because I could never seem to figure out a sprite collision detection as accurate as yours while I was working on a platformer. Great job anyway, this project is becoming one of my favorites :D
  • principia_rus: please add a labirinte
  • zardOz2: @jasnsathome: ok great thx!
  • jasnsathome: @zardOz I mean 9 squares
  • jasnsathome: @zardOz I see a grey wall if i move north just a little. its 8 squares long
  • zardOz2: Could someone with a PC check this level for me and tell me if the wall above the player is visible at load in?
  • JOELwindows7: @zardOz: Ok, that's great, if he was resurrected from Forever Alone 'LMAO!'. oh yeah, have request: switch character. character from non-commercial (Recomemnded) or may it demadant over that if you dare (only if you are affiliated by Bill Gates lol!).
  • zardOz2: @pajlada: ok i loaded in three new multiselect luas, the floor grid being last with the highest ID.. the tiles were on top even after restarting. I deleted the new character lua and loaded another and the problem corrected.
  • zardOz2: @Demon666: not toooo long, but I wont be doing it often lol. Need to make sure you cant see the wall to the north at first load in.
  • Demon666: @zardOz: lol that must have taken a while.
  • zardOz2: @Demon666: no converter, I mapped it by hand first lol
  • spyninja242001: Cool
  • Demon666: that Sprite must have taken a while to make by hand lmao. or did you just set a converter?
  • zardOz2: Dang, I think I gotta come up with a new system to draw the floor, thiis aint gonna work for a closed size area.
  • zardOz2: @JOELwindows7: yeah I dont want anybody ussing Kain until im done:)thx @TechZ: @FirePhenixFire: thx guys!
  • zardOz2: @pajlada: well, Im not sure exactly lol, the fog spritte had failed and I could not get it to show so I deleted the lua and copy/pasted a new one. The other major difference is now all of the character pattern texels are being set after first run.
  • pajlada: @zardOz: How did you manage to fix the initial sprite? :D
    Perhaps it's something we can put down in the documentation, if it was the order of function calls that was the issue or something.
  • JOELwindows7: Ohman. RPG, you made it in Commercially unit instead that free. Awesome concept!
  • TechZ2124: Nice sprites and cool effect ;)
  • FirePhenixFire: Nice character animation :D
  • zardOz2: All fixed.. @Winfrid9: thanks its Kain from Final Fantasy 3(us)
  • Winfrid9: Awesome character!!!
  • zardOz2: Man it's always something... fixing the initial sprite
  • zardOz2: Yeah Im pretty good at breaking things;) no problem
  • pajlada: @zardOz: Seems the bug wasn't fully fixed in 1.5 either :) Will take a look. Thanks!
  • zardOz2: @pajlada: ok done
  • pajlada: @zardOz: If you publish the update I can go through your Luascript objects and take a quick look
  • zardOz2: @pajlada: that doesnt seem to work for me... Ill try a few more things
  • zardOz2: @pajlada: great thanks!
  • pajlada: @zardOz: Inside "if this:first_run() then" in all your Lua Script-objects, place this line:
    NOTE: must be placed before any other draw-functions are called
  • pajlada: @zardOz: It's the same issue as with the colors not being correct on the first run, it has been corrected in 1.5. It can be circumvented if I recall correctly. I'll post a reply soon.
  • Demon666: @FirePhenixFire: awesome.... i ain't crazy :]
  • zardOz2: @pajlada: thx, any idea why the first first run wont assign the three draw z values correctly for us?
  • pajlada: Looking forward to an updated spooky dungeon! Very nice so far :)
  • FirePhenixFire: @Demon666: I can faintly see it
  • Demon666: works fine on my tablet...... thats strange..... maybe my phone is retarded lol.....
  • Demon666: @zardOz: lol I'm sure that I'm fine. *dies* jp.... I'm try it on my tablet and see if I get the same weird effect lol.
  • FirePhenixFire: @Demon666: just
    but it still looks better that what I could make :D
  • zardOz2: @Demon666: you may be having a stroke;)
  • Demon666: @FirePhenixFire: you don't see faint pink and green rings? look closely.
  • Demon666: it covered it after I restarted I didn't know exactly was being drawn wrong.
  • FirePhenixFire: @Demon666: how I don't?
  • Demon666: it does look alot better now. the shading looks weird tho lol. I see green and purple in the colors.
  • zardOz2: Hahaha
  • zardOz2: @Demon666: well the fog is supposed to cover the edges... does it not for you?
  • Demon666: oh now I see what you meant about the restart lmao.
  • zardOz2: @Demon666: yeah, thats what Im trying to mimic.. @FirePhenixFire: ahh good thanks for the the report
  • Demon666: since you made a square of sprites it doesn't look to good on a wide screen device lol.
  • FirePhenixFire: Ah I see I didn't restart looks mutch better now :D
  • Demon666: that screen resolution function in 1.5 would be useful here lol.
  • FirePhenixFire: Nice moves smoothly up and down but not side to side
  • zardOz2: @Demon666: well I do lol
  • Demon666: I didn't have to restart it to draw properly.
  • zardOz2: Requires 1 restart to draw properly :(

LEVEL ID: 6035