Jump to content


Arthur Yarbrough

Member Since 25 Nov 2010
Offline Last Active Mar 16 2012 01:23 PM

Topics I've Started

Help with ds_lists

05 March 2012 - 12:54 AM

In my game I have a ds_list, with the sprite_index values of different "cards" shuffled inside. Can anyone give me any ideas on how to make it where when you right click the card deck, you can see a menu (either visual or text) with all the sprite names to select from? I tried using the show_menu function but all it gave me was the sprite's number value instead of the name value making it impossible to tell the sprites apart, and when I changed the code to show the sprite's name, it showed as a string making it impossible to recognize the sprite when clicked. Not to mention the show_menu code I used crashed a lot anyways.

Any help would be really appreciated. :) I've got most of my game engine and mechanics already created but this is a problem that has been bothering me for a long time...

Combining A Menu And A List

02 March 2012 - 01:47 AM

I am making a Trading Card Game similar to Yu-Gi-Oh and I have come across a problem I have not been able to solve. I have a discard pile and some cards allow the cards to be taken out of the pile and brought back to your hand/field/deck/etc. Well, when a card is added to the discard pile it is added to a ds_list named p1grave or p2grave. I've been trying to make it so that when one clicks on the discard pile, it will show a drop down menu with each menu button being the ds_list value given for each card in that list. (The values for the cards in the ds_list are the sprite names, and the sprite names are what I want to show in the menu.) I have tried experimenting with the show_menu function to show each value in the list but so far I have been unsuccessful. Does anyone know how to accomplish something like this? :I

Need Help Optimizing This Code. :)

26 February 2012 - 06:24 PM

I am making a card game similar to the Pokemon/Yu-Gi-Oh TCGs and I have a question I would like to ask. As of right now, all the cards in the hand and on the field are shown very small, as to all fit on the screen and leave room for other essentials, but when the mouse hovers over them they show as the full-sized version of their card on the right side of the screen. I know how to accomplish this, but my problem is that I worry once many cards are created that my way of doing this will cause major lag in the game.

Right now I have one object for the small card, changing it's sprite according to the sprite value listed in a ds_list deck. I then have a script in the step event that changes the big card's sprite depending on the sprite of the smaller one.

if position_meeting(mouse_x,mouse_y,self)
    {
    if sprite_index = spr_card1
    obj_cardview.sprite_index = spv_card1

Then the last 2 lines repeat for every card, changing each sprite from the small version (with the spr beginning) to the big version (with the spv beginning) It works flawless, but I worry once hundreds if not possibly thousands of cards are added that this code in the step event for the hand slots, and the cards on the field for both players will cause major lag due to all the checks that will have to be done each step.

My plan was to change the cards names where the small card is something like
"spr_card"
and the big card is something like
"bspr_card"
and then somehow program a script that would detect the current sprite_index, and change the big card to be that value with an added b in front so that it changes into the big card instead of the smaller one. Kind of like a "b+sprite_index" (I know that wouldn't work, it was just an example for those who may still not understand.)

Is something like this possible in Game Maker? Does anyone have any suggestions? Am I getting worried for nothing about my original code?
I'd love to hear some input. :)

An RPG where YOU make the story!

16 February 2012 - 08:03 PM

Hello all. I am currently working on an RPG based off of the old Dataware game, Quest Creator. For those who never played it, this game allowed you to create a party of up to 6, and play quests that were either downloaded online and made by somebody else, or that you made yourself. You could use the same party in all these quests, allowing you to upgrade your characters infinitely until there were no further upgrades to obtain, and even then you could still play as many quests as your imagination could create.

Having always been a fan of games that give you the control and let you control your character's fate, I decided to take it upon myself to make a more modern remake of this game. Some changes I am already planning include an actual leveling system, (Quest Creator only allowed improvement by obtaining better gear/spells) much deeper character customization for both the party and the enemies (such as choosing elements of the character's past that will influence their stats, weaknesses, strengths, etc.) NPCs you can talk too, customizable level terrain, and possibly more of a "Final Fantasy" battle system rather than the current turn based one to allow for "safe zones" and such.

The best part is that I am going to create a site where parties and quests can be shared online. :D Also there will be a special section dedicated to the actual realm of the game world for those who prefer a more "lore friendly" experience rather than moving through random quests in a million different worlds. XD So if the game gets active enough, the fun will never have to end! ^_^

NOW the reason I have this here is because I would like the opinions of the community on a few questions I am currently debating. :) Feel free to answer some, or all of these as well as ask any questions you have yourself. :D

- The games name. (I am looking for something a bit more creative than "Quest Creator")

- Ideas for keeping the leveling system from being OP. (I am trying to come up with a way to keep it where someone couldn't just create a random quest with a creature that gives them 999999999999 exp with 1 hit point and max level instantly. -_- At the same time I don't want to restrict how much exp can be earned because if a fight is extremely difficult I want the rewards to be worth it. I could make it where the exp/money/gold/etc. is automatically decided based on the enemies stats, but I don't like the idea of taking control away... but maybe it would be the better choice? Idk. :/)

- Player/enemy variety. What different creatures, players, etc. would you like to either play or fight against. o.o I do plan to add characters from existing shows/animes to be possible, but just anything in general. (I cant think of a way to make a system to add your own characters without it being messy, expecially when distributing the quest or party, so I am just going to stick with pre-made sprites but as many of them as I can get. Freedom of choice is a #1 priority in this game.)

- Ideas to make the characters deeper.

- Anything in general you can contribute. :)

Image not changing in platformer

26 November 2010 - 08:43 AM

Hello. I am making a platform type of game and when I first designed it it was all in D&D from the bottom up. Eventually things got messy so for the first time ever I attempted to code absolutely everything in code instead. Things are great, working perfectly, except for one small problem...

For the player there are different sprites. I have sprites for running, jumping, attacking, and standing. When I programmed in D&D this was not an issue, but now that im programming in code, after successfully landing from a jump if the character should still be running forward, the sprites change into the standing sprites instead of the ones for running. I can't seem to figure out why it's not working properly, as I have it check the hspeed and if its anything besides 0 then it detects the direction and changes sprites accordingly. Heres my code.

/////////////////////////////////////////////////////////////////////
// Stops the player from attacking when the Space bar is let up.   //
/////////////////////////////////////////////////////////////////////

if playerattack = 1 //If the player is attacking
    {
    playerattack = 0 //make the player stop attacking
    if playerair = 0 //If the player is not in the air
            {
            if not hspeed = 0 //If the horizontal speed is not 0 (If the player is moving)
                {
                if playerdirection = 0 //If the player is facing left
                sprite_index = p_run_l //Set sprite to moving left
                else  //If the player is facing right instead
                sprite_index = p_run_r //Set sprite to moving right
                }
            else
            if hspeed = 0  //If the horizontal speed is 0 (The player is not moving left/right)
                {
                if playerdirection = 0 //If the player is facing left
                sprite_index = p_stand_l //Set sprite to standing left
                else  //If the player is facing right instead
                sprite_index = p_stand_r //Set sprite to standing right
                }
            }
    else  //If the player IS in the air when fatigue drops to 0
            {
            if playerdirection = 0 //If the player is facing left
            sprite_index = p_jump_l //Set sprite to jumping left
            else  //If the player is facing right instead
            sprite_index = p_jump_r //Set sprite to jumping right
            }
        }
            

I might be doing it wrong, im not sure. this is the first time ive messed with something like this. ^^;