Intel sponsors gamedev.net search:   
Adventures in Text-modeBy Twisol      
In order of no progress to done: Red, Orange, Yellow, Blue, Light blue, Green, Light green.

Last updated 2/12/09 at 12:01 am PST

Cripes! 2.0 -- See the Class Layout

Arenamatic Code w/ cConsole


Saturday, July 5, 2008
So far, this is what I have on Creditor. The menu's going nicely, as you can see, and whenever the mouse is placed over a menu item, the HandleMouseEvent function knows and changes the color of whatever is underneath it. Unfortunately it doesn't know what color it was before, so I had to hardcode the colors it changes between for now. Nonetheless, I think it's going pretty well so far!



The coordinate you see on the right is just there for debugging, it shows where the mouse is pointing at that moment. You can't tell, but the mouse is pointing at the 'd' in "Edit" in the picture.

Comments: 0 - Leave a Comment

Link



Friday, July 4, 2008
To make way for some functionality I'm implementing in the map editor (I think I'll call it Creditor), I had to go, ah, "under the HUD" to change a few details. One notable change is that the statinfo class stores a pointer to an "IStringable" interface, which defines an abstract ToString() function. This didn't require as much code change as I thought it would, which is good. I derived a Stat template class which defines its ToString() method as lexical_cast<string>'ing the stat and returning the result. If lexical_cast throws an exception, I return a blank string instead.

The root reasons for doing this is because (1) someone on IRC told me it was pretty limiting to only be able to use integers, and (2) because I wanted to be able to have my menu options as actual words, and be able to change their color or whatnot at the same time (DrawStatic is pretttty clunky for that).

I also made some fixes to some silly errors I made in the original HUD implementation. I had a cctor and an op=, but I was only copying the value of the buffer pointer over. They basically pointed to the same buffer after the operation. That's not good, especially because that would mean the two objects' destructors would delete the same memory twice. Idiot.

Comments: 0 - Leave a Comment

Link


My family and I did a Meet USC program yesterday. USC is the University of Southern California, and their Meet USC program is basically a three-hour tour, where the last hour includes talking with the admissions person at a specific school within the university. A little backstory before I go further:

For the longest time, I've wanted to go to Digipen. Sure, no problem, right? Well, a few weeks ago I stumbled across an article on Josh Petrie's blog - yes, that jpetrie - that weighed trade schools like Digipen against traditional universities. A whole lot of what he said made sense to me, and he had even gone to Digipen himself. So going along with the article, I decided to see what my options were.

Ironically - or perhaps poetically just? - the first university I saw was USC. I read up on it and it really looked like just what I wanted. I even managed to talk with an alumnus - on #gamedev no less! - and got his opinion on it. Better, they have a Computer Science degree with an emphasis on Games. It's still a CS degree, meaning I'm not really going for one of those game development degrees so many people have told me to stay away from... like Digipen's. Now, that is irony.

Fast forward to yesterday's Meet USC tour (which I signed up for about a week or so beforehand). It started with a presentation by two peple, one who was going to be a senior next semester and was double majoring, did overseas study, et cetera. The other was an admissions person for the university. They said some stuff about USC, went over applications, and other stuff. Did you know they have over 600 clubs at USC? Yeah. One of them was founded by Will Ferrel while he was there; it's called the Lizard Lovers. The admissions person also told us - oh, did I mention, we weren't the only ones at the Meet USC tour? :P - about an applicant who, when answering an "Explain yourself in three words" question, wrote "A sexy beast".

For the second hour we walked around the campus with a goofy, but nice and informative tour guide. Not much I remember about that hour, although that's when I learned the bit about Will Ferrel's club.

During the third hour, the group got split up according to the studies they wanted to do. We went with the Architecture and Engineering group because the Viterbi School of Engineering is the one that runs the Computer Science (Games) program. A guy who worked there sat down with us (only four of the original group were interested in Engineering) and talked with us about how things would work relevant to the Engineering classes. A lot of good information all around, but by then I was getting hungry. ;P

I absolutely enjoyed the Meet USC tour, and I've definitely decided that this is the university I want to go to. Yaay. :D

Now on to the next acronym. I have to take my SAT and some SAT Subject tests in order to apply. I already downloaded and did some of the SAT Practice Test, but I'm not sure I'm absolutely prepared for the actual test. But I have until October before the next SAT will be held, which is good. I bought an SAT study book from those Kaplan study book people today, and I'm having it shipped in 3-4 business days, so it should be here relatively soon.


Now, after my rambling about college and testing, I'm sure you want to hear more about Cripes. Right? Right? No? Too bad. I've made some changes to how I catch and handle input events, so I can handle mouse and keyboard events simultaneously. It's slightly reminiscient of the typical windows message loop with GetMessage/PeekMessage, which is, in my opinion, a Good Thing.

I'm also slightly surprised at how easy it was to set up simple HUD and GameView windows in the console, but that's kind of the point, anyways. I'll be using the HUD to display the characters and colors you can click to select. I might even make a small menubar at the top to easily load and save maps, and other things like that.


Alright, have fun reading all of that. And as always, comment nao!!

Comments: 0 - Leave a Comment

Link



Thursday, July 3, 2008
I had some annoying little problems that I, being the perfectionist that I am, had to solve before moving on to the map editor. Oops.

The inner class I mentioned was fun and interesting, and certainly a good idea in some cases, after I made some improvements I realized I didn't actually need it anymore. I moved its methods back into the GameView and it works fine again.

I also hit a small roadblock while tinkering with my Entity class, and deriving from it to allow for collision detection. (Somehow, I always get sidetracked...) Apparently, if your base class has a function overloaded at least twice, and your derived class only implements one of those, you can't call the other. You actually have to name the 'other' overload something else, basically meaning it isn't an overload any more. It feels really, really stupid. This relates to my Entity by way of the entity's position. I was going to derive Entity and add Move() functions that would only move if it didn't collide with anything, but then I realized that the position COORD would still be directly modifiable, allowing for a way around the collision detection. This isn't necessarily a bad thing, but on the other hand if you wanted to make an entity that went through walls sometimes, you could add a boolean "isGhosting" to your derived and do it based on that, still by using Move().

In short, I cut out the setter-Position() functions from the base Entity class, because Entity doesn't really need them; it's basically just an interface that provides the functionality GameView needs. And GameView doesn't need to change the position, only find out what it is for drawing - the user of the Entity is in charge of movement.


That said, the Entity isn't necessarily bound to the GameView. You could quite easily use it yourself without the GameView at all. However, in my case, when deriving from the Entity, I gave my new Body class a GameView pointer, so it can access the map layout of the GameView for collision detection. That's really at the user's discretion though (via deriving), so I wouldn't say that the Entity is coupled with the GameView.

Now, don't let me do anything else with Cripes before I finish the map editor! Sheesh :(

Comments: 0 - Leave a Comment

Link


All times are ET (US)

 
S
M
T
W
T
F
S
1
2
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

OPTIONS
Track this Journal

 RSS 

ARCHIVES
August, 2009
July, 2009
March, 2009
February, 2009
December, 2008
November, 2008
October, 2008
August, 2008
July, 2008
June, 2008
May, 2008
April, 2008
November, 2007
July, 2007
June, 2007
May, 2007
April, 2007
March, 2007
February, 2007
December, 2006
October, 2006
September, 2006
July, 2006
May, 2006
April, 2006