RPG engine

@Joe - That was worked out here: https://forums.coronalabs.com/topic/73159-dialog-box-print-one-word-at-a-time-until-the-whole-conversation-is-shown/#entry385095

Hi egruttner,

I implemented joystick today as you mentioned.

Here is a video link to the current state of things : https://screencast-o-matic.com/watch/cFil3mFA8d

However there is a pretty big bug here. I need to let go of touch everytime before I can touch any other direction in joypad.

Move the joypad to the right and without letting go of touch, move the joypad in any other direction -> character still keeps moving to right.

The issue is shown in the end of the video. Do you have any suggestions on how this can be fixed?

I implemented joypad today, feels good.

Thanks

Please Note: SSK2 is now free. 

Docs: https://roaminggamer.github.io/RGDocs/pages/SSK2/

GitHub: https://github.com/roaminggamer/SSK2

See the ‘Easy Inputs’ docs for how to use the joystick: https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/easy_inputs/

and/or 

Look at this code for a basic usage example: https://raw.githubusercontent.com/roaminggamer/SSK2/master/validation/tests/easyInputs/003_oneStick.lua

Hi Everyone,

I have implemented joystick on my rpg game, it took some time but here is the current state of things:

https://screencast-o-matic.com/watch/cFiojCFkhQ

Thanks to roaminggamer, idurniat, egruttner for suggesting me to implement joystick. Joystick had some major bugs, which I solved last night. Wanted to share a video. Thanks everyone, having a good time here in this forum.

Great work Ahmed!

Sorry for taking too long to answer…I was on a trip.

How did you solved the “joystick issue”? Can you share your solution?

Best regards,

Erich.

Hi Erich,

By joystick issue, I meant the integration of the joystick code with the game code, which I took care of.

Please let me know if you do want to look into the integration.

Enjoy your trip…

Nice work Ahmed, please keep us posted as you progress

Thanks for the encouragement. 

In the first level I am interested to implement rain, not sure how, but looking into resources

great work so far!

Thanks brady for your kind words :slight_smile:

@ahmed_shahjada  for rain effects try Radiance @anaqim’s particle generator in the Corona marketplace.  He even has a rain demo somewhere with both rain falling from the sky and drops hitting the ground.

Rain is pretty easy, to be honest. Just create a displayGroup with about a hundred instances of the same image - a sort of white blurred streak on a transparent background. Give each of these images their own speed variable on creation, with some randomisation, just by adding a table entry for that sprite (for example: displayGroup.numChildren(i).speed = basespeed + math.random(10) )

Then move every image by their “speed” variable amount each frame, and when out of bounds (i.e. when their .y position is too high) reset their position by subtracting a value (like 1000 pixels).

Then you can rotate the displayGroup if you want to, for the angle of the rain.

Oh well. I was bored. Here you go: :slight_smile:

-------------- -- main.lua -- -------------- local rainGroup = display.newGroup() rainGroup.x = 320 rainGroup.y = 480 rainGroup.rotation = 30 local numberOfRainDrops = 100 local widthOfRainGroup = 400 local heightOfRainGroup = 400 local baseSpeed = 10 local maxSpeedVariation = 15 for i = 1, numberOfRainDrops do local rainDropImage = display.newRect(0,0,2,20) rainDropImage.x = -widthOfRainGroup/2+math.random(widthOfRainGroup) rainDropImage.y = -heightOfRainGroup/2+math.random(heightOfRainGroup) rainDropImage.speed = baseSpeed + math.random(maxSpeedVariation) rainDropImage.alpha = 0.5 + math.random(50)/100 rainGroup:insert(rainDropImage) end -- for loop local moveRainDrops = function(event) for i = 1, rainGroup.numChildren do rainGroup[i].y = rainGroup[i].y + rainGroup[i].speed if rainGroup[i].y \> heightOfRainGroup/2 then rainGroup[i].y = rainGroup[i].y - heightOfRainGroup end end end -- moveRainDrops Runtime:addEventListener("enterFrame", moveRainDrops)

@thomas6  Ha, I love it!  It might match this project well too.  Check out an @anaqim’s tutorial on Radiance rain as well, it’s well worth a look - supercool!

Wow the rain effect looks supercool! Thanks guys.

I am finding this forum a source of abundance of knowledge

I wish we could have an active chat room with an admin

@ahmed_shahjada There’s a Slack channel.

One or your fellow RPG developers also uses IRC, too.

Kudos.  Looking great.

Thanks. Was wondering what I can do to improve it.

Not bad:) 

My suggestions:

  • Character move too fast for me,
  • Use various ground. Now it is monotony,
  • Avoid empty space.

Good luck Ahmed.

ldurniat

Hi Idurniat,

Thanks for your feedback.

  • This is just a small demo including basic functionalities, I have not done any tweaking

  • How can I use various grounds to reduce monotony, I am not an expert in pixel art, but is there any good tutorial for level design?

  • What do you mean by avoiding empty space?

Thanks for your feedback, appreciate your answer :slight_smile: