Community Project : Monkey Touch

Monkey Forums/Monkey Programming/Community Project : Monkey Touch

Paul - Taiphoz(Posted 2012) [#1]
First of all, I would like to Thank Raz, for this idea, unfortunately he's busy with work or life and does not have as much time to devote to the idea, so I have stepped up to push this into motion.

Monkey Touch is a collection, we hope of 20 fun little quick games, that will showcase Monkey to the world, Initially we plan to get this compiled , translated and uploaded to the Monkey website.

But above that we hope that some community members with developer licences for iOS, Android and or XNA will be able to take our game and get it on those markets as a free to download title.

The ultimate goal being to have something we can show people to say, Hay monkey does this.

Here is what we have so far.

SLOT 1 : Taiphoz (invaders)
SLOT 2 : Slenker (?)
SLOT 3 : GeeCee3(?)
SLOT 4 : skn3(?)
SLOT 5 : Karja(?)
SLOT 6 : Fryman(?)
SLOT 7 : Tibit(?)
SLOT 8 : therevills(?)
SLOT 9 : Samah(?)
SLOT 10 : Neuro(?)
SLOT 11 : yourname(?)
SLOT 12 : yourname(?)
SLOT 13 : yourname(?)
SLOT 14 : yourname(?)
SLOT 15 : yourname(?)
SLOT 16 : yourname(?)
SLOT 17 : yourname(?)
SLOT 18 : yourname(?)
SLOT 19 : yourname(?)
SLOT 20 : yourname(?)




Google Code (SVN)
http://code.google.com/p/monkey-touch/

Latest Build
http://monkey-touch.googlecode.com/files/MT_0001.rar

Documentation
https://dl.dropbox.com/u/56777267/docs/MonkyTouch/index.htm

Requirements
-*Diddy - http://code.google.com/p/diddy/
-*FontMachine - http://www.jungleide.com/?page_id=515
-*DrawText Overload - http://www.monkeycoder.co.nz/Community/posts.php?topic=3207#33908

If you dont want to edit the font fontmachine module, just comment out the last value in the drawtext call that gives an error, your text will go out the screen but when I build the final RC, it will be ok.


Things to note

Frameworks being used.
-*Diddy
-*Fontmachine

Rules and Standards

-*comments.
In the source you might noticed the following comment structure.
'summary:FunctionName
this is a single line comment, good foor quick comments on stuff.
or

#red
'summary:ClassName
this is a multi line comment, and will be used to create documentation
for the whole project, so please drop one of these above your functions,
methods, and class's
#end

-*prefix
you must prefix any new class creations with a three letter signature
unique to you, mine for example is Tai_SomeClass

-*Art
You can use the texture packer described in this post, or just put your
own art into your games art folder.

-*Sound
You can add new sounds to the sound folder, or you can use those already
there, this is an area we can cut down on some space by re-using sound
files.

-*Music
Geecee, has already given us some music, if anyone else wants to help
just put the music in the music folder where all games can access it.

-*Code Standards
Inside your game1.monkey file, other than adding a three letter prefix,
the rest is upto you, part of the appeal of this project is that its for
the community and for monkey, and seeing how people do stuff will be very
cool, that includes what personal standards they use.

-*Only edit your own code.
Only edit the code within game(Your number).monkey.

-*Open Source
the whole point of the project is to be open source, something we can
show to the people coming into monkey as not only a code example, but as
an example of what you can do with monkey, and showing full source is key
to that.

-*Licence
GPL3 for all source in the project, but the media created is owned by the
Authors.

File Structure
Data
->fonts
->music
->sounds
->graphics
--->game1 (all your game art goes in here.)
--->game2
--->...
->GameList.txt

Each Mini game has it's own monkey source file, as well as it's own folder in the graphics directory, this keeps everything contained.

Were using the following texture packer [ http://www.codeandweb.com/texturepacker ] - and the game graphics folders will have a texture pack file you can open and edit to add your own graphics, but this is not essential and you can add your own graphics to your mini games graphic folder and load them yourself manually.

These are a few key graphics files to note.

game1_thumb.png

This will be used on the right hand side info box, and should be a screen shot of your gameplay.

game1_icon.png

This is the icon for your game which will be displayed on the left selection section.

game1.png
And this is the final Game Packed sprite sheet.


As well as these core images , we also have a gamelist.txt file, which is both comma and colon delimited, and where we will put our game data, like game name, author etc..

An example bellow shows mine, for game 1. a small space invaders thing which I plan to make as my contribution.

GameList.txt





Right now I will be happy to build everything as people send me it, or post it here, but any if you wish to work from the main project folder I would be happy to setup a shared dropbox folder, which I think would be a much better idea, but will require anyone taking part use dropbox(which is free)

So right now, were looking for people to post their interest here, to pick a number , to download the above source, or better yet work out of the dropbox folder, and start making their mini game.

If you want dropbox access, simply e-mail me your drop box name , or if you don't want to use dropbox download the above rar, make your game upload your rare some where and link it here for me to add to the main project.

And finally, again thanks to Raz for the brilliant idea, thanks to geecee3 from IRC monkey channel for contributing the music that's in the music folder, and thanks to everyone else who jumps on board and takes part.

OH!! One final thing, please ensure that all art, sound and or music that is used is either free, or that you have the creators permission, we don't want to be ripping people off.


Paul - Taiphoz(Posted 2012) [#2]
OH! small addition, I am using a modified version of Fontmachine which renders text to an area, so it might throw you an error, just comment out the last variable being passed which is a width value, your text will roll off the screen but when I compile it I will put the width back in so it will look ok in the final build.

or grab my fontmachine addition in the code archives.


Fryman(Posted 2012) [#3]
Im interested in creating a minigame for this project, Im happy to work out of the dropbox folder


Paul - Taiphoz(Posted 2012) [#4]
Fryman I just need you to e-mail me or tell me your e-mail from dropbox so I can add you to the shared folder.

and of course you will need to pick a number.

or click the little irc monkey link bellow. and chat with me live. :)


Neuro(Posted 2012) [#5]
So lets review this....we have to use Diddy, and keeping it simple, what are the rules for this? Is there a timeframe? Can we use our own graphics/sound or the set list above?


Kalakian(Posted 2012) [#6]
I think this is a good concept, but needs a lot more detail before it can work successfully. As Neuro points out, there needs to be some rules so everyone knows what they're doing.

A few points you may want to consider (there are many more of course):

* Is the whole project going to have a single license, or can each mini-game use a separate license (i.e. GPL, OpenBSD, LGPL etc.)

* Is it an open source project?

* Do participants have to stick to a single coding standard, or are they free to code however they want within their own mini-game?

* Who owns the rights?

And you know I'm going to mention this one ...

* Dropbox has its uses for sharing files, but source control would be much more suitable for a project like this


Skn3(Posted 2012) [#7]
Yeah was suggesting some of this in the other thread. I think it needs some rules and to be less open ended, otherwise its just "make a mini game in diddy in whatever timeframe you like".

If this is going to be a regular thing, I think we need possibly have some kind of theme or rules about features. I assume that all games must play with touch, but what about play with touch but no virtual joysticks allowed?

Id also like to know a timeframe as I am currently juggling day work, evening contract work and social life (if I can fit it in haha).


Paul - Taiphoz(Posted 2012) [#8]
rules incoming, and damn you derek I knew you were gona say that, I'll get you on raptr and you can talk me through setting up an svn for it. having never done it before there are a few questions I have.

wait did I just sound like yoda there ?


Paul - Taiphoz(Posted 2012) [#9]
I will try and get an SVN sorted out, or GIT or something other than dropbox as Derek has pointed out with potentially 20 people it could get a bit hairy.

As for a time frame, I want to give people time to see it, and being a slow programmer and developer myself dont want to really make it all that short, so how about a month, or should it be longer or shorter, I am open to suggestions..

I had planned to just keep it going until all 20 game slots were full but if we need a cut off point then im cool with that.


Raz(Posted 2012) [#10]
I would recommend Git, the new Windows GUI app is really easy to use.

http://windows.github.com/

I am all for limiting the graphics and sounds to a specified set. I think/hope it would help focus on coming up with unique code.

Not as a requirement, but as a recommendation; I would suggest that everyone comment their code nicely too.

I would suggest that description text etc gets stored within your instance of the Screen class instead of separate files.

[monkeycode]
Class RazScreen Extends Screen

Field GameName:String
Field Author:String:String
Field AuthorWebsite:String
Field Description:String

Field BronzeScore:Int
Field SilverScore:Int
Field GoldScore:Int
Field PlatinumScore:Int

Field IconGraphic:Image

Method New()

GameName = "Some Game"
Author = "Raz"
AuthorWebsite = "http://chrismingay.co.uk/blog/"
Description = "blah blah blah do this do that"

BronzeScore = 100
SilverScore = 400
GoldScore = 1000
PlatinumScore = 3000

IconGraphic = LoadImage("RazScreenIcon.png")

End

Method OnStart:Void()
' Gets run at the start of the game
End

Method OnEnd:Void()
' Gets run at the end of the game
End

Method Update:Void()

End

Method Render:Void()

End

End
[/monkeycode]

My logic being, the fewer files you need to edit when working on your game, the better.


Paul - Taiphoz(Posted 2012) [#11]
OK ----

Thanks to Derek "Kalakain" who knows more about SVN stuff than me, were now on google code, I picked the GPL3 licence it seems to fit what were doing.

I have put in the projects description on google code the following, please if this is not valid let me know, licence stuff is something I never really got into, and always left it to my publisher so feel free to point out any glaring mistakes.


Paul - Taiphoz(Posted 2012) [#12]
@Raz

we could do this I guess.

[monkeycode]
GameName[4] = "Some Game"
Author[4] = "Raz"
AuthorWebsite[4] = "http://chrismingay.co.uk/blog/"
Description[4] = "blah blah blah do this do that"
[/monkeycode]

I felt having that info in a single text file would mean changing that data would not require some one to mess with that code.


Skn3(Posted 2012) [#13]
Taiphoz, I know you done it already but git is really a lot nicer for this kind of thing. Id advise having a look instead of google code!

As raz said, the windows and mac clients are pretty swish too if you don't want to get down and dirty with the command line. I think considering the broad monkey userbase having something like the git client will assist in the long run as its really very user friendly!

*tries to be persuasive :P*

http://windows.github.com/


Paul - Taiphoz(Posted 2012) [#14]
Yeah, this is my first outing with SVN, or any other code mangament system for that matter so it's mostly alien to me, so since I have google code now setup and Derek is helping keep me on track with it I think we will stick with that.

If this all works, and we end up with a nice little project to push around, I full intend to make more, possibly a yearly, or quarterly thing not sure, but if we do, then I will look at git for the next one.


Paul - Taiphoz(Posted 2012) [#15]
We have the following struct in place I just populate it from file, what I have now commited to the repository is the following change to each of the game files.

[monkeycode]
Global GameList:miniGame[20]

#Rem
'summary: miniGame
Class used to just help oganise the game list a litte
#END
Class miniGame
Field name:string
Field id:Int
Field iconname:String
Field thumbnail:string
Field author:String
Field authorurl:String
Field info:String
End
[/monkeycode]

Each game source file now has the following in their NEW() method.
[monkeycode]
Method New()
name = "Game 1 Screen"

Local gameid:Int = 1

GameList[gameid - 1] = New miniGame
GameList[gameid - 1].id = (gameid - 1)
GameList[gameid - 1].name = "Invader"
GameList[gameid - 1].iconname = "game" + gameid + "_icon"
GameList[gameid - 1].thumbnail = "game" + gameid + "_thumb"
GameList[gameid - 1].author = "Paul Grayston"
GameList[gameid - 1].authorurl = "dev.cruel-gaming.com"
GameList[gameid - 1].info = "Aliens are planning to take over the world it's your job to save us all "
'Print "GameList " + GameList[0].name

End
[/monkeycode]

So each Author just needs to fill in the blanks.

Removes the need for the text file.


Paul - Taiphoz(Posted 2012) [#16]
Also gona remove that dropbox download and upping a new rar from the repo on google code.


Skn3(Posted 2012) [#17]
Can I take slot 4 please!


Karja(Posted 2012) [#18]
Great idea! Slot 5 seems like it's missing something - my name, for example! :)

Given that the rules will be fine once they're finalized. Time-wise, in particular...


Neuro(Posted 2012) [#19]
As for a time frame, I want to give people time to see it, and being a slow programmer and developer myself dont want to really make it all that short, so how about a month, or should it be longer or shorter, I am open to suggestions..

I too, am a slow programmer while trying to juggle all the other miseries in life. For this kind of community project, there definitely has to be a cut off date. Only thing is that potentially not all the spots will be taken by then.

I'm getting the sense that once this project is "completed" in its first run, we may have to do another or 2 to fill the rest of the slots.


Paul - Taiphoz(Posted 2012) [#20]
updated post to reflect slots being taken.


Paul - Taiphoz(Posted 2012) [#21]
Updated the opening post to show a comment rule addition..

Commenting code is never a bad thing, EVER!, and with an open source project that new programmers to monkey might be looking at commenting is all the more important.

I am working on a parser that will rip through a jungle document's directory and produce nice web ready documents, my plan is to use jungle and create documentation for the whole project then run my parser over it so we can have online documentation for people to look at.

so please be sure to comment everything.


Kalakian(Posted 2012) [#22]
If you're intending on generating documentation, you should probably mention that you expect the comments in the format compatible with Jungle's generator ;)


Fryman(Posted 2012) [#23]
Number 6 please.. nerionx at googlemail dot com


Tibit(Posted 2012) [#24]
I'm up for Slot 7!

Awesome initiative :)

Should be part of the Monkey documentation right? (once done)

Maybe it would be an really good set of beginner introduction tutorials?


c.k.(Posted 2012) [#25]
Is anybody going to judge the quality of entries? Will there be a vote on accepting entries?


Paul - Taiphoz(Posted 2012) [#26]
I'f some one submit's 10 Print "Hello World" 20 goto 10, then clearly I wont add it in the final build and will probably remove them from the list.

But it's a small mini game project, I really do not want to get all up in peoples faces if their art, or code is crap, as long as they stick to the rules, as long as their entry is a game and it plays without crashing then I will be happy.

if we get into a situation where more than 20 people want to take part, then we might vote on the top 20, and anything after the selected 20 would miss out.

but I really do not think it's going to come to that.


Paul - Taiphoz(Posted 2012) [#27]
Fryman, im still getting to grips with googlecode and svn and my goto guy is offline at the moment, so I have added you to the contributors permission, will have a chinwag with Derek probably tonight or in the morning, and if everything is cool will move you into the Commit group so you can commit your game file changes.


Tibit(Posted 2012) [#28]
I get this error:
/monkey-touch/title_screen.monkey<89> : Error : Unable to find overload for DrawText(String,Int,Int,Int,Int).

Also are there instructions for using the texture packer? Seems like a really good tool, is it the one diddy uses?

Also is this the FontMachine version to use?
http://www.jungleide.com/fontmachine/fontmachine-12-04-22-A.zip

Diddy link:
(SVN) http://diddy.googlecode.com/svn/trunk/ diddy-read-only
(Direct Download) http://diddy.googlecode.com/files/diddy_r428.zip


ziggy(Posted 2012) [#29]
The version you're mentioning is latest stable version, so I supose that's the version to use. It would be great if the core required modules are stored or linked somewhere.


Neuro(Posted 2012) [#30]
Alright, add me in this.


slenkar(Posted 2012) [#31]
does it have to be touch controls only?


Paul - Taiphoz(Posted 2012) [#32]
@Tibit - I hacked an overloaded function into Ziggy's font machine to render a long line of text over more than one line just comment out the last value in that line, your text will just render off the screen but when I build the final it will use my moded fontmachine and the text will get wrapped.

My modified function for Font machine is in the code archives, its not idea as it uses arrays but its better than nothing.

@Ziggy yeah thats a good idea, I will update the top post with a link to both fontmachine and diddy.

As for the texture packer im still learning it myself, I plan to blog about it once I have a good handle on it tho, and yeah its the one diddy uses hence why I linked it.

@Slenker I'm making my little spacey thing do both, you can touch to drag the ship left or right, or you can use arrow keys, I guess if you code for all controls then it wont be an issue.


Paul - Taiphoz(Posted 2012) [#33]
updated the main post with links to the required modules.


therevills(Posted 2012) [#34]
This sounds great, add me too :)

Can I suggest that we apply the Monkey coding standard as well?

http://blitz-wiki.appspot.com/Language_reference#identifiers

Monkey naming conventions

The standard Monkey modules use a simple naming convention:

All-caps case (eg: 'ALLCAPS' ): Constants.

Pascal case (eg: 'PascalCase' ): Globals, functions, class, methods, properties.

Camel case (eg: 'camelCase' ): Fields, locals and function parameters.



^ the only one I dont like is the Pascal Case for Globals, but for this project I can let that one go :P

And do you guys want to use the latest Diddy version (without downloading from the SVN)? I can quickly set up a new zip.

Also what format should the sound be in, as we know that each target has a limited number of formats they can read?


Fryman(Posted 2012) [#35]
@Taiphoz

Sure I probably wont take a look until the weekend anyway so no real rush :)


Paul - Taiphoz(Posted 2012) [#36]
@ thereviles, drop me your google e-mail I will add you to the project.

As for sounds, I was planning to convert to the three main formats , ogg, wav, and mp3, our first target will be html5 so that we can get it on this site's app's page.

As for coding standards, within your game file you can use any standard you like, that's part of the appeal, getting to see how a lot of people do things differently to each other.

I think most people probably have the most upto date diddy, if not, iv added links so they should be able to get at it, but yeah making a new zip or rar would be nice.


Paul - Taiphoz(Posted 2012) [#37]
Added a link to the Doc's, which will be updated each time I commit.


Samah(Posted 2012) [#38]
Yeah alright, count me in then. :)
I'll probably use "Sam_" or "Smh_" for the prefix.


therevills(Posted 2012) [#39]
My email address is: therevillsgames@...

Is there any set resolution for the games or should we just use the VR?


Samah(Posted 2012) [#40]
@therevills: Is there any set resolution for the games or should we just use the VR?

Additionally, all games will have to have the same orientation since that's in the Android manifest. I guess alternatively a game could do its own Rotate 90...


Paul - Taiphoz(Posted 2012) [#41]
For resolution the project is set at 640*480 which is the normal size here on the monkey site.

Therv, thats you added. be sure to only commit your own game#.monkey and the graphics folder that goes with it which looks like game8 will be yours.


Paul - Taiphoz(Posted 2012) [#42]
Samah mate you will be number 9 I think.


Samah(Posted 2012) [#43]
@Taiphoz: Samah mate you will be number 9 I think.

You have no idea how appropriate that is for the kind of game I'm thinking of doing. points if you can guess. ;)


Tibit(Posted 2012) [#44]
Double post error


Tibit(Posted 2012) [#45]
My Game name is: Desert Race Mayhem

Replace all code in game7.monkey with the code in the box below:
[monkeycode]
Code uploaded to SVN. Check it out at: http://code.google.com/p/monkey-touch/source/checkout
[/monkeycode]
Then unpack these images into main.data/graphics/game7/ folder:
www.truplo.com/gamedev/TibitArt-DesertRaceMayhem.zip

Open to comments. Hope it inspires some :)

On my TO DO list:

* Add Sound, music?
* Use the Sprite Atlas, look at how to use Diddy for content
* Tweak difficult & gameplay (please come with suggestions!)
* Write some sort of tutorial

Feel free to use my code (and/or graphics) here above in your games - steal what ever you want if it helps you improve or finish your game quicker :)

Will upload to SVN as soon as I'm added, can't commit ATM.


Samah(Posted 2012) [#46]
Wow... now that's a double post effort alright. :)
Install puush, and you will never look back.
http://puush.me/


Paul - Taiphoz(Posted 2012) [#47]
I added some 'summary: comments to the methods and functions you missed, and added a milti line #rem summary: #end to one of your methods to show you how..

this lets the documentation generator pick up the code.

which you will be able to see if you look at the docs, and your game file.


Paul - Taiphoz(Posted 2012) [#48]
and yea might be better using a codebox tag for large code posts like that..

looking good so far tho.


Paul - Taiphoz(Posted 2012) [#49]
OH, and tibit your added to the svn .. not sure when you tried to commit, in the mean time I have added your code for you. but yeah you should be able to do it on your own now. so for the others that have sent me their details for google code.


Neuro(Posted 2012) [#50]
I didn't get added yet?


Samah(Posted 2012) [#51]
BTW Tibit, Diddy has some Vector stuff now if you wanted to check it out.


Paul - Taiphoz(Posted 2012) [#52]
Neuro I need your googlecode e-mail before I can add you.. did you send me it ? I might have missed it.


therevills(Posted 2012) [#53]
My god man! Use a codebox!! ;)

BTW Tibit you are using 4 screens... thought we could only use one? If not its cool...


Paul - Taiphoz(Posted 2012) [#54]
Neuro mate your game 10 sorry I could have swore I added your name to the list, but like I said for svn commit access I need your google code e-mail.

and yeah please use code box's not monkeycode for large sources.


Paul - Taiphoz(Posted 2012) [#55]
@therevills yeah I think we said 1 game file, I guess we didnt really make it clear if that meant a single screen or just a single game file with extra screens flung in..

To be honest im easy on this, I do wana try and keep it all in a single file but im not to bothered if within that file you opt to use or create extra screen.


therevills(Posted 2012) [#56]
It'll be easier to do a full mini-game using multiple screens... so I reckon a single game file is fine :)


Neuro(Posted 2012) [#57]
but like I said for svn commit access I need your google code e-mail.

Its rachid.abdul@...

Also, how about if we still have slots left, for those who want to submit more than 1 game screens can get dibs on it?


Tibit(Posted 2012) [#58]
Diddy has some Vector stuff now if you wanted to check it out.
I checked, what is it called? Of course I'll use the Diddy one!

Sorry about multi-screens, I thought you meant one file. Let me know if you want me to change.

I did notice the game running slow in html5, not sure why.

Oh and about the codebox, something went wrong with the post - I did not even see the double post myself. I think the footer/header part of the source exits the codebox, I edited to monkey code and well, now there is two.

@Taiphoz - thanks! I use Jungle so I love those comments. I think I should refactor the code and make it look a bit nicer - I'll make sure to comment everything once I do.


Fryman(Posted 2012) [#59]
I guess my game is going to be a diamand dash insprired number, with um *** looks around** spiders instead of diamonds... also ... eeek a spider


therevills(Posted 2012) [#60]
I checked, what is it called? Of course I'll use the Diddy one!

Vector2D:

http://code.google.com/p/diddy/source/browse/trunk/src/diddy/vector2d.monkey

Sorry about multi-screens, I thought you meant one file. Let me know if you want me to change.

I think its been decided that its now one file per game, I think it actually makes it better :)

Oh and about the codebox, something went wrong with the post

LOL! BTW the monkeycode tags doesnt do the code box in an iframe, you still need to use the old tag: [ codebox ]


Tibit(Posted 2012) [#61]
Oh I used the wrong e-mail on the SVN lol :)

I'll update with Vector2D now! (I had not updated my svn, that simple)


therevills(Posted 2012) [#62]
BTW can I suggest a limit on the sound/music files... as the svn repository is already 30MB!

And I've just uploaded the latest Diddy zip:
http://code.google.com/p/diddy/downloads/detail?name=diddy_r454.zip


Tibit(Posted 2012) [#63]
I added this Overload to the Vector2D in diddy, vector2d.monkey row 168:

[monkeycode]
'summary: Calculate distance between two points - overload using x,y
Method Distance:Float(x:float, y:float)
Local dx:Float = x - Self.x
Local dy:Float = y - Self.y
Return Sqrt(dx * dx + dy * dy)
End
[/monkeycode]

I hope you can add it, I'm counting on it! :)


therevills(Posted 2012) [#64]
Hey Tibit, arnt you missing a SquareRoot there?

LOL! You updated your post! I've added CalcDistance to functions.monkey and Distance (which calls CalcDistance) to vector2d.monkey.


@Taiphoz - I've updated main.monkey and title_screen.monkey to use the new screen fade stuff.


Raz(Posted 2012) [#65]
So you're allowed to use your own sound/music/graphics now?


Tibit(Posted 2012) [#66]
@therevills - awesome! Yeah I noticed my collisions where off, and I went - wait a minute...

Also one thing I miss is a Pause Menu. I mean one that Each game have.

This is what I suggest.

Someone with extensive Diddy knowledge might be willing to create a simple "Pause Menu". The menu has a "resume game", "restart game" a "go back to arcade"

Every game needs to include a pause button (feel free to use the one I made). Once clicked we call If PauseMenu.Open() and freeze the gameplay + input.

Will enable users to exit games and return to the arcade easily. What do you think? (I tried this myself using the diddy gui but failed, did not want to complicate things with xmls and such)

btw Desert Race Mayhem is updated on svn for those who wants to test! Let me know your feedback.


Tibit(Posted 2012) [#67]
For texture packer. What should I change?

Instead of:
CarImage = LoadImage("graphics/game7/car.png")

I do:
CarImage = game.images.Find("car.png") ' Then I need to prefix my graphics?

Or how does this magic work?


therevills(Posted 2012) [#68]
@Tibit, you need to load the atlas via the images.LoadAtlas("filename", image.SPARROW_ATLAS) command then you use the game.images.Find("car") command... No need for the file format. Check the sprite atlas example.


Paul - Taiphoz(Posted 2012) [#69]
All Atlas Images in all game folders get loaded from Main, if your using the atlas all you need to do is pack your images with the LIBGDX and then save,publish.

Your art will be loaded by the main file, then just use game.images.find("car") or what ever image your looking for.

[monkeycode]
For Local g:Int = 1 to 20
Local path:String
path = ("/game" + g + "/game" + g + ".txt")
game.images.LoadAtlas(path, images.LIBGDX_ATLAS, true)
Next
[/monkeycode]

So he just needs to pack his images LIBGDX and publish, the main file then loads all the atlases in all folder.


Paul - Taiphoz(Posted 2012) [#70]
OH --

AND BE SURE!!!! , to prefix any images you add with your game id, game7_car1.png for example, jus6t in case there are any image conflicts, not sure how Diddy would handle two images of the same name in different atlases.


Tibit(Posted 2012) [#71]
Oh I need to get a license to texture exporter, I think that might have been why I could not publish.

On a side note to that - That PhysicsEngine also looks like a really polished tool - is there a Monkey lib for it yet?

Right, I'll prefix, got how it is working now. Thanks guys :)


Paul - Taiphoz(Posted 2012) [#72]
Also when you re-pack the txt file that it creates has as the top line the name of the file, you need to manually amend this so that it looks for that file inside the right folder like bellow.

I have fixed game7's texture text file and commited.

game7/game7.png
format: RGBA8888
filter: Linear,Linear
repeat: none



Paul - Taiphoz(Posted 2012) [#73]
@Tib I hope sam and therev add it to diddy cos it does look sweet.

[monkeycode]
'Field PauseImage:Image
Field PauseImage:GameImage
......
'PauseImage = LoadImage("graphics/game7/pause.png")
PauseImage = game.images.Find("pause")
[/monkeycode]


That's how you get at the pause image from the atlas, and not the single image file..

Also can you please prefix your image files like this, game7_pause.png

this will prevent any image conflicts.


Paul - Taiphoz(Posted 2012) [#74]
Oh and I would remove the crappy big white 7 from your little car icon, it was only there in the first place to show the icons number.


Tibit(Posted 2012) [#75]
Can I remove the "source" images to save space? Or should I leave them in the graphics folder?

Oh sorry, I created a conflict on SVN, I sorted it out, you where so quick I'd never guess :)

Thanks for the help!

The 7 removed :)


Tibit(Posted 2012) [#76]
btw using the Texture Packer in combination with diddy's resource loader is really smart since I assume once everyone is done, we can create a "big" texture map for all games? Or are each map loaded first when that game is started?

Seems like the sprite atlas I generated crashes the arcade. No idea how to fix this.

Maybe we are using different version, I just updated to latest version?


ziggy(Posted 2012) [#77]
Haven't you considered moving it to Mercurial instead of SVN?


Paul - Taiphoz(Posted 2012) [#78]
I would keep your source images handy in case you need to edit them .

And yes once everything is do e it will be possible to just pack all art into a single atlas , providing each bit or art has a unique file name hence the game7_myart.png suffix's


Paul - Taiphoz(Posted 2012) [#79]
Not going to move it now that we have started ziggy , it's one of those things if we use mer the sven peeps won't like it and using Sven clearly the merc fans don't like it.

So yeah sticking with svn for now sorry.


Skn3(Posted 2012) [#80]
And the git fans are just totally outraged!!! lol


ziggy(Posted 2012) [#81]
ehem... mmm... http://hginit.com/00.html (and I promiss I'm not going to steal this thread any more).


Paul - Taiphoz(Posted 2012) [#82]
Adding a new page, About.

This page will scroll some info on Monkey, the Project, why were doing this and who's taking part, as well as their info, web address's etc.

I'v sent a commit for this already and will update it as info is added and new people join the project.


Samah(Posted 2012) [#83]
ehem... mmm... http://hginit.com/00.html (and I promiss I'm not going to steal this thread any more).

I've been trying to convince therevills that we should move Diddy to Mercurial but he won't have a bar of it. :)


Paul - Taiphoz(Posted 2012) [#84]
lol how many posts should we let this go before we spawn a new thread to keep it clean and easy to follow ?


ziggy(Posted 2012) [#85]
Yes please!
By the way I've seen you're using your modified version of FontMachine with the word-wrap drawtext command. I'll be implementing something officially soon, but not your implementation becouse I have another idea for to make the same task that hopefully will work a bit faster, but had no time to implement it yet. Maybe you should provide a class that extends BitmapFont with a DrawWordWarpText function or something. I think this will make it a bit easier for other people to use the already written samples?


Paul - Taiphoz(Posted 2012) [#86]
Yeah I thought of a better way of doing it as well, I didnt realize that your module handled ~n's so my thought is to simply insert those new line characters instead of splitting the string into an array.

should only require a small edit to my modified function to make it work like that, which gets rid of the array

I will just wait till you implement your version and then amend the code, its only being used by 1 line at the moment in the project and its a single line that peeps can easily comment out.


Tibit(Posted 2012) [#87]
Very good guide on Mercurial, I think I'm finally getting to understand it. Tough I use a tortoise client - that integrates similar to Tortoise SVN.

Recommended to learn about Hg: http://hginit.com/00.html

@Ziggy - just noticed that Jungle has a automatic module update feature. OMG it updated FontMachine for me - magic I say, awesome magic.


ziggy(Posted 2012) [#88]
should only require a small edit to my modified function to make it work like that, which gets rid of the array
Yes I've seen it. But you know I just thought I had broken something after the Fontmachine update I did just commit, then I saw I didn't. Someone could get confused, that's why I was commenting.

@Tibit: Yes, if you ever develop a module, you can add this functionality to yours too in a very very easy way. Just follow this instructions:
Here: http://www.jungleide.com/?p=663
And here: http://www.jungleide.com/?p=678

I think the flixel module does support this too, don't know about others. I would gladly share the source code of this update tool just in case anyone else wants to integrate it on any other IDE.


Paul - Taiphoz(Posted 2012) [#89]
Ziggy, I have extended BitmapFont as BitMapFont2 , and added my DrawtextWidth() to this projects main file.

So people should not have any further issues with this, and then when you finally get round to adding your own code to do this I will simply switch references from BitMapFont2 back to BitMapFont

hope this helps some people out.


Paul - Taiphoz(Posted 2012) [#90]
Ziggy talking about updating via jungle I get an error source and destination paths are not the same, what ever that means.


Samah(Posted 2012) [#91]
There's only 46 SVN revisions, it's not too late to move it to Mercurial!
gogogogo!

Edit: Can we please use FadeToScreen instead of game.screenFade? It's easier and requires a little less work for each developer.


therevills(Posted 2012) [#92]
Can we please use FadeToScreen instead of game.screenFade?


Glad you said that! Oops I messed up the titlescreen... fixed it now :)

@Taiphoz, do you want me to go thru each game screen or do you want to fix them up?


Neuro(Posted 2012) [#93]
Holy crap, i leave for a day and now thread is flooded. Now i got read up on what i missed :).


Samah(Posted 2012) [#94]
I couldn't help myself... I made a local Hg repository and checked in every SVN revision as a separate changeset. XD

BTW, my email address is samahnub@...


Kalakian(Posted 2012) [#95]
Ok, I'll bite. I'm gonna have a proper look into Git or Mercurial, so I've made another forum post asking for good reasons why I should choose one over the other.

Git or Mercurial

If you want to discuss the reasons for using these, please do so in the new thread rather than cluttering up this one. I've just got Taiphoz using source control, so stop hassling him to use a different one while he's getting used to SVN :P


Paul - Taiphoz(Posted 2012) [#96]
haha thanks Derek, yeah like I said , let me get my feet wet with svn before you make me move onto something else.

Tibit mate google is telling me your not a user, did you change accounts or something ? your e-mail did work but when I went to add sam, it started to throw me an error.

@therevills yeah fix the games that have not been claimed, that way no conflicts, I will fix the main menus's and my game, those working on projects 2-10 can fix their own, I really dont want people committing code to other peoples game file where it can be avoided.


Paul - Taiphoz(Posted 2012) [#97]
The Project so far , I love this little tool. :)




Paul - Taiphoz(Posted 2012) [#98]
Oh and Therevilles, I have commited changes to game files 11-20.

the others people will be working on so don't want to touch those.


Paul - Taiphoz(Posted 2012) [#99]
Admin types can we get a lock on this thread please. thanks.


Gil(Posted 2012) [#100]
Taiphoz - I have developed this little minigame to run as my website 'business card' and I was wondering if it might be considered as an entry for your project...

Couple caveats...

1. I'm using the Monkey port of Flixel flash game library
2. It's running at 800x400, to fit with the size of my logo on my website

I can probably address #2 by scaling the final game screen down for your project requirements of 640x480.

The .js file is 956kb and the data folder is 650kb, so the footprint is fairly reasonable.

Additionally, I don't currently have means to test my game on any mobile device, so I might need some help testing from someone else on the team.

Anyways, thanks for the consideration.

Cheers!


simonh(Posted 2012) [#101]
Continued here.