Tile Map Game Engine [v1.2 WIP]

Cralant - Custom level - from Windows
Play48 players liked this.Log in to like this level.

An overdue update, have been busy recently so I have not had much time to create but here is what I have been working on.
Added mob support with AI, they will currently go straight to the player, I have not added collision detection yet thats why they are ghosts, because they can travel through walls lol.
Added item support, all item values are kept in an array making it easy to add and remove them, currently have no images for the items but all the coding is there.
Made the walking animation better, you can walk diagonal now, the movement speed is the same for each directions. Before diagonal was marginally faster.
Fireballs added, you can shoot 10 fireballs at a time, if they go off screen then they are deleted.
The fireball now leaves the tip of the staff no matter the direction faced, this looks way more realistic then previous tests.
Changed the wall sprite to a non 3D one. Also cut down the mage sprite a bunch.
I have added a changeable zoom, you are able to zoom in and out until you get to zoom 12.
Atempted to improve player wall collision, works a little better but still needs fixing.
Optimized most of the code because I am already half way (32,840 chars...) to the script character cap and I haven't even finished the sprites. May have to consider adding another luascript object to draw some the tiles.

What should be coming soon is collision support for mobs, detecting fireballs, detecting walls etc.
Sprites for the items as well as a simple inventory system.
Better wall collision and support for other world tiles.
Add optimization for only drawing mobs and items that are currently on screen, like with the walls tiles.
Will also change the spriting system to support more of a game engine system. The aim of this project is to quickly make RPG style games using this as a base level and creating your own map and sprites.
I will also attempt dialogue but that may be far off.

As always comment with ideas and suggestions, sorry for any typos or if this description doesn't make sense. I typed it quickly to get this online as soon as possible.
I will not be allowing derivatives for the time being. The code is fairly complicated and most people will not understand any of it.
If you are interested in a part of code or want to provide assistance message me on the forums and I can send you a excerpt. I have tried to keep my script neat and clean as possible but you still need to have a fair knowledge of lua before overlooking it.
Plus let me know how laggy the level is, so far its smooth on my end.

##Original Description##

My work in progress on the tiled game engine.
The idea is to have everything you need to make a tiled lua game, on one lua script object and with one rc controller.
Eventually adding synthesizer support.

Currently supports:
-Different map sizes
-A variety of different tiles (Didn't have time to design more for example)
-Ability to place map tiles following a map array (Easy to customize or make new map)
-Moving animated character
-Wall Collision (Needs better implementation, sometimes gets caught)

Soon to be updates:
-Projectiles (Working on a fireball from the staff)
-Enemies (Next update probably won’t have AI, but it will come eventually)
-Better wall collision
-Add more tiles for floor, etc.
-Add item support
-Joystick support for mobile (current control scheme favors PC players, will add option to choose)

Distant Future updates:
-Sound (Make use of the synthesizers)
-AI path finding
-Mission/Quests
-Inventory

Hopefully this project doesn't lag too much, it seems to run fine of my computer and nexus 5. Comment any ideas or if you want to help.
Credits to the tile makers online, I searched for free game resources and edited the sprites to my liking.
Credits to zard0z for the idea and being a great guy with helping me implement some of his ideas.

Views: 5280 Downloads: 1631 Unique objects: 8 Total objects: 9

Discuss this level

Log in to comment on this level.
  • Aceheliflyer: @zardOz: :D
  • zardOz2: @Aceheliflyer: sure but even so it wouldnt be in the next update so you had better learn to love the synth;)
  • Aceheliflyer: @zardOz: many it will be added some time soon... well later... you know what I mean... right?
  • zardOz2: @Aceheliflyer: as far as I know it is not possible
  • Aceheliflyer: @zardOz: one question... is it possible to import sounds or no? (I guess no)
  • zardOz2: @Aceheliflyer: its a birds eye view dungeon game thing, similar to my spooky dungeon except he used imported images for the walls and creatures... not finished, you can walk aroud a bit and shoot fireballs
  • Aceheliflyer: @Cralant: What is it? I can't exactly play this level do the platform I'm on...
  • incrazyboyy: Add collusion!
  • FirePhenixFire: Can you allow derivatives :D
  • Demon666: does the same thing on my galaxy note 2 the fog just isn't wide enough
  • Ridget: Game on game, wow simply amazing ;)
  • The_Blacksmith_: VERY impressive graphics! LIKE
  • Cralant: @Demon666: huh well my phone is that exact res and my PC moniter is 2560*1440 which is 16/9. Strange because I have no issues with the map drawing. I'll work on something anyway.
  • Demon666: if I stay still then I dot notice it that much but if I move fast to avoid those ghost enemy things then I see it redrawing lol
  • Demon666: 16/9 1920x1080 lol
  • Cralant: @zardOz: yeah I agree, but I think in 1.5 sprites will show up in the screenshots so I don't want to waste time developing pixel art right now. That's also pretty much what I am using +-15 for the sides and +-8 for the top and bottom. It seems to be working okay I just need to try it with a floor sprite.
    @Demon666: huh strange what is your resolution and aspect ratio? It works fine for my phone and PC, I will try get it working for all aspect ratios in a future update. I just need to add black sprites to each side of the fog effect and it should be OK.
  • Demon666: nice but id suggest expanding the area that the map is drawn at. because i can still see the map being drawn on the edges and it looks strange lol
  • zardOz2: This requires a better screenshot!
    for i=-11,11 do
    This:draw_sprite(i+math.floor(posX),i+math.floor(posY),0,.95,.95,0,0,0,0)end.... this is the code for my repeating floor tiles code from spooky dungeon, it will only draw +/-11 tiles from the "hero" position. And .95 size allows the space background through to make the cracks.
  • AzoteX: Unlisted but i can see it
  • spaceship1880: @Cralant: oh ok
  • Cralant: @spaceship1880: I unlisted it so I could work in it between my PC and my phone and not post tons of updates. Update should be uploaded within 24 hours.
  • spaceship1880: Unlisted lol
  • that guy2: Joystick would be simple just rc and sincos and binary snap
  • Cralant: @rilesrowe: My update scheme is something like this although I have exams coming up in the next few days so updates will be far between for a short while.
    @principia fan: derivatives will be allowed as soon as I get a sort of RPG style game running. I don't want people to work on there own version only to have it not work because I modified some code later.
  • rilesrowe: You might want to add loot first, then ammo, then fix the walls, then add randomization, then fix that, then add monsters, add loot drops from monsters, add NPCs, and you can add characters, ablities, then to top it off, saves, but this is just an idea in order. FYI.
  • x32g: Sorry, didnt read description.
  • x32g: You should use a joystick instead of the arrow controls,
  • principia fan: @Cralant could you PLEASE allow for editing. I just want to see the code.
  • Cralant: @x32g: @JOELwindows7: @sjoerd1999: @anarki2004: thanks guys!
    @pajlada: thanks pajlada, OK thanks. I was attempting to implement some sort of projectile but needed to work out how to constantly add movement to the projectiles.
    @zardOz: yeah I have noticed that, not sure on what I will change, the walls or the character. It was mainly just a test for a slightly angled top down view. In the next version I will make all the sprites the same angle.
  • anarki20043: This is looking pretty awesome. I would like to see where this is going - keep up the good work. No noticeable jitter on my PC, just FYI.
  • pajlada: Looking really nice. Code looks clean too :)
    As a heads up, game:poll_events() will be deprecated in 1.5, due to a change in the event system.
  • sjoerd19992: Awesome!! :D
  • JOELwindows7: Awesome RPG concept!
  • x32g: This is amazing.
  • zardOz2: @Cralant: can you make the walls a bit shorter? I think it will look a bit less weird... the character is not viewed at the same angle as the walls
  • zardOz2: @Cralant: yeah Im missing something on setting multiple texels patterns in first run
  • Cralant: @zardOz: no all texels are set in the first run. The wall sprite drawing just works off a function that searches an array, if the value is 1 then draw a wall there. The character animation just changes the bx,by,tx,ty when drawing a sprite.
  • Demon666: nice!
  • zardOz2: @Cralant: are you setting the texel grids each bit? That's a huge draw.
  • Cralant: @zardOz: hah probably we'll just hope that I can get most of it finished before I reach it. The lines are just a simple placeholder for a floor tile system, I'm not sure why the jitter slightly when moving left or right its strange. Also it could be perceived lag, the movement looks laggy even on my PC but when I had no lua objects moving they were not laggy at all.
    Otherwise I'm not sure on how to make this run better, I'm already hiding all objects off screen, perhaps I could just make the screen smaller or reduce the amount of texels in the wall sprite because that probably makes the most difference.
  • zardOz2: Wow, you're really going for broke! I get the feeling you're gonna hit the character cap of 65,000 long before all of that is implimented lol. Looks great but slow for me and the floor lines dont move so good. Good luck I hope you can pull it off.

LEVEL ID: 6131