Fangames > Programming Questions

Portal Recreation help? :)

(1/2) > >>

Rad:
Hi, beginner fangame maker here.

I'm trying to recreate this:

As someone with little gamemaker experience, I have no idea how to go about doing this. Could someone help me?

Please be explicit if you can in your explanation because I will have trouble following. This is from I Wanna be the Calamity Fortune and I'm using Gamemaker: Studio.
Those two colors are actually perfect, although a white color would be cool too. Thanks so much!

pieceofcheese87:
This was created using game maker's particle system. If you want the exact code for this, make an object for the effect and put in this code:
https://pastebin.com/vgz5BpHE

Rad:
First of all you're a beast Pieceofcheese :P

Second, I'm having a bit of trouble. It's kinda hard to explain so I highlighted my short explanation of it.
https://www.twitch.tv/r4d1at10n/c/6881856
Also, the portal is white because I was messing around with the RGB trying to see what different colors I could get.

Also, did you just decompile Calamity Fortune to look at the code? If so, I'd love to know how to do that. I'm sure that if you aren't able to answer my question about getting the warp to work, you can just look in the Calamity Fortune files. But the thing is that I would never have had to make this thread had I been able to do that myself. Thanks for the help so far, as an amateur at best I really appreciate it :)

Rad:
Also when I put the portal object back as normal without the effect, I get this crash upon entering the portal

Derf:
Hey Rad,

Cheese may have just written it himself seeing as it's not a massively complex code - though if it is 1:1 to the game you mention then he may have decompiled. Decompiling is frowned upon by some people last time I checked, though that was about 3 years ago, and the forum I was at previous had a rule where you weren't allowed to post a link to it (I'm not sure how enforced it was, most people just PM'd it). I don't want to risk it if it is also the case here, but you can just google "Gamemaker Decompiler" to find a link to the program; though I'm unsure if they make a Studio version, which is fine since most fangames are made in GM8/GM8.1.

In terms of your problem, if there's no sprite you can't do collisions as there's nothing for the player to collide with, regardless of if the object is producing particles. The reason the portal is spawning at the top left of the 32x32 block and not the middle is because before you had a sprite which was centered in the middle of the block and that's where the particles would spawn from but since removing it you don't. In other words, you need the sprite, you just don't need to draw the sprite. I'm not on a computer with game maker currently so off the top of my head I would suggest putting the sprite back into the object but setting it invisible by unchecking the visible box in the object; failing that adding a draw event and just putting in some empty brackets like this "{}" may work. While these will fix your collision problem and also not draw the sprite I am unsure as to whether they will nullify the particles, but I doubt it.

If that doesn't work and they do stop the particles then add this to the step event "if(collision_rectangle(x,y,x+32,y+32,player,0,0) { XXXXXXXXXXXXX }" and then where I've put the X's add the code you want for collision (in this case room changing). Also, why it appears in front of your player is to do with this line of code "part_system_depth(Sname,-1);", if the player object's depth is -1 or lower then the particles may/will spawn in front of it. Try setting it to 0 or 1.

Hope this helped, I find GML terribly hard to explain so if you need me to elaborate on anything don't hesitate to ask :~)

Navigation

[0] Message Index

[#] Next page

Go to full version