Midnight randomness

Posted by Glen on Oct. 21, 2010, 11:03 p.m.

So it's 5 til midnight in my area and I feel like making a blog. Here's a bunch of random questions and updates to spark a convo.

1. Is anyone in the process of making an RPG? I'd be interested in testing it.

2. Can someone delete Ancient Ants Adventure from my "Favorite Games" list? The game doesn't exist in the database anymore and the option to remove it is not there because of this.

3. Have any of you played Final Fantasy 1 for the NES, not the ds/psp remake? It's so much fun. I'm about 1/4 done with it.

4. Do any of you like Tacos? I just woke up from a dead sleep thinkin tacos and immediately drove to Taco Bell and got me some delicious Chalupas. I think i'm good now. I might be able to sleep knowing that my stomach has been satisfied to no end.

5. Does anyone like the bright banner I found? I'm aware that it might hurt some eyes, but I thought it looked pretty.

6. Thinking about continuing a story I began to write in January. I don't know if any of you remember me starting a project called Ember Skies? It was originally going to be an RPG. I have 3 chapters + a prologue written. Might continue it.

7. I fail at staying on track when it comes to my online game "Aeon". Just thinking about writing online code makes me wanna go to sleep.

8. Got a B on an exam today. Music Appreciation. Basically a class on Musical History and origin. Classic stuff. Totally guessed on it. Pretty proud of myself. All I do is draw abstract and vector art in my notebook in class.

9. So I met this girl a few weeks ago and we've been getting really close. She has a bf though. The chick kept coming up to me, and kissing me, and trying to get her bf to break up with her. Then I find out that she "has" to get married in a year and stay married for 5 years so she can get her citizenship in the US…. smile and wave? Told her to stop cheating on her bf. Talk to me in 5 years.

10. Last but not least. I have a thing for triangles. They look awesome. ▲

Comments

Castypher 14 years, 2 months ago

Don't be afraid of using sprites. If you're doing everything with draw_line, then sure that's commendable, but it's also a slow process, and has the potential to make you lose focus or drop the game altogether.

I'm just making assumptions here, by the way. Regardless, it's still advice.

My pause menu is only about 200 lines in the draw event, with plenty of label comments (so I can get to where I need to quickly), and no scripts. Especially for inventories, I abuse arrays and for loops. It's a little more prone to failure but in the end it's a lot faster, not to mention it's good practice.

I haven't seen your games, Rob, so I'm not going to guess how efficiently you code. Aside from that, it's completely situational. And although you didn't ask for my advice, 1000+ lines of code for something like that has to be ridiculously hard to navigate. Good luck.

Besides, coding solely for efficiency is for losers. And Serprex.

Rob 14 years, 2 months ago

It's partially sprite-based, and partially line-based.

Quote:

I abuse arrays and for loops.

Hah! If I didn't do that it'd be soooo big. I've got loops in loops with variables in arrays in arrays :P

That's with 2 skill trees combined with a tabbed inventory system.

I could show you the code for the draw event if you wanted…

Castypher 14 years, 2 months ago

Skill trees, huh? Yeah, I can see how that might be an issue. Also, things like the inventory gave me trouble for quite some time until I just set aside a few hours to focus on it.

The system I use is a data structure (map) to hold item values and amounts, and a two-dimensional array to hold things like item type, description, name, attributes, etc. Funnily enough, the complicated bit is saving all that.

Now where I'm stuck in the pause menu is a duplicate of the inventory system, to hold mission progress and such.

Also, 1000 lines of code won't be necessary. Screenshots might. I'd like to see how your menu looks. Probably more advanced than mine, because there's only so much you can fit into a 320x240 screen.

Rob 14 years, 2 months ago

I just tried your game. My inventory's mouse-based, as opposed to yours which is more reminiscent of an old console or GBA game. The game's on my netbook, so I'll boot that up and get the source off there I guess.

Castypher 14 years, 2 months ago

My game was originally half-mouse, half-keyboard, but there weren't enough cues to signal that they should switch to the mouse. Besides that, I was trying to go for a GBA-styled game, hence the tiny screen. So I just went with a quick keyboard scheme.

By the way, the inventory presented in that demo was completely useless. In fact, I changed everything to match the demo only. You have no items, you have no experience. All you should see are your levels and skills.

Don't get the wrong impression from something I threw together for the sake of a combat demo. Since it doesn't need the quest or achievement system, they aren't in there. And obviously the inventory isn't there.

Rob 14 years, 2 months ago

I was in the middle of changing the size of everything in the menu, so some things are still at the old size. (I had to change it by about 8-16 pixels or something, in order to fit in a shopkeeper's menu beside it when you're buying stuff.)

Also, there's a lot of debugging text there too, so it's not in a very pretty state…

Castypher 14 years, 2 months ago

So do you have the scrolling working yet?

Looks like a solid layout. A mouse-based system complicates things a bit, but once you get it working, it has a lot of versatility, I'm sure.

I know this is an unfinished menu, but I figured I might say this anyway. The only thing I can point is, while that font is cool and all, it might be better replaced by something else. The color scheme could probably use a little variation too, or at least making the black lines blend a bit better. Other than that, I like the textures and the layout.

So that's your 1000 lines, eh? What you haven't explained yet is why you need 2000 for variable declaration. Just out of curiosity.

Rob 14 years, 2 months ago

Oh. That's only like 400 lines or so. There's still the skill trees and other menus.

As for the declaration, I've got arrays for storing all the values of equipment, different spells, etc. (What levels you need for them, how much mana, what the attakc sare, etc….)

I'm sure there's another way, but whatever… it works.

And about the font. It's only temporary. If you can find a more legible font that still has a medieval RPG style to it, then I'll use it. I should probably finish resizing the menu today, so it isn't so damned ugly and overlapping.

Castypher 14 years, 2 months ago

You're using arrays? Tell me you're using a two-dimensional array at least. One-dimensional arrays might be too much work. For example:

  itemValues[2,0]="Stick";
  itemValues[2,1]=1;
  itemValues[2,2]=10;
  itemValues[2,3]=1;
  itemValues[2,7]=1;
  itemValues[2,9]="A simple stick";

The first value is the item ID. In this case, it's a stick. The second value is the item attribute ID. For example, attribute 0 is the textual name, attribute 9 is the description, 2 is the attack modifier, and the others would take too much explanation to make an example out of.

Use a multidimensional array for storing things like item/spell/quest data. Then when drawing them, do something like:

draw_text(0,0,string(global.itemValues[2,0]));

This way, you can focus on bulk, instead of setting an array variable for every item.

How far along is your game? I'm actually interested in seeing it.

Rob 14 years, 2 months ago

It's not very far along at all. I've got one room with some spiders. You can only attack with swords and daggers right now, and only about 1/3 of the spells work. (Work as in have effects - none of them do damage yet.)

It's a mix of one and two dimensional arrays. I was originally going to use stuff like that, but I found having single dimensional ones to be a lot more.. descriptive and obvious, especially after not working with the source for a while. I do use them for the damage modifiers though, since my weapons have separate STR, DEX, and SKILL attack modifiers. E.g. a hammer will scale better with STR, but a dagger will scale better with DEX, and throwing star with SKILL.