Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 09 Sep 2012
Offline Last Active Jun 23 2014 01:07 PM

#4987868 Creating a Lua RPG rough timing?

Posted by on 07 October 2012 - 11:07 PM

Anyone have a rough idea of how much could be accomplished on average in 6 months, assuming something like 15 hours work a week?

Simple 2D games require as much as ~40 hours of programming (without any fancy stuff). So, you could assume, that after ~3 weeks you'll have a playable tech-demo of your zelda-style RPG (simple map of the starting location, moving your character and NPCs, maybe transitions between locations or a simple inventory management). If you'll be programming for several months you could have much more time to polish it's gameplay. My advice: go for it, do not be afraid ;)

Edit for the minusing one:

Haps, I do have examples of the fast (about 40 hours) game prototyping, like ones from http://www.ludumdare.com/ and http://www.pyweek.org/ and what about you? Care to backup your minus? ;)

#4987728 How to manage input from more than one potential source?

Posted by on 07 October 2012 - 12:12 PM

So say I bound 'key_w', 'key_up', as well as 'mouse_2' to the action 'forward'.

So now if I press either of those keys, or the right mouse button, the 'forward' action will happen, meaning, the player will run 'forward'.

So now say I press all three, this works fine, because they all do the same function. But what happens when I let go of the right mouse button? In code, it would send through a 'mouse_2' event with the data 'false', which should cause the player to stop moving forward, unfortunately, both key_w, and key_up, are still down...

Is there any way to tackle something like this?

Hey :) I myself usually do this:

I have an array of "actions" associated with keys, like "run forward", "jump", etc. And I do have several "keysets" which are bound to same "actions".
Something like:

"Jump": ['space', 'button 1'] // "action": [set_1, set_2]
"Run": ['shift', 'button 9'] // "another action": [set_1, set_2]

So, when I press any button, from any input, my engine sends an "action" event, associated with this button. And with the event I also send the index of the "set", which activated this event. For example, if I press "space" on my keyboard it sends something like: (action: "jump", keyset: 1) and when I press "button 1" on my gamepad, it sends the same "action-event", but with different keyset index (2 in this case). And now my InputManager can figure out which key was pressed and if I will press down "shift" AND "button 9", and release "shift" after that, InputManager would know, that the released button was from another set and will not switch off the current "action".

#4986329 Should I give up?

Posted by on 03 October 2012 - 03:55 AM

I have tried LOVE and I like it, but I want to stick with Perl.

My favorite language is python, but I had to drop it in favor of Love2D/lua, because of python's bothersome packaging of a game project into a single executable file for different platforms. In order to keep going I had to choose another tool. So, you have a choice in this situation: stick with perl and get delayed (maybe for a long time without any progress) or change your programming tool to a more appropriate one and keep going on. A language/compiler/whatever is just a tool for a programmer. Have you ever seen any worker, who says something like: "You see, I'm used to my screwdriver, so I'm not going to use this hammer"? Just my 2 cents Posted Image

#4986118 I want to be an indie game developer, where do I start?

Posted by on 02 October 2012 - 11:54 AM

If you are into 2D then my advice is to use lua-based LÖVE framework, it's just awesome for a rapid game prototyping. Lua is a simple language, so it would be easy to take a quick grasp of it. And there are many good open-source game projects written in Love2D. It's also cross-platform so you can release your games for Windows, Linux and Mac easily.

#4986097 Mmorpg in Visual Basic?

Posted by on 02 October 2012 - 10:57 AM

Duh... yet another MMO thread. Just make some breakout or tetris game from scratch. Make an installer of it for different platforms and see how much hard work it takes to make such a simple game. After that: forget about MMO.

#4978217 Augmented Reality example in Python

Posted by on 09 September 2012 - 03:03 AM


two years ago, when I was experimenting with python and pygame, I've stumbled upon pygame's camera module and decided to write some kind of a simple augmented reality application (like Microsoft's Kinect, but much simplier) to have some programming practice. After a few dedicated days, I've finally completed it. AR example targets an object with a marker and allows you to interact with virtual objects: bouncing balls, button-like interface elements, etc. Here is a screenshot:

Posted Image

You can run it under Linux and Windows (not sure about OSX) out of the box. It requires python 2.5.x-2.7.x and pygame 1.9.x.

AR example for Window and Linux: https://bitbucket.or...ample-0.3.1.zip
Just install python and pygame (windows users don't need pygame, I've included pygame into the package), unpack ar-example-0.3.1.zip into some folder and click on "augmented.py" to run the program.

ActivePython 2.7 for Windows: http://downloads.act...5-win32-x86.msi

  • Take an object of a simple shape and solid color.
  • Fixate an object's color in a color picker.
  • Change the chosen color's RGB components so only the targeted object would be visible on screen.
  • After you are ready, switch from the calibration to the targeting mode.
  • If the result is not good enough, switch back to the calibration mode and repeat the above steps.

Program's source code is under GPL 2. VideoCapture by Markus Gritsch is under LGPL 2.1.

P.S. A couple of days ago I've decided to write a new version of AR example using proper techniques such as: modular design, event-driven architecture with loosely-coupled components, multithreading, separate config file, etc. New source code is under public domain.

If you are interested, you can get AR example's source code from my project's page at pygame.org: http://pygame.org/pr...mple-1622-.html
Or you can grab it directly from my mercurial repository at bitbucket: https://bitbucket.org/slmgc/ar-example

P.P.S. Any feedback, questions, suggestions are most welcomed.