Jump to content

Sabre's Blog


Sabre

Recommended Posts

I accidentally hit alt f4... How do you do that!?

So now I better retype what I was gonna say.

What you are doing really should be done with class' I don't know if what you typed is part of a class, but I don't think it is, but it should be. If you REALLY don't wanna make it a class, then either of the methods you brought up should work, but both are not as good as a class..

Lets say you make the weapons class containing most of the stuff you put up, I wouldn't include the bullet penetration thing yet though.

Then you could Either make derivatives that are each weapon, which would be dumb unless you only wanted 1 exploding weapon in the whole game, or you could make categories of weapons as derivatives. make a bullet weapon class, an electric weapon class, and an exploding weapon class, or something like that, all of these being child classes of the parent class weapons

in the bullet weapon class you might add the bullet penetration factor, as well as anything else you wanted to add, the class would then have everything named in the weapon class, as well as the thing specific to bullet type weapons, bullet penetration.

in the electric you might add... I dunno, anything specific to electric weapons, whatever those are.

in the exploding weapon class, you might add explode radius.

Then you would make a class for each individual weapon, derived from the weapon category class. you would then fill all the variables of the things these weapons are derived from with values, as well as the variables each weapon has.

Rocket_launcher derived from exploding weapons, mebbe you would want to add an arc to your rockets, you would make the variable that controls that here, make the damage something high, make the explode radius whatever ect.

Grenade_launcher derived from exploding weapon class, you would add the variable for the downward acceleration of the grenade... 9.8 I guess.

gun that shoots electricity derived from electric weapon class... whatever vairiable an electric shooting gun might have, add that here

ak_40-7 derived from bullet weapon class I dunno what makes one automatic weapon different from the next, but whatever it is you'd put that here, as well as fill the penetration factor, damage, name ect.

Then you could make a pointer to the Weapons class. similarly done in the dragon example

Weapons* weapons_object[3];

weapons[0] = new ak_40-7(parameters!!!);

weapons[1] = new grenade_launcher(parameters!!!);

weapons[2] = new rocket_launcher(parameters!!!);

weapons[3]= new electric whatever gun(parameters!!);

Weapons* weapons_owned[]; <- I forget how to declare that as a vector, but you are going to want to make that a vector so you can change the amount of guns you currently own.

So now, if you wanna access the rocket launchers name, rather then goin like arrWeapons[0,1] you would type weapons_object[1]->Name; to get the name of it.

Also, I don't quite understand how the way you did it works now that I think of it, unless theres just a bunch a stuff i dont know about, you have an array with to integers, but your storing like... string and Boolean and junk. is that just a controller for a switch or something?

I really hope this is relevant to what you where asking.

Link to comment
Share on other sites

In the engine I'm using (and I assumed in programming generally) you can story anything in an array, provided you know what you are calling. All the parameters are stored in array, so

weapons[1] = new grenade_launcher(parameters!!!);

becomes

arrWeapon[1, whateverIsNeeded]

and the weapons firing class uses them

arrWeapon[WhateverWeapon, WhateverStat]

There is a class for weapons fire. My confusion was if (let's use Rocket Launcher for sake of argument) whther I should make a whole new class for rocket launcher, or just have it's own little bit of code in a switch. Making 3 child classes for the sake of 1 minor exception seems really pointless. While it might be the smart thing to do, for a weapon that probley won't even make it in, it's alot of work for a small payoff.

Link to comment
Share on other sites

There is a class for weapons fire. My confusion was if (let's use Rocket Launcher for sake of argument) whther I should make a whole new class for rocket launcher, or just have it's own little bit of code in a switch.

Firslty, I've only done c++ programming, I know all the languages ect are pretty similar, but some stuff might be different.

I'd say the choice is up to you, it doesn't really matter, which ever you think is easier, they both will probably work. I still think it would be easier to make the child classes and all that crap though, making the class's is super easy, and they make everything else involving the class so much easier, even if it is just a single gun, but again, up to you.

Any chance you'd be willing to send me the code or something though, cause I'm really confused as to how this is working, and even if I can't help, I'd like to see whats goin on,Also, what's you're game about ect? What Style? Side scrollin' shooter Fps? all that Jazz.

Another also, Earlier you stated that other people say you can't learn from a book, because they are bad books, I've learned everything I know from a book, a very crappy book, with mistakes in the code it provided, I think their crappyness is why the book worked so good, they make you really think and figure things out for yourself... For mindless hours that make you feel like killing yourself, but you get it really good in the end.

Link to comment
Share on other sites

Phew. Spent the day stuffing my face, so now I'm bloated, full and tired. I also spent it doing math. Trying to work out how to rounds per second into a number of how many frames before the weapon fires again. Turns out it was a simple case of devition, but I was doing it backwards. I'm not sure if computers calculate fractions of a frame, but it doesn't seem to do any harm so I will leave it for the time being.

Got my weapon switching system, but I have to have a extra 'dummy' weapon else the game flips out mid method which is weird.

As I add basic weapons Im thinking of adding a spread, but I have got to work out how to do it right. I would make it a simple random number of degrees between x and y but random is to clumpy and won't give the even spread I want. I'll think about it tonight maybe.

Link to comment
Share on other sites

  • 2 weeks later...

Official. People only care about logic, science and reason when it confirms their beliefs. This is an oppinion I have held for a while now, but I made it official when I critisized a study that said games were good for father daughter relationships, rather then counter my claims with logic, I was banned from the site in question.

My claims were not invalid. The study had potential bias, it also started with the assumption games were bad for you, and still held that belief if you had a penis, the data was subjective and the 4% different was not, imo, statisticly significant.

This is not new of course. I had a scientificly litterate guy claim his friend had a perpetual motion machine on his lawmower, a rational thinker that believed 911 was an inside job, and many many people that believe the cure for cancer is being supressed by 'the man' so they can make money off the sick and the dying.

It's a shame. I'm a fan of reason and scepticism because, on paper, it excludes all bias and delivers truth, but it appears to be used as just another form of dogma to say "I'm right and better then you."

Link to comment
Share on other sites

Making in game menus effeciently is harder then it first seems. :/

Also, I'm having a tough time sleeping. When I do I feel drained afterwards.

Link to comment
Share on other sites

Feeling better. I am also really starting to get the hang of this controller business. My main issue with UDK was I could never understand the circlar behavior of pawns, players and controllers. Now I have the hang of using controllers, if I ever go back to UDK it might make sence, though I doubt it.

So how does it work. Well, in the lowest, simplest way I'm going to say it like this. When you create a player character, it basicly poos out a couple of seperate, invisable, intanagable toasters that keep all the important stuff in them. This way, you don't burn your toast or lose it when the player character is changing or disappearing.

Why do this? Let's say you are playing mario and you turn into a status using the racoon suit. Instead of faffing on with a glitchy way of making mario stone, you simply have him vanish and replace him with a statue, and then swap him back later. The problem with this is that certain variables might also disappear. This could cause strange things like the HUD to disppear, or the AI to crash because they can't 'see' him. Technically you could do this in other ways, but it's no very effecient and much harder. It would be like digging a grave with a teaspoon. It's possable, but it's quicker, easier and less likely to break your tool to just use a shovel.

At pressent I have 3 controllers, and I plan on adding a 4th, but because I didn't plan on doing so I didn't use a good naming convention, something I quickly fixed today. I also worked on my buttons some, now they all look better and use less screen space, although there is still work to do. I love inheretence behavior.

Link to comment
Share on other sites

Making in game menus effeciently is harder then it first seems. :/

Also, I'm having a tough time sleeping. When I do I feel drained afterwards.

I'm hoping to get away with a menu that just says start, and a pause button with no options :lol: also whats the hard part about making a menu? I haven't made any yet, so I'm at the it first seems, which is seeming pretty easy, also never heard of controllers, and they sound useful, I wish to know more!!! Are they exclusively for the Unreal Development Kit thing?

Also... Seconded on the sleeping thing...

Link to comment
Share on other sites

Controllers can be used in any game. Simple things like selection, highlighting stuff, doing things without having millions of lines of code.

In other news, apparently some of the weird things happening to me have an explaination. The difficulty sleeping, the constant tiredness, what DZ charmingly calls "crabbiness", my lack of motivation, the way I don't find games fun any more, the feeling that I'm stuck in a hopeless situation and the general feeling of meh are all apparently signs of depression. I'm not sure myself, especially since mental problems are impossable to self diagnose.

Depression is a dumb condition anyway since the way it shuts people down makes it impossable for them to escape it. eg. If you are depressed about a broken cd player, you lose the will and energy to fix the cd player. Very dumb indeed.

Link to comment
Share on other sites

Damn artists. At first I had a friend who was going to to do all the art and assests for the game I'm working on, but he has started working on other stuff as if he somehow forgot a project he wanted to work on. It was something I expected, but a disappointment. So, I decided to commission a guy I really like to do concept stuff. He is really good at doing powerful females and anthros. His slots were full at the time and I was waiting for his current workload to clear. However, he has finished college and got an "Intership" which seems to be the American/Mexican way of saying apprenticeship. Meaning no art for six months.

There are other artist I had lined up for story scenes, but they tend to favour the skinny and usually have some kind of pollacy against what I need. eg. won't gore, won't draw cities, ect.

I know people are unreliable, but I can't tell if artists are even more so.

Since I've mentioned him. The artist I like who does powerful females is called Predaguy. He has some adult stuff on his FA, but his DA is clean. If you want to know what I mean by powerful females, check this out.

http://predaguy.deviantart.com/art/Anthosaurs-Fem-Carnotaurus-164392656?q=gallery%3Apredaguy%2F5740957&qo=13

and this

http://predaguy.deviantart.com/art/Anthrosaurs-Fem-Ankylosaurus-96204203?q=gallery%3Apredaguy%2F5740957&qo=3

and how about

http://predaguy.deviantart.com/art/D-Yana-Swamp-Patrol-159180973?q=gallery%3Apredaguy%2F24777&qo=56

and of course, his guys, his comics, all of it amazing.

Tomorrow I will be installing the new DVD drive I got yesterday. If I go dark, it will likely be a major cock up, I doubt it though.

Link to comment
Share on other sites

  • 2 weeks later...

Splashed out on the paid version of Game Maker. Spent the last maybe hour or so debuging and coding my melee attack not knowing why it went all wonky based on what direction your facing. After lots of clever coding I wasn't getting the results I wanted. Turned out the sprites origin point was in the corner rather then centre. Now my melee attack is working, just needs some refinement. Possably a lunge, but I don't want the player accidently lunging into an enemy.

Next stop, reading up on AI past and present to decide which would be best for my needs and where things can be improved.

Link to comment
Share on other sites

×
×
  • Create New...