About Monkey 2 › Forums › Monkey 2 Development › Monkey 2 structure question?
This topic contains 5 replies, has 2 voices, and was last updated by
Jesse
1 year, 6 months ago.
-
AuthorPosts
-
September 28, 2017 at 3:09 pm #10860
I was doing my own take on converting the Insectoids from Blitzbasic to Monkey2 I pretty much converted the whole game. but I ran into a problem. when I tried to run the game. I run into the problem that It was not able to load sounds. I have the game code and two sub directories. One is called “graphics” and the other is called “sounds”.
I import the subdirectories like this:
#Import “graphics/”
#Import “sounds/”and further down I download sounds like this
Sound.Load( “asset::boom.ogg”)
but it doesn’t want to load the sound.
I remove it out of the sub directory do the appropriate changes and it loads it fine.
I then placed it in the graphics subdirectory and it also loads it fine.I put it back in the subdirectory, rename the subdirectory, do the appropriate changes and same problem.
so my question is: Is the problem because I am using more than one subdirectory? Is there only one subdirectory allowed in Monkey 2?
This is on a MacBook running running latest OS X.
September 28, 2017 at 10:26 pm #10867Might be a bug – can you post a runnable sample?
September 29, 2017 at 1:05 am #10870Well, I don’t know what happened. Since I couldn’t get it to work with two sub directories, I decided to put all of the media in a single directory and modify it accordingly. so I removed all of the referenced etc.. and it’s working fine. After reading your post I made a duplicate of the game and modified everything to work with two subdirectories and guess what. The darn thing works fine now!
I haven’t got much time programming now, maybe 8 hours in 2 weeks. I have been converting this code for these two weeks and about one forth of that time I have spend on this problem. 3 days! Probably was just a typo or something. Now I am just upset at myself.
sorry about that Mark and Thanks.
below is what I have so far. It’s not finished but it runs. it’ still needs a few tweaks and logic bug fixes.
if anybody want’s to give it a try: it takes a while to start in debug mode because I am emulating just about everything from BlitzBasic( the creation of rotated images, the scaling of images, and couple of other things. it’s pretty slow at starting in debug mode but release mode is normal fast.
to play the game press 1 to start, left/right to move and space bar to shoot.If anybody is interested in a version more in par with monkey2 download the version made by @therevills. His is “object Oriented. while mine is more like the original “Procedural” and intentional.
his Github page:
https://github.com/therevills/InsectoidsAttachments:
September 29, 2017 at 8:39 am #10880Woah, that’s an interesting approach – why pre-rotate/scale everything? To make conversion eaiser?
Anyway, mostly works here, though enemy bombs are strangely large and explosions have no alpha but apart from that it’s insectoids!
Takes about 7 seconds to start in debug mode, but only about half a second in release.
September 29, 2017 at 11:02 pm #10888why pre-rotate/scale everything? To make conversion eaiser?
it turned out that way. just decided to make it is close to the original as possible. I started converting it to Monkey 2 just like Therevills OO kind of way. either way its easy for me. I started before he started his but I wasn’t sure I was going to finish it, too busy with many other projects and life problems. When he mentioned he was doing it also, I kind of new he was going to go the OO way so I decided to keep it as close to the original as possible with procedural being the main goal. I did the pre-rotation and scaling just for fun.
enemy bombs are strangely large and explosions have no alpha but apart from that it’s insectoids!
Yea, I did mention above that there were some logic bugs.
September 30, 2017 at 5:27 pm #10892 -
AuthorPosts
You must be logged in to reply to this topic.