Gamemode Request + other Mods
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
So one day, after playing Mar0 for a few months, I decide to show the game to my brother.
He thought it was kinda cool, except he's a little Call of Duty freak and finds no fun in playing platformers. So while I played, he decided to take the mouse from me and start shooting the portals for me. So I'd be playing normal Super Mario Bros., and he'd be screwing me up.
Usually he'd fire one off early in the level, then make me fall into the other next to the flag that had me going all the way back.
And then I thought, 'Hey, this would be a pretty cool gamemode.' Now, I've watched this place for a long time, and I know Maurice and Saso have a lot on their plate with all the suggestions, demands, updates, little kids to ban, and whatnot... And I am absolutely clueless about lua, LOVE and all this, so I thought it'd be nice to bring it up in a subforum where the smarter people can possibly handle this.
/end cool story.
Suggestion part.
Anyways, the gamemode is basically, take a few steps, and a set of portals is opened near your position. They could be helpful, in your way, or lead only a few blocks ahead of you. the "R" button and shooting your own portals are disabled, and all you can really do is play through like normal Mario Bros. or whatever map pack you're on, except with the portals inhibiting or helping your progress.
Editz:
I also saw someone suggest something that's been on my mind since I got 0'Brothers.
A mod loader. Something that takes the core files from other Mari0 LOVE files and puts them together to create a massive single mod on startup. Anybody see that topic?
Another edit
I was also wondering if I could have the code and all anchoring/related codes to the dynamic splitscreen. Unless it's already written into the game and just disabled?
He thought it was kinda cool, except he's a little Call of Duty freak and finds no fun in playing platformers. So while I played, he decided to take the mouse from me and start shooting the portals for me. So I'd be playing normal Super Mario Bros., and he'd be screwing me up.
Usually he'd fire one off early in the level, then make me fall into the other next to the flag that had me going all the way back.
And then I thought, 'Hey, this would be a pretty cool gamemode.' Now, I've watched this place for a long time, and I know Maurice and Saso have a lot on their plate with all the suggestions, demands, updates, little kids to ban, and whatnot... And I am absolutely clueless about lua, LOVE and all this, so I thought it'd be nice to bring it up in a subforum where the smarter people can possibly handle this.
/end cool story.
Suggestion part.
Anyways, the gamemode is basically, take a few steps, and a set of portals is opened near your position. They could be helpful, in your way, or lead only a few blocks ahead of you. the "R" button and shooting your own portals are disabled, and all you can really do is play through like normal Mario Bros. or whatever map pack you're on, except with the portals inhibiting or helping your progress.
Editz:
I also saw someone suggest something that's been on my mind since I got 0'Brothers.
A mod loader. Something that takes the core files from other Mari0 LOVE files and puts them together to create a massive single mod on startup. Anybody see that topic?
Another edit
I was also wondering if I could have the code and all anchoring/related codes to the dynamic splitscreen. Unless it's already written into the game and just disabled?
Last edited by HAPPYFACES on 21 Jan 2013, 06:35, edited 2 times in total.
Okay I'm no coder but I think that's impossible,
You'd have to make an AI for the portals and that might require some sort of rewrite and that whatnot.
You'd have to make an AI for the portals and that might require some sort of rewrite and that whatnot.
- Mr.Q.Marx?
- Posts: 849
- Joined: 15 May 2012, 18:35
AI which I would write. Psudocode.Turret Opera wrote: You'd have to make an AI for the portals.
randomTime = new int 0,60
if randomTime = 0
{
randomAngle = new int 0, 360
blue.createPortal.randomAngle
randomAngle = new int 0, 360
orange.createPortal.randomAngle
randomTime = new int 0,60
}
randomTime --
I know this is messy but the AI could be simple like this.
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
Kinda got distracted for a bit, sorry.
And this is why I envy people with more knowledge of coding than me. Mr.Q.Marx? hit this on the head as far as I know.
Also, has anyone ever thought about creating idle animations for characters, and animations for other blocks besides ? blocks?
And this is why I envy people with more knowledge of coding than me. Mr.Q.Marx? hit this on the head as far as I know.
Also, has anyone ever thought about creating idle animations for characters, and animations for other blocks besides ? blocks?
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
Pretty sure Mari0 doesn't use 360 for angles. I think it is clock based...Mr.Q.Marx? wrote: {
randomAngle = new int 0, 360
blue.createPortal.randomAngle
randomAngle = new int 0, 360
orange.createPortal.randomAngle
randomTime = new int 0,60
}
Wrong sir, wrong! It's used in pi radians. If you don't know that stuff, you can't do much. (I know pi radians, and I'm sure other people on the forums do as well).BobTheLawyer wrote:Pretty sure Mari0 doesn't use 360 for angles. I think it is clock based...Mr.Q.Marx? wrote: {
randomAngle = new int 0, 360
blue.createPortal.randomAngle
randomAngle = new int 0, 360
orange.createPortal.randomAngle
randomTime = new int 0,60
}
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
I never really payed attention to it.
I dealt with it for a little bit in one mod.
I dealt with it for a little bit in one mod.
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
Huh, I looked into the code... Saw pi symbol... didn't make the connection. Thank you, the more you know.Turtle95 wrote:Wrong sir, wrong! It's used in pi radians. If you don't know that stuff, you can't do much. (I know pi radians, and I'm sure other people on the forums do as well).
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
Does the variable "i" for mario indicate the number of players in Mari0?
No, "i" is used when in a loop, it's usually the id of the current object.
To get the number of players, use #objects["player"] .
Also, 360 degrees = two*pi radians.
also, with math.rad() & math.deg(), you don't need to know radians.(It respectively convert to radians and to degrees, and it's used in Not Pacman and Not Tetris.)
To get the number of players, use #objects["player"] .
Also, 360 degrees = two*pi radians.
Why "Pi" radians? There is only one type of radian.Turtle95 wrote:Wrong sir, wrong! It's used in pi radians. If you don't know that stuff, you can't do much. (I know pi radians, and I'm sure other people on the forums do as well).
also, with math.rad() & math.deg(), you don't need to know radians.(It respectively convert to radians and to degrees, and it's used in Not Pacman and Not Tetris.)
...
Last edited by Qcode on 21 Oct 2021, 09:02, edited 1 time in total.
I know, but "players" don't actually mean the number of marios on the screen.
What if you're playing multiplayer, and one of the marios die and don't have any life left? he will be deleted from "objects["player"]", but "players" will not be decreased. And then, mari0 try to make an non-existant mario shoot portals, and poof, "attempt to index field '?' (a nil value)".
What if you're playing multiplayer, and one of the marios die and don't have any life left? he will be deleted from "objects["player"]", but "players" will not be decreased. And then, mari0 try to make an non-existant mario shoot portals, and poof, "attempt to index field '?' (a nil value)".
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
I want to call each player as a separate object, rather than a Mario.
Why?
Marios are objects, and you can't make them shoot portals if they don't exist.
And you can't make a player shoot portals since they don't have any position, and in 1.6, portals are part of marios.
mario.lua:131
Marios are objects, and you can't make them shoot portals if they don't exist.
And you can't make a player shoot portals since they don't have any position, and in 1.6, portals are part of marios.
mario.lua:131
Code: Select all
self.portal1X = false
self.portal1Y = false
self.portal2X = false
self.portal2Y = false
self.portal1facing = nil
self.portal2facing = nil
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
The reason I'd like to call each player as a separate object is to modify the properties of each separate player to give them their own special properties, Ex.: Jump height, gravity, Fire Flower power. Customizable (Rather than the color and hat) Characters. Possibly also allow multiple gamemodes for separate players, Portal, Gelcannon, Minecraft. Hey maybe even guns 'n' 'nades.
...
Last edited by Qcode on 21 Oct 2021, 09:02, edited 1 time in total.
I spent several hours separating players and portals in SE by the way.Automatik wrote:Why?
Marios are objects, and you can't make them shoot portals if they don't exist.
And you can't make a player shoot portals since they don't have any position, and in 1.6, portals are part of marios.
mario.lua:131Code: Select all
self.portal1X = false self.portal1Y = false self.portal2X = false self.portal2Y = false self.portal1facing = nil self.portal2facing = nil
So you can still use the "portal" entity with id 2 even if player 2 isn't playing.
http://i.imgur.com/FvZio.gif
This supports theoretically unlimited but only 8 GUI supported portals at the moment.
Combine this with region triggers and you can already do this.
(I just tried this and I need toggle gates because regions send an "off" signal and the portals close again)
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
Okay, thank you Automatik and Qcode for steering me away from an impossible path.
Now, while I was disconnected from the net, I had some time to begin something that I think I won't be able to finish on my own. If no one is busy and would probably like to help me with this project, PM me. I'm gonna need all the help I can get...
Now, while I was disconnected from the net, I had some time to begin something that I think I won't be able to finish on my own. If no one is busy and would probably like to help me with this project, PM me. I'm gonna need all the help I can get...
Sorry for pointing it out but there is also Tau radians and Tau = 2pi (I doubt any prog. language uses it).Automatik wrote:No, "i" is used when in a loop, it's usually the id of the current object.
To get the number of players, use #objects["player"] .
Also, 360 degrees = two*pi radians.Why "Pi" radians? There is only one type of radian.Turtle95 wrote:Wrong sir, wrong! It's used in pi radians. If you don't know that stuff, you can't do much. (I know pi radians, and I'm sure other people on the forums do as well).
also, with math.rad() & math.deg(), you don't need to know radians.(It respectively convert to radians and to degrees, and it's used in Not Pacman and Not Tetris.)
Yes, there is tau. No, there is no such thing as tau radians.rokit boy wrote:Sorry for pointing it out but there is also Tau radians and Tau = 2pi (I doubt any prog. language uses it).
A circle of r=1 has a circumference of ~6.2832, meaning a full 360° degree is ~6.2832 radians. This is either 2pi or 1tau, but radians are still radians. They have nothing directly to do with pi or tau.
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
In essence there's four different units to measure a circle.
Kind of an update:
Would like to know if anyone's interested helping me make a character chooser for 1.6. I have some of the GUI elements figured out, but my main problem is having each player select a character, and tie that character's image to the player. Anybody interested?
Kind of an update:
Would like to know if anyone's interested helping me make a character chooser for 1.6. I have some of the GUI elements figured out, but my main problem is having each player select a character, and tie that character's image to the player. Anybody interested?
Last edited by HAPPYFACES on 31 May 2013, 00:33, edited 1 time in total.
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
Can someone explain to me this line? Line 1021-1024 in mario.lua:
I understand it's if the player is using the mouse, but I'm having a hard time picking it apart
Code: Select all
if self.playernumber == mouseowner then
local scale = scale
if shaders and shaders.scale then scale = shaders.scale end
self.pointingangle = math.atan2(self.x+6/16-xscroll-(love.mouse.getX()/16/scale), (self.y+6/16-.5)-(love.mouse.getY()/16/scale))
math.atan2 gives you the angle for a given y,x vector.
In line 4 I am calculating the vector from the middle of Mario to the mouse position so I can get the angle. At the time I was too stupid to realize it should be y,x and not x,y.
In line 4 I am calculating the vector from the middle of Mario to the mouse position so I can get the angle. At the time I was too stupid to realize it should be y,x and not x,y.
-
- Posts: 524
- Joined: 02 Jun 2012, 03:40
Okay, so this should be left alone... And go to the setquad function at line 1508 to edit the angle quads, correct?
- Jackostar10000
- Posts: 417
- Joined: 17 Jun 2012, 12:06
yeah maybe it should be just a little 2p mode mod:
loose a point for each portal placed and 10 points for any level beat
gain a point if player one goes through a portal 2 points if a enemy goes through a portal 20 points if they die
also unlimited lives
possible mod idea rules ?
loose a point for each portal placed and 10 points for any level beat
gain a point if player one goes through a portal 2 points if a enemy goes through a portal 20 points if they die
also unlimited lives
possible mod idea rules ?