Hello! Decided to build an RPG - help is appreciated!

Learn about building and using Max for Live devices.
Post Reply
COSM
Posts: 588
Joined: Wed Jan 26, 2005 7:34 am
Location: Christchurch, New Zealand
Contact:

Hello! Decided to build an RPG - help is appreciated!

Post by COSM » Sat Apr 27, 2013 10:36 am

Gidday!

I've been getting my hands dirty over the last month and have produced a handful of utilities which have really helped me get my learning curve on.

Simply making things is the best way I have found to learn, so I thought I'd take on something rather huge as a hobby/side project and see if I can build a functioning simple RPG game inside Max for Live, and if it eventuates into anything I'd love to use it in the future as a learning tool to help people learn about synthesis - but that is far off!

I'm at the stage where I need to start figuring out what approach I take in building the basic functions of the game... and I could really do with the help of the experience of the users here as I tend to get stuck sometimes, especially when it comes to simplifying things down, or figuring out the best set of objects to use.

So, phase one of this is to get any general ideas on what the best way to program the movement of a character would be - say in a 4x4 world.

So far I've set up 4x4 toggle boxes that turn on and off points in a 4x4 matrix when switched on but that was just to see if I could.

I am wondering what the best object or path I should look into to make this happen.

At the moment the matrixctrl seems like the obvious choice - I need to figure out a way that when an arrow key is pressed (easily enough done) the matrix is scanned to find which co-ordinate has a 1 value, and then depending on up down left or right input, sets the relative co-ordinate to a 1 and sets the old one to 0.

So no barriers, no walls, just simple moving a dot around a 4x4 grid.

Any ideas? And of course if you think I am taking the wrong approach at this initial stage, speak up! I am totally new to this and almost everything has been self taught so there's giant gaping holes when it comes to myself knowing all the objects.

Hopefully this sounds like something fun and different that people can express ideas on.

Cheers

Tom
Image

neuromodulator
Posts: 85
Joined: Mon Dec 07, 2009 6:05 am

Re: Hello! Decided to build an RPG - help is appreciated!

Post by neuromodulator » Sat Apr 27, 2013 6:36 pm

I'm relieved to see this isn't about rocket-propelled grenades.

[art]
Posts: 373
Joined: Mon Sep 04, 2006 3:29 am
Contact:

Re: Hello! Decided to build an RPG - help is appreciated!

Post by [art] » Sat Apr 27, 2013 11:16 pm

Zelda plugin for Live?

:)

LOFA
Posts: 3365
Joined: Mon Jan 10, 2005 7:10 pm

Re: Hello! Decided to build an RPG - help is appreciated!

Post by LOFA » Sun Apr 28, 2013 3:47 pm

Hi Cosm,

I don't have maxforlive or live installed on any available computer atm, but I think I might have made a crude workaround for what you are describing in an early practice patch I made when it was first released:

http://dl.dropbox.com/u/3579622/floatin ... atrix.amxd

If it was a maxpatch I would open it up and verify on this machine. If I have misremembered :oops:

I'm not allowing myself to install live on any of my current machines until I wrap up a project with processing/pbox2d, but I couldn't resist haunting the forums for a minute and your game idea stood out :)

lo.key
Posts: 360
Joined: Tue Dec 22, 2009 7:05 pm

Re: Hello! Decided to build an RPG - help is appreciated!

Post by lo.key » Mon Apr 29, 2013 6:10 pm

ive been thinking lately how awesome it would be to do a roguelike game using the push. text display for the events, with the actual dungeon displayed on the grid. arrow keys for movement, etc :] seems perfect :]

greaterthanzero
Posts: 104
Joined: Tue Apr 09, 2013 5:48 pm

Re: Hello! Decided to build an RPG - help is appreciated!

Post by greaterthanzero » Mon Apr 29, 2013 6:45 pm

Hey, Tom. Here's some simple character navigation based on your description. (just paste it into your patch)

<pre><code>
----------begin_max5_patcher----------
1815.3oc6bs0iahCF84jeEVnUZakRqvlaI8s8o8uvtppZjCwShaACBLyLcq5
+80W.BPfDRZfgoBUMjYrA7wmuK9xwM+X4BisQuPRM.eB7YvhE+X4hEphjErH
+uWXDhewO.mptMCF44nse0XktJN4Etp3XPBIkv+6D5th5hx3ADN+6wD862v.
7k7pdLhwSo+mpBH5il4EGi49Gnr8OjP745GB4.EUCbrcje3YJuhDWKeUrrPJ
SzNJzgNVnt0UkByKU.MITEv+Cq8Lp.EFNTAEi+JghCLphFRRNWjSFhGfFPdh
jjRiXUd4KLvwwUJdQkGQxfeMR8hbWUVDkoKBVVTB4IZwyaVVJNQvIbAgjknA
4KqcMzU9ykEM9QBSwPpKt1pOrWWgtDV28AQ9eirqZiXDESXTVrzDx3XdCLXr
i7HNKf+P6ls50+H1mz4C2JQuvXuvqIhIAQsmTVbQy8Y.T4AHudryntCFNtkG
NUzOxR2hSjb51.RE2Cg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BmRxK
nxFdosTOmUzo5Fj8T2YyzPfg9QG5PsAjNbMmLRLTLyAcedPzXvE9pqwPe2td
ITmHaibug7zAw8cy5smLPVFH1OHaNYvrSe0KydB4LC6KlslNX17MHls5KlQS
KLC6KlmF5R5N1z7rDeSHI99mg3Hid2k3CMKw2rDeyR7MKw2rDeyR7MKw2rDe
yR7MKw2rDeyR7MKw2rDeyR7MKw2rDeyR78ajDeu8Te5MnDeu8zQ0cVQjYkm9
MRgu2fJo9VTw5w+jALKw23JwWV3VRRmJ4IWP7pFyl75++smCTsOMNW36AFX4
KJQzW4jjGzxpTgFae+FpspjMmQvuIGAU7EkyXRPd2YBpcQhSDnf.PqAnM.KS
fEra0hW03mawQyTwiVl15u2Ltf7wNsRVNmRVVViBY8Mx2ujG1oeb6zDxUs0T
NaZtWestZuFrjcKrj48kkDY34h7rcwH0C1ZKpZs1avsbG35ST0EOKAnMuFcl
7bn28Ni2qRmIONc8cty37Z1YruycFqaoyDhESM5EedR4wZwOJHKjoaETWcx.
ZpJgh5yic1JGOjp5XUdtLjaxMRkCQp1d4ygy3QkYh5l37TOJBp0aTeDVTebu
G1KI5458+pzLrJMqZ45aDil0aNi4bt+zUj3UcBvc8ccQ8a5jYHe5riOwKn23
YSewCbTvy59vOH3E3mP5t3Hwfe4FobEUcz6foi9Z0+.AUhsJFOvI+ONhf6VW
y0sGcsF1igjpQN8.OJPONldjUewy3vOtn9XuFuPUTeBUa.5AEOd8EOii+ibR
3.qKk5vYz3GEdPWBOViKdfWBOdiKdtXp9wKenkYOvi0sZuzybnwgBVBkFGF3
FGD3SODvcc.fEsyOW9+vouxlP
-----------end_max5_patcher-----------
</code></pre>


This may or may not be the right approach at all. (does it make more sense to move your character within the world, or to offset the world around your character? maybe a combination of the two...)

greaterthanzero
Posts: 104
Joined: Tue Apr 09, 2013 5:48 pm

Re: Hello! Decided to build an RPG - help is appreciated!

Post by greaterthanzero » Mon Apr 29, 2013 6:54 pm

Okay, fine. That was clearing the grid and drawing the character in at whatever coordinates, which is slower than it should be, and the approach you described was actually better than my approach. It seemed clever at the time.

Replace the "reset grid" subpatch with this:

<pre><code>
----------begin_max5_patcher----------
948.3oc0X1saaBCEG+ZxSgkUuLaBCgD1taWsGhppJC3P7FwFYaZ61Te2mwFH
FJjQVWhXJpjlywe7me9b.6yuV4AS3uPjPvmA2C7790JOOioZCdM+1CdD+RZA
VZZFjQdlm7M3ZqKE4EkwbIPPjD0WEzrVe7JUAQo9QIwN9PH3gFW64Lkj9SiC
TvG8aLWhUoGnr7GEjTksSAQHsaPzln5u14WeMPesanXUGoL87XTWvIi1Y2XE
0XUKsZopk+Gh2AcjBCezHE3WDTbAzUMDQCKZfgtCzBxSDgjxYNCtGDWV5X1y
oK0D7aby.sccmIJyZB0YRPdh11e+NqXglIJMPpDVQ9R7Vn04qqZm7S.aSTbM
iPexfpsaLesI1AY5U37Bd52IYtSDjWRXTVY8xHSgUCzALirGWUndb7kt992i
SIS14QgsGLWG4vY0hnWOqM2Nc2CPlnf5qmtYLsfgKGoyR88QkLAKp4ZRAwID
QG5x4E8c0sTpy.vL5QrhnnVwF32MnzikBJS0ahHLrdLNHSE7hhdCk0ySi3IS
uZmRdlloNXFKWTpaNsrcI.1wnLZNQp5aSgyk8szKk1MLzM0tm8Ao3o7iG0w.
sCXu7bcTHCvYfzJgP2FPJonvsgSDdLQ1MBYSn2DXWWeS58aSwQtSlHOoO6da
xuqGmG.fBFp5AwksNec0p1+Y8Uim62CJqy94Ux2KQC2ZYX3Mmn9KDhJn44Dg
CP4bQFkoylkqApCDFPp3BRWHLmQj.8C5IuCpGXen6VC7CCucTO91A8iDoDmS
FE52g.2E.Pt9l90++E.Nx84D1sDfhOGdClDjnwA41kAH8A9WMHtamSPpkn+i
gXzsCh81G5fm..JzeRNOGWa+KAyxe+AlHaF+lsWVdeelFNNSCWRY3W6fy.+q
WFdvhH3rD+cv0LI2FPF6jie93wKFi69zsiiFYdVTY1I9CyAI1SBED0dcZj3e
oHIdiqFa2bhYS4KNXDit1vH5V.CqNfyYgOLHbt2rnKd6Wauja1SGZsfxl5LZ
l6iZ+iSAIuRj1tf2rwEP+aI84GU062s47i2eRpCZ3AZVV+iLaOkor9Lq1pCL
qkrKUxgyTxKGEG7+GjilojCVLJt9MKyRxgKpH4fYn3nEkhQyTwnEghimajrI
9Ygn4MWhl+WDY.dXkaIggR7SjrG0Sg9sgOhUJAMoRYemia0reuks8OWV3KnV
liJhyL4SMo4E7DbQS86656HkLc0IHZt17J5g0xuFVCpg+f52+1Z2OUc60yyq
q98h0rhO
-----------end_max5_patcher-----------
</code></pre>

(which will actually turn the character off in one cel and on again in the next)

COSM
Posts: 588
Joined: Wed Jan 26, 2005 7:34 am
Location: Christchurch, New Zealand
Contact:

Re: Hello! Decided to build an RPG - help is appreciated!

Post by COSM » Tue Apr 30, 2013 6:15 am

Fantastic! I've been trying for two days to build this and couldn't quite do it! Thanks a lot I'm going to have fun with this
Image

Post Reply