MFGG phpBB Message Boards Archive
https://phpbb.mfgg.net/

Coding Help
https://phpbb.mfgg.net/viewtopic.php?f=10&t=14053
Page 39 of 41

Author:  CatoNator [ Thu Aug 18, 2016 3:46 pm ]
Post subject:  Re: Coding Help

Unity 5's full version is free until you earn a certain amount of money from what I've heard. Your games also have that splash screen at the start if you haven't paid for it.

Author:  ollydgaming [ Thu Aug 18, 2016 3:46 pm ]
Post subject:  Re: Coding Help

yeah, tried gamemaker, laptop almost caught on fire

Author:  DJ Coco [ Thu Aug 18, 2016 4:57 pm ]
Post subject:  Re: Coding Help

CatoNator wrote:
Unity 5's full version is free until you earn a certain amount of money from what I've heard. Your games also have that splash screen at the start if you haven't paid for it.
Yeah, 100,000 per year afaik. Should be high enough for small indies not to worry about.

Author:  DragonDePlatino [ Thu Oct 06, 2016 8:09 pm ]
Post subject:  Re: Coding Help

Recently, I made the switch from C++ to C. I've gotten used to the manual memory management, but it's gotten me thinking...

Exactly how much memory is too much memory for a game? From what I understand, most computers these days have a minimum of 4GB of RAM. A small part of that is allocated for your game and if you hit that limit, things start getting shoved onto your hard disk instead of RAM and your game runs sloooow. At what point to most programs do this? How much memory do your games use?

Looking at Task Manager, it seems I'm using 24.5MB so far. I only have a window and some basic rendering so far so I guess that makes sense.

Author:  onpon4 [ Thu Oct 06, 2016 8:43 pm ]
Post subject:  Re: Coding Help

Games that do things right usually don't need a whole lot of RAM, so chances are if you run into a problem caused by RAM issues, you're either solving a bug or fixing the way you do something.

As a reference, ReTux at its absolute worst seems to use about 600 MB of RAM.

I suppose I would say, consider 1 GB to be a general limit you strive to be under, but don't worry too much about your RAM usage causing problems until you reach 2 GB. If you're using 1 GB or more of RAM, check where all that RAM use is and see if there is a better way to do what you're doing. As an example, Naev currently uses that much just from starting up the game; that's because it pre-loads pre-rendered ship images rather than rendering 3-D models dynamically like it ought to, so switching to 3-D model rendering is one thing on Naev's to-do list.

Author:  DragonDePlatino [ Fri Oct 07, 2016 7:13 pm ]
Post subject:  Re: Coding Help

Hmm...sounds reasonable to me. I'll aim to be in the general ballpark of 1GB. Right now, I think a majority of RAM is just CSFML overhead. Initializing an OpenGL window and loading a few 256px textures takes up 20MB in itself, with the rest being my roguelike's game logic.

Earlier, I was surprised to boot up the graphical version of NetHack and see it only using 1MB of memory. One wonders what rendering library they're using to have so little overhead...

Author:  Puddin [ Fri Nov 04, 2016 2:10 pm ]
Post subject:  Re: Coding Help

Question... hope this is the right thread.

I was recently able to afford to purchase a Game Maker Studio license as well as most of the export modules thanks to the recent Humble Bundle.

This probably has been asked before but... are developers allowed to use Game Maker Studio to develop things that are not games? I realize that I'd be better off learning Python or C++ or something if I want to make software programs, but I'm just curious if YoYo Games has any policies strictly prohibiting the usage of their software to develop things that are not games. I tried Googling it several times with different wording... but none of my queries turned any results. I also couldn't find anything about it in the FAQ or TOS.

So is it allowed? Not for MFGG, I just mean for in general. Although I have considered creating a Mario Paint clone and seeing if MFGG will accept it. But that's another story, I suppose.

Author:  Gatete [ Fri Nov 04, 2016 3:05 pm ]
Post subject:  Re: Coding Help

I'm pretty sure you can, someone did a application to get the palette of a sprite.

http://gmc.yoyogames.com/index.php?showtopic=587773

Author:  DragonDePlatino [ Fri Nov 04, 2016 5:42 pm ]
Post subject:  Re: Coding Help

Yeah, it's certainly not out of the ordinary to use a game development tool/library for normal software. A good example would be ASEprite, which was made in Allegro.

Author:  SonicZetrex [ Tue Jan 03, 2017 10:59 pm ]
Post subject:  Re: Coding Help

This seems to make me struggle more likely.

I'm having trouble trying to figure out how to do the moving platform just like this:
Image
*not my gameplay.

How do I be able to deal with the moving platform in top-down style?

Author:  SuperArthurBros [ Tue Jan 03, 2017 11:28 pm ]
Post subject:  Re: Coding Help

Make the platform shift the players' position when they are both in contact. Are you using Gane Maker?

Author:  SonicZetrex [ Wed Jan 04, 2017 7:01 am ]
Post subject:  Re: Coding Help

Yes, yes I really am. Studio really.

Author:  DJ Coco [ Thu Jan 05, 2017 3:05 pm ]
Post subject:  Re: Coding Help

Check from the platform if the player is standing on top of it, and if so apply the same movement to the player as you do to the platform.

Author:  SonicZetrex [ Fri Jan 06, 2017 7:49 pm ]
Post subject:  Re: Coding Help

Image


Here is the code I've put on:

Player: Step | Handling Speed
Code:
///Handles Speed
if place_meeting(x,y,obj_platform)
{
speed = obj_platform.speed
onplatform = true
}
else
{

speed = 0
onplatform = false
}

*Did make a great attempt for vspeed and hspeed, failed to do both (only one works!).

Platform Square: Step
Code:
if (collision_rectangle(x-8,y,x+7,y+15,obj_up,1,1))
{

vspeed = -1
}
if (collision_rectangle(x-8,y,x+7,y+15,obj_down,1,1))
{

vspeed = 1
}

if (collision_rectangle(x-8,y,x+7,y+15,obj_left,1,1))
{

hspeed = -1
}
if (collision_rectangle(x-8,y,x+7,y+15,obj_right,1,1))
{

hspeed = 1
}


That's the problem I'm dealing with now.
@DJ Coco: That's what I've been trying to do, but seemed to can't figure it out with the arrow process and the same movement for the platform.

Author:  Q-Nova [ Fri Jan 06, 2017 8:16 pm ]
Post subject:  Re: Coding Help

Although I haven't really done moving platforms before, I think what you should actually try to do is to make the platforms check if the player is on them or not. If they are on them, then when they move, the player's position should be shifted along the platform (for example, if the platform is moving south, then the player's y position should be shifted down a bit). For that arrow problem, I think the collision_rectangle bits should be something like this (obj_up is being used in the following example):

Syntax: [ Download ] [ Hide ]
Using gml Syntax Highlighting
if ( collision_rectangle ( bbox_left, bbox_top+vspeed, bbox_right, bbox_bottom+vspeed, obj_up, 0, 1 ) )
 


What's in the above window is basically checking what's around it's collision mask (and if it's moving down, also checks what's a bit below, and if it's moving up, also checks what's a bit above). The sixth thing was zero instead of one, because while it doesn't check pixel-perfectly, the process becomes faster (though, if you want to keep it as 1, then go ahead).

Author:  SonicZetrex [ Mon Jan 09, 2017 8:15 am ]
Post subject:  Re: Coding Help

Works well if vertical. But horizontal doesn't.

Platform Square {Step}
Code:
if ( collision_rectangle ( bbox_left, bbox_top+vspeed, bbox_right, bbox_bottom+vspeed, obj_up, 0, 1 ) )
{

vspeed = -1
if place_meeting(x,y,obj_zou)
{
obj_zou.vspeed = obj_platform.vspeed
}

}
if ( collision_rectangle ( bbox_left, bbox_top+vspeed, bbox_right, bbox_bottom+vspeed, obj_down, 0, 1 ) )
{

vspeed = 1
if place_meeting(x,y,obj_zou)
{
obj_zou.vspeed = obj_platform.vspeed
}
}

if ( collision_rectangle ( bbox_left+hspeed, bbox_top, bbox_right+hspeed, bbox_bottom, obj_left, 0, 1 ) )
{

hspeed = -1
if place_meeting(x,y,obj_zou)
{
obj_zou.hspeed = obj_platform.hspeed
}

}
if ( collision_rectangle ( bbox_left+hspeed, bbox_top, bbox_right+hspeed, bbox_bottom, obj_right, 0, 1 ) )
{

hspeed = 1
if place_meeting(x,y,obj_zou)
{
obj_zou.hspeed = obj_platform.hspeed
}
}

Author:  Q-Nova [ Mon Jan 09, 2017 12:12 pm ]
Post subject:  Re: Coding Help

Uh, do you think you could please explain what works if vertical but doesn't work if horizontal? Is it the arrow checking, the movement when the player is on the platform, both, or something else? :confused: Whatever it is, though, I can see what could be wrong with your code. First of all, the checking for the player stuff shouldn't be inside the arrow checking. I think they should be on their own. Also, for the movement when the player is on the platform, I think it should look something like this (considering that it's used inside the platform object. Vspeed is used in the following example):

Syntax: [ Download ] [ Hide ]
Using gml Syntax Highlighting
obj_zou.vspeed = vspeed
 


What you have right now, will make the player in the speed of all of the platforms, instead of the one it is on. The above bit, however, should make the player move in the vertical speed of the vertical speed of the platform it is on.

Author:  SonicZetrex [ Wed Jan 11, 2017 8:38 am ]
Post subject:  Re: Coding Help

Image

It seems to work well! Thanks, Q-Nova, but I think I have 1 problem to try to handle...(I'm so sorry...)

How do I deal with the mask when he is near the falling trap?

Author:  Q-Nova [ Thu Jan 12, 2017 10:51 pm ]
Post subject:  Re: Coding Help

You're welcome! :) If you don't want the player to fall into the trap while they are in the moving platform, then maybe have it so that when it is checking for the trap, it also checks if the player is on the platform or not.

Author:  SonicZetrex [ Fri Jan 13, 2017 7:00 pm ]
Post subject:  Re: Coding Help

Again. Thank you very much, Q-Nova!! :soveryhappy:

That's the reason you deserved the "Big Help" for being helpful. Thank you!!

Page 39 of 41 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/