Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - newwaveburritos

#261
I've maybe gotten ahead of myself for a little Easter egg that probably no one will care about but it's a fun idea I've been enjoying implementing. That is, I decided it would be fun to add a game within a game and since mine takes place in the late 80s a first-person dungeon crawler on the home PC seems like the kind of thing you would have been playing.  I've managed to make it work but it seems unnecessarily labor-intensive and I'm repeating a lot of code that maybe doesn't need to get repeated this way.

In the mini-game room the player switched to a little pixel arrow I use to track the player's position on a little maze I have plotted out.  The little pixel arrow is controlled tank style with the arrow keys and moves around a walkable area inside the maze.  I track the direction the pixel arrow is pointed as well as its x and y coordinates on the room screen.  Then, I use those to display the appropriate background image of what corner or hallway of the dungeon the player would be seeing.  Now, I could just do it like this but that's hundreds of permutations even for a relatively short maze.  I have the first tile below which I put together as a proof of concept.  So, I know enough to get myself into trouble but not really enough to do this in any intelligent way.

Code: ags

  if ((player.x==3)&&(player.y==3)&&(CardinalDirection==4)){  //in the room's repeatedly execute
    DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
    surface.DrawImage(0, 0, 24);
    surface.Release();
  }

  else if ((player.x==3)&&(player.y==3)&&(CardinalDirection==3)){
    DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
    surface.DrawImage(0, 0, 23);
    surface.Release();
  }

  else if ((player.x==3)&&(player.y==3)&&(CardinalDirection==1)){
    DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
    surface.DrawImage(0, 0, 22);
    surface.Release();
  }

  else if ((player.x==3)&&(player.y==3)&&(CardinalDirection==2)){
    DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
    surface.DrawImage(0, 0, 25);
    surface.Release();
  }


As always thanks for your help!
#262
Hey, this looks great and it's super exciting to see a combat system in an adventure game.  Of course, my earliest loves were also weird hybrids of the genre like Quest for Glory and the abovementioned Betrayal at Krondor so it's fun to see new crossovers and mashups.  I'll follow you on Twitter, too, but I don't see your handle posted here anywhere.  Good luck with your game and let me know if there's anything else I can do to help.
#263
AGS Games in Production / Re: Kola Queen
Mon 02/08/2021 00:35:35
Quote from: javixblack on Sun 01/08/2021 19:00:32
this will be a commercial game?

I haven't quite decided if I want to make it a "pay what you want" or just straight up charge a somewhat nominal amount.  I'm shooting for about four to six hours of gameplay.
#264
I'm not really sure why I was merging to begin with.  I don't know why I would do that.  I guess I should watch some videos on how to use GitHub without ruining your projects!
#265
I can link you to the GitHub but I don't know how useful that's going to be. I feel like I should just take this as a could-be-worse lesson in gamedev. It seems like a big ask to have someone else pore through it.
#266
Oh, thanks!  I'm sure this will come in useful.  It's a real learning experience, too.
#267
I'm not sure exactly what I did but I was working last night to fix some stuff and I got a little over my head and decided to revert back to a previous commit so I could start over.  I'm not exactly sure what I did wrong and while I have been making commits fairly regulary I don't actually revert very often.  Somehow I managed to screw everything up and I had a few conflicted files in the merge and now when I try to load the game I get this error.  I can go back to a previous previous commit so all is not lost but it doesn't really add up there either because the name of the commit explaining what I did isn't even present in it so I'm at a bit of a loss.  I think I've gotten over the panicking but it would be great to be able to claw back some of this work.

#268
Okay, this makes sense.  I'm not super clear on using structs to keep everything organized although, in theory, it does make sense.  I've just been using the journal itself to track it when testing.  I do have kind of a lot of characters to track so maybe I should try this.
#269
AGS Games in Production / Re: Kola Queen
Thu 29/07/2021 06:04:18
Just a quick update to let you know that I'm still working on the game just about every day in my spare time.  It's starting to take shape and I can reasonably assert that it will indeed be ready this summer.  I signed up for the AGS Forum almost exactly a year ago so I guess I missed that deadline but I've learned a lot and I think Kola Queen will be the better for it.  You can also follow me on Twitter www.twitter.com/PlayKolaQueen

Here's some new art.  The bar you hold dear in your heart and hang out in every night after work.

#270
So, I've got a journal in the game, and as you meet and get to know people in the game your "friendship level" so to speak increases.  Well, after scripting quite a few I realized it would be a good idea to give the player some feedback that something in their journal has changed so I had the idea to play a sound.  I could search through and find every instance of "ChefRomanFriendshipPoints++;" et al but I think it might be easier to have a couple of lines of code that plays the sound when anything changes.

I have a hunch that someone is going to tell me that this is exactly what for loops are for and how come I haven't actually learned how to use them yet.

Thanks again, everybody!!
#271
I just played Train to Amber Coast and I agree.  Very charming and recommended. 
#272
I recently cleaned house on the global variables since mine were also getting a little out of control.  I found quite a few I had written before I really understood what I was doing and could be deleted or changed to what I guess you would call "room variables" in order to keep the list a little tidier.  It was a bit arduous but I felt good about it afterward even though the list is still kind of a mess.  I've also learned that inventory items and regions turning on and off and Game.DoOnlyOnce can act as variables for a lot of the things I was tracking in the game.  But I am also not really doing a lot of advanced work.  I'm sure I'll read this again in six months and think of myself as a sweet summer child.  I'm not sure if this is really helpful or not but maybe a little.  For what it's worth you can also count the variables you can see in the window and notice where it falls when scrolling all the way down and do a little math.  I can see 26 at a time so if I have four "screens" there's about 100.
#273
I'd be curious to see your work on this, Hobbes, as I was planning something kinda similar for the next project.
#274
Dang, the animation all looks so good! I think I said that already but now I've seen more of it and it's even truer now.
#275
This also works. 

Quoteyou don't check for eModeWalkto but a left click on an empty spot.

This is what I missing and couldn't wrap my brain around.  Thanks for the help.
#276
This works perfectly and doesn't complicate anything.  Thanks so much!

...now I guess I should go disassemble that weird GUI...   :-[
#277
I've been screwing around with this for a few hours now and I'm close to a solution but I haven't quite nailed it yet.  I have a bar in the game where the character will sit and while the character is seated I want the player to be able to click on any hotspot in the room but I do not want the player to be able to walk anywhere and right now any click around that does not fire a hotspot will take the player back to the first frame of the sitting at the bar view and try to walk there.  I'm using the BASS template.  I know that this has something to do with putting a ClaimEvent() somewhere but I can't seem to put it in the right spot.  All I really want to do is not have the player try to walk anywhere until they stand up. but I think I might be calling things in the wrong spot.

Code: ags
function on_mouse_click(MouseButton button) {
  if (!SittingAtBar) return; // -> exit function here
  if (mouse.Mode == eModeWalkto) {
    ClaimEvent(); // prevent standard click handling, nothing further will happen
}


This just makes it so no click works and you can't actually click on anything.  SetGameOption(OPT_NOWALKMODE, 0)
  Mouse.DisableMode(eModeWalkto) aren't working for me either, probably because I need to use them in conjunction with the ClaimEvent()?  It's the click processing done by the scripts further down the chain that I think are giving me problems.

I was using a workaround by making a GUI that was really just intercepting all the clicks and just put buttons over where the other characters were sitting but that wasn't ideal because I realized I would need to make a separate GUI for each permutation of characters at the bar and also this got rid of the Action Bar which was a bit weird so I decided to actually solve the problem instead of using GUI buttons to workaround everything.  Thanks again, everybody!
#278
Personally, I wouldn't make the player return everything they have picked up just for failing to pay.  That seems like a design choice that doesn't serve much purpose other than to annoy.  That they will learn that they need to pay without losing the items I think would be sufficient.  Also, it would be a lot easier since you wouldn't have to code that.  To make it so they can't leave before paying you need to make a variable and attach it to the exit event whether it's a room edge or a hotspot or whatever.

Code: ags

if (StoreClerkPaid == true){
  cStoreClerk.Say("Thanks for your purchase!");
  player.ChangeRoom(2);  //or whatever the next room is
}

else {
  cStoreClerk.Say("Hey you can't leave without paying, buddy!");
}


To make a variable you can put it into the Global Variables window and set its initial value to false then when you pay the Store Clerk you change its value to true.  If you don't need to use it again you can just declare it in the room script which will help you keep your Global Variables uncluttered but it's probably easier just to make a global variable for now until you get more comfortable coding stuff.


Add this to the paying the Store Clerk event:

Code: ags

StoreClerkPaid = true; //this assumes the global variable you created was a bool and called StoreClerkPaid


Also remember that once it's true it will always be true unless you put some code in there somewhere to make it false.  If that's the case you will need to set the variable each time the player goes back to the store and selects something that needs paid to be for like in the event for picking up the item in the first place.  That way they can enter the store and leave freely without the Store Clerk stopping them.

I would recommend watching Densming's AGS tutorials on YouTube.  You can really learn a lot from them.  https://www.youtube.com/watch?v=1Ml_DR76Cl4&list=PL21DB402CB4DAEAEF
#279
Quote from: Matti on Mon 19/07/2021 01:11:36
Does it work if you use Game.InventoryItemCount instead of invCustom.ItemCount?

This code gets rid of everything but the last item marked "Cooking."

Code: ags

for (int i = 0; i < Game.InventoryItemCount; i++) {
  if (inventory[i].GetProperty("Cooking")==true){
    player.LoseInventory(inventory[i]);
  }
}


The post linked by Cassiebsg though provided a clue though that if I change it to:

Code: ags

for (int i = 0; i <= Game.InventoryItemCount; i++) {
  if (inventory[i].GetProperty("Cooking")==true){
    player.LoseInventory(inventory[i]);
  }
}


it does what I want it to and purges all the correct inventory items.  I added an item after the last one just to be sure and it stays in the inventory so I think this is working as intended.  Thanks for all your help, everybody!
#280
Oh, I saw this on Twitter the other day.  It looks good!  I'm a big fan of games with fun dialogue and it looks like you've got plenty of that.  Exciting stuff!
SMF spam blocked by CleanTalk