Welcome, Guest. Please login or register.
August 03, 2015, 11:35:12 PM

Login with username, password and session length
Search:     Advanced search
Check out the latest RPG news!
363116 Posts in 14735 Topics by 2288 Members
Latest Member: Wallflower
* Home Help Search Login Register
  Show Posts
Pages: 1 ... 435 436 [437] 438 439 ... 614
6541  Media / Single-Player RPGs / Re: Which series has gone the longest without a dud? on: September 19, 2009, 06:25:33 AM
Prerendered backgrounds, by nature of being a static image, would really, really cut down on GPU costs.

And by nature of being static they're not appropriate for anything first person.

What ever happened to voxels?
6542  Media / Single-Player RPGs / Re: I can make games? Journal on: September 19, 2009, 02:47:12 AM
Okay. A union is a type, where all the members are stored in the same place in memory, and as such only one can be accessed at any time.

The Actor type i my base class here. It contains, among other bits of data, a class identifier integer and a union of type actorClass.

How this works is that the loadActor function in actorClassHandler sets one of the pointers in the union to a new whatever, and it can *NEVER BE CHANGED AGAIN*. and the other things in that union aren't accessible either.

The class identifier is an integer specifying what class is supposed to be in there so you know which element of the union to access.

So basically I can store every actor in a single array and use the ActorClassHandler to perform some very general actions on them (loading them, searching through them), and then check their identifier and access the proper element of the union to do more specific things.

It's not perfect but it works. I could probably do something more graceful with operator overloading.

---edit---

Bought a book on XNA. Started working through it. C# is more businically viable than FreeBASIC.

---edit2---

I have to admit, this XNA stuff is inspiring me. Also, I realized that my class structure in Quogue is essentially mimicking namespaces. Some of the things are still sort of tricky since FreeBASIC lacks real, uh, polymorphism though, meaning I really wouldn't want to embed update and draw functions in ever object.

The gameComponent system seems particularly elegant.

It seriously feels fucking good to be working through a *book* instead of something online. The feeling of paper is *amazing*.

---edit3---

worked on quogue. This is my movement code. It has a bunch of crap in it to accomodate jumppads and (eventually?) rocket jumping and weapon kickback.

Function findOpenSpace(direction As Integer, distance As Integer, x As integer, y As Integer, testCollision As CollisionLayer) As Integer
    Dim i
   
    Rem This is a flag that checks to see if movement is blocked
    Rem in a given direction so that like a player can't be shot
    Rem through walls. Say the move distance is 3 and the map looks like
    '. <-
    '#
    '.
    '@
    'Rem the player would land in the marked space even though they're blocked
    Rem unless I check this.
    Rem explicity checking for a blocked flag might not be necessary... after all.
    Dim blocked As Integer
   
    i = 0
    blocked = 0
   
    Select Case direction
        Case NORTH
            Rem This first loop checks for obstructions.
            Rem I starts at 0, as it is possible to not move at all.
            For i = 0 To distance Step + 1
                Rem Make sure the distance is in bounds. If not, parse it as an onstructoin.
                If (posY - distance < 0) Then
                    distance = i
                    Rem Exit the for loop. This goes out from the player. Further obstructions are irrelevant.
                    Exit For
                ElseIf (testCollision.wall(posX, posY - distance) <> 0) Or (testCollision.actors(posX, posY - distance) <> 0) Then
                    Rem i how far till the player hits something, and is the real max distance.
                    distance = i
                    Exit For
                end if
            next
           
            Rem Check for the actual distance.
            For i = distance To 0 Step - 1
                Rem check to see if the position at distance i is clear. If so, return i.
                If (testCollision.wall(posX, posY - distance) = 0) And (testCollision.actors(posX, posY - distance) = 0) Then
                Return i
            next
           
        Case SOUTH
            For i = 0 To distance Step + 1
                If (posY + distance < 0) Then
                    distance = i
                    Exit For
                ElseIf (testCollision.wall(posX, posY + distance) <> 0) Or (testCollision.actors(posX, posY + distance) <> 0) Then
                    distance = i
                    Exit For
                end if
            next
           
            For i = distance To 0 Step - 1
                If (testCollision.wall(posX, posY + distance) = 0) And (testCollision.actors(posX, posY + distance) = 0) Then
                Return i
            next       
       
        Case EAST
            For i = 0 To distance Step + 1
                If (posX + distance < 0) Then
                    distance = i
                    Exit For
                ElseIf (testCollision.wall(posX + distance, posY) <> 0) Or (testCollision.actors(posX + distance, posY) <> 0) Then
                    distance = i
                    Exit For
                end if
            next
           
            For i = distance To 0 Step - 1
                If (testCollision.wall(posX + distance, posY) = 0) And (testCollision.actors(posX + distance, posY) = 0) Then
                Return i
            next
           
        Case WEST
            For i = 0 To distance Step + 1
                If (posX - distance < 0) Then
                    distance = i
                    Exit For
                ElseIf (testCollision.wall(posX - distance, posY) <> 0) Or (testCollision.actors(posX - distance, posY) <> 0) Then
                    distance = i
                    Exit For
                end if
            next
           
            For i = distance To 0 Step - 1
                If (testCollision.wall(posX - distance, posY) = 0) And (testCollision.actors(posX - distance, posY) = 0) Then
                Return i
            next                 
           
    end select
end function

Rem I think this is done but I don't have a clue if it works.
Function Player.move(direction As Integer, testCollision As CollisionLayer) As Integer
    Rem Store the last valid X and Y positions.
    this.lastX = this.posX
    this.lastY = this.posY
   
    Rem Move the player, either automatically or based on keyboard input,
    Rem with preemptive collision detection.
    If this.autoMoveFlag = 1 Then
        Select Case this.autoDirection
            Case NORTH
                this.posY = this.posY - findOpenSpace(autoDirection, autoSpeed, xPos, yPos, testCollision)
            Case SOUTH
                this.posY = this.posY + findOpenSpace(autoDirection, autoSpeed, xPos, yPos, testCollision)
            Case EAST
                this.posX = this.posX + findOpenSpace(autoDirection, autoSpeed, xPos, yPos, testCollision)
            Case WEST
                this.posX = this.posX - findOpenSpace(autoDirection, autoSpeed, xPos, yPos, testCollision)
        end select
       
        this.autoMoveTimeout = this.autoMoveTimeout - 1
        If this.autoMoveTimout = 0 Then
            autoMoveFlag = 0
        end if
   
    Else
        Select case direction
            Case NORTH
                Rem Make sure that the wall and actor collision layer are clear. If they are, move the player.
                If testCollision.wall(posX, posY - 1) = 0 And testCollision.actors(posX, posY - 1) = 0 Then
                    this.posY = this.posY - 1
                end if
            Case SOUTH
                If testCollision.wall(posX, posY + 1) = 0 And testCollision.actors(posX, posY + 1) = 0 Then
                    this.posY = this.posY + 1
                end if           
            Case EAST
                If testCollision.wall(posX + 1, posY) = 0 And testCollision.actors(posX + 1, posY) = 0 Then
                    this.posX = this.posX  + 1
                end if           
            Case WEST
                If testCollision.wall(posX - 1, posY) = 0 And testCollision.actors(posX - 1, posY) = 0 Then
                    this.posX = this.posX - 1
                end if               
        end select
    end if
end function
6543  Media / Single-Player RPGs / Re: I can make games? Journal on: September 19, 2009, 02:38:50 AM
I should learn XNA. It looks like it removes some of the retardation from C++.

Quote
I was wondering how you were able to attempt polymorphism and all that with FreeBasic...

Sort of. Virtual functions aren't hard. You just need function pointers to simulate it. The "pointer to base class can take subclass" stuff I sort of worked out. I found two solutions on the forums. One involved stuff with typecasting I didn't get. The other one was fairly easy. I'll put my current code up later. I have no idea if it works, mind, as I've never compiled it yet, but it should.

Quote
you have experience!

??? I've been using FreeBASIC for like two weeks.

Anyway, that code I was talking about. I'll post an explanation in a new post.

#ifndef ACTOR_TYPES
#define ACTOR_TYPES

Rem Done - class and fmethods.
Type SpawnPoint
    Declare Constructor (Dim _x As Integer, Dim _y As Integer)
   
    Rem Essentially, a spawn point is a map object that holds a
    Rem valid place where a player can spawn.
    Dim posX As Integer
    Dim posY As Integer
   
end type

Rem Done - calss and methods.
Type Jumppad
    Declare Constructor(Dim _direction As Integer, Dim _distance As Integer, Dim _speed As Integer)
   
    Rem How far the player moves when launched.
    Dim distance As Integer
    Rem The direction the player moves in when launched.
    Dim direction As Integer
    Rem Speed at whic ha player moves when launched. 0 means instantenous teleportation.
    Dim speed As Integer
   
    Rem Defines what happens when the player steps on the jumppad.
    Declare Function collisionEvent(ByRef activePlayer As Player) As Integer
end type

Rem Done - class and methods.
Type Pickup
    Declare Constructor(Dim _itemType As Integer, Dim _respawnTime As Integer)
   
    Rem Signifies what type of item the pickup spawns.
    Dim itemType As Integer
    Rem When set to 1, the Pickup currently has an item spawned and
    Rem the countdownTimer is not updating.
    Dim active As Integer
    Rem The amount of time it takes to re-spawn a particular pickup.
    Dim respawnTime As Integer
    Rem Initially set to respawnTime, reduces each turn and when it hits
    Rem zero, reactivates the pickup.
    Dim countdownTimer As Integer
   
    Rem Controls timer countdown.
    Declare Function reduceTimer() As Integer
   
    Rem Event that happens when the timer hits zero.
    Declare Function timeoutEvent() As Integer
   
    Rem Event that happens when the player steps on the pickup.
    Declare Function collisionEvent(ByRef activePlayer As Player) As Integer

end type

Rem Done.
Union actorClass
    uJumppad As Jumppad Ptr
    uPickup As Pickup Ptr
    uSpawnpoint As Spawnpoint Ptr
end union


Rem Done - class and methods.
Type Actor
    Rem Each actor has a unique ID to facilitate collision detection.
    Dim ID As Integer
    Rem Number identifying which class the Actor represents.
    Dim class As Integer
   
    Rem Union stores a pointer -- and only one pointer -- to the Actor's specific 'class'.
    Dim classType As actorClass
end type

Rem Done - class and methods.
Type ActorClassHandler
    Rem Array storing ever actor in the game.
    Dim actors(1 to MAX_ACTORS) As Actor Rem Dim actors(1 to MAX_ACTORS) As Projectile
   
    Rem The last ID assigned. Always assigns this + 1 + MAX_PLAYERS
    Dim IDBase As Integer

    Rem Returns a pointer to an actor.
    Declare Function locateActor(lookupID As Integer) As Actor Ptr

    Rem Load actors into memory.
    Declare Function loadActor(classID As Integer, actorData As String) As Integer
   
end type

#endif
6544  Media / Single-Player RPGs / Re: Which series has gone the longest without a dud? on: September 18, 2009, 06:10:55 PM
She's trying to defend her opinion even though it's already been shot through a million times and slipping further into incoherence. I know because I used to do the exact same thing before I realized that if you just START OUT completely incoherent your argument is too bizarre to be argued anyway.

Quote
"dinosaurs are a test of faith by God"

Dunno about you but I was in DC this spring and all the dinosaur skeletons kept trying to sell me hookers (at least half of which were triple-breasted gay pandas).

Quote
"Obama is killing your grandmother"

You know I can't say I'd promote outright killing her because I'm just too nice but shipping that psycho off to some colony on the moon...
6545  Media / Single-Player RPGs / Re: Which series has gone the longest without a dud? on: September 18, 2009, 04:07:58 PM
Quote
whats ridiculous about it? because my opinion doesnt match your own?

It's ridiculous because your opinion is wrong :(
6546  Media / Single-Player RPGs / Re: Looking for action RPGs on: September 17, 2009, 11:01:25 PM
Quote
didn't people complain about the platforming in Xenogears?  Perhaps that's why there aren't many (any?) action RPG's with that graphic style.

XG's camera was fine.

Getting into a random battle mid-jump and falling all the way down that goddamn tower, on the other hand, was not.
6547  The Rest / General Discussions / Re: Oh no, it had babies :( on: September 17, 2009, 09:15:04 PM
Quote
Because that's too much awesomeness for you to handle without going insane?

Dude it already has Lu Bu and Guan Yu. I and of itself that's pushing the limits of too awesome to handle. You add gay pandas with three giant breasts into the mix and we're talking like a resonance cascade unleashing its kundalini while popping collars and eating mentos.
6548  Media / Single-Player RPGs / Re: Looking for action RPGs on: September 17, 2009, 09:12:14 PM
Quote
is Chrono Trigger

CT's tile based and not an action RPG.
6549  Media / Single-Player RPGs / Re: Looking for action RPGs on: September 17, 2009, 11:16:17 AM
Devil Summoner 2, Legend of Mana (I don't think its tile baseed), Ращид Ноцжнеко Плаыс Ит Саже, Brave Fencer Musashi, Summoner 2, Vampire the Masquereado: Blooldines , Ookami, King's Field, Ultima Underworld 1 and 2, Morrowind a little bit, I guess the other TES games....
6550  The Rest / General Discussions / Re: "All Games becoming RPGs" Topic on: September 17, 2009, 11:10:42 AM
Menus are an interface element and should not be used as a gameplay element. I mean maybe you could try it as an experimental concept in a small, one-off thing, but...

Also I'm a licensed CS major I took an interface class I know this shit. See that S? It stands for Science. i will goddamn science you. Do not contest. Do not step in grills. Do not be harshing mellows.
6551  The Rest / General Discussions / Re: Oh no, it had babies :( on: September 17, 2009, 11:07:25 AM
Wait the latest ROTK had gay bear hookers with massive boobs and burning women?

Why have I never played this series before?
6552  The Rest / General Discussions / Re: Mary Travers Passes On on: September 17, 2009, 11:06:28 AM
This always happens in three's. Who's next?

---edit---

http://en.wikipedia.org/wiki/Troy_Kennedy_Martin

Well there we go.
6553  The Rest / General Discussions / Re: Yeah, that's a good reason for a divorce. on: September 16, 2009, 10:40:10 PM
That sounds like the kind of guy you find a few months later living in an apartment that's completely trashed, and he's writhing in a bathtub full of stuff-best-not-mentioned, holding a broken saxophone, and wailing incoherently.
6554  Media / Single-Player RPGs / Re: Nostalgia on: September 16, 2009, 07:41:52 PM
I think what's important is how it's balanced. Old-school-styled RPGs live or die by it. At it's core, I mean, SMT: Nocturne is about as oldschool as it gets, but it doesn't feel like it because it's perfectly balanced.

And seeing as Nostalgia is coming from the FF3 and 4 remake guys apparently, I pretty much have no hope for it at all :(
6555  Media / Single-Player RPGs / Re: Laughing Scene from FFX on: September 16, 2009, 07:40:26 PM
Yeah so I was bored and looking for recent pictures of Jonathan Taylor Thomas and found this:

http://woodenspears.com/wp-content/uploads/2009/05/who-was-on-home-improvement-jonathan-taylor-thomas.jpg

It's like he looks EXACTLY like Wakka and Tidus.
Pages: 1 ... 435 436 [437] 438 439 ... 614


Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!