RSS iconTwitter iconFacebook icon

The Trek BBS title image

The Trek BBS statistics

Threads: 139,162
Posts: 5,402,505
Members: 24,751
Currently online: 583
Newest member: kaklina

TrekToday headlines

Retro Review: Time’s Orphan
By: Michelle on Aug 30

September-October Trek Conventions And Appearances
By: T'Bonz on Aug 29

Lee Passes
By: T'Bonz on Aug 29

Trek Merchandise Sale
By: T'Bonz on Aug 28

Star Trek #39 Villain Revealed
By: T'Bonz on Aug 28

Trek Big Bang Figures
By: T'Bonz on Aug 28

Star Trek Seekers Cover Art
By: T'Bonz on Aug 27

Fan Film Axanar Kickstarter Success
By: T'Bonz on Aug 27

Two New Starship Collection Ships
By: T'Bonz on Aug 26

Trek Actor Wins Emmy
By: T'Bonz on Aug 26


Welcome! The Trek BBS is the number one place to chat about Star Trek with like-minded fans. Please login to see our full range of forums as well as the ability to send and receive private messages, track your favourite topics and of course join in the discussions.

If you are a new visitor, join us for free. If you are an existing member please login below. Note: for members who joined under our old messageboard system, please login with your display name not your login name.


Go Back   The Trek BBS > Entertainment & Interests > Gaming

Gaming Non-Star Trek Gaming

Reply
 
Thread Tools
Old April 11 2011, 06:40 PM   #76
BlobVanDam
Fleet Captain
 
BlobVanDam's Avatar
 
Location: Australia
Send a message via Windows Live Messenger to BlobVanDam Send a message via Yahoo to BlobVanDam
Re: My Dungeon Game [work in progress]

Jadzia wrote: View Post
I'm making my own little game right now. A 2.5D platformer (actual 3D graphics, not 2D sprites), in a program called Unity, designed specifically for 3D games.
I've heard of Unity, but I've never looked at it. What language is it based upon/similar to? Is it a complete engine, or is it just a framework similar to XNA?

Good luck with your game. You'll have to show us some snapshots sometime.
Unity has 3 different programming languages. The main two are C#, and Javascript (it's not technically Javascript, but close enough). I use Javascript because it's easier.
I'm not really familiar with XNA, but I'd call Unity a pretty solid engine, rather than just a framework. I could try to explain its features, but wiki does it more justice that I could.
http://en.wikipedia.org/wiki/Unity3D
I plan to hopefully have a gameplay video up next month some time.
BlobVanDam is offline   Reply With Quote
Old April 11 2011, 11:30 PM   #77
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

Jadzia wrote: View Post
Robert Maxwell wrote: View Post
Wow, that sure reminds me of Gauntlet. Crazy swarming!
I have some adjustments to make to the monsters, because I don't like the O[n^2] collision detection I have at the moment. I may introduce spatial partitioning, but I have another idea I'd like to experiment with first.
My idea has worked, and collision detection has been reduced to O[n] because the monsters now select paths that won't collide with other monsters. They do this by calling dibs on a square on the map, so that other monsters don't go there. Diagonal paths made for a special case.

Also, I've changed the way monsters face when they are stationary, which is subtle.

__________________
.
Jadzia is offline   Reply With Quote
Old April 12 2011, 06:34 PM   #78
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

itisnotlogical wrote: View Post
I've decided to learn Python and eventually move up to PyGame. Seeing what you've accomplished has inspired me quite a bit. Good luck!
Jadzia wrote: View Post
The logic in games is almost always quite involved. You can rack your brain trying to work out what is needed, and making it fit nicely with the rest of your project.
Here is an example of a logic problem I've run into with my game, to give you an idea of what they look like. This evening I've written a routine which tests for missile-monster collisions. If one is detected, then we can go about killing the monster. Sounds simple, yes?

Monsters are in a list/array/class called unit[], which has various properties. And because the list of monsters in game could be very large, I've created a second list of on screen monsters in an array uonscr[].

Some commercial games use a similar setup, by having one list of units and one list of active units. For example, complicated AI scripts don't need to be run for all units in an FPS game when only 1% of them are in your vicinity. While in RTS games, a trigger may still need to refer to units removed from the playing field.

The way these two lists are linked is like this:

If unit i is on screen, then unit[i]->onscreenindex holds the index in the uonscr array corresponding to this unit.

Similarly, the j'th unit on screen is unit number uonscr[j]->unitindex.

The problem is this: If unit i is killed, how should these two lists be updated? Unit i may or may not be on screen.



As with many of these logic problems, I don't immediately know how to solve this. In time I will work it out, but it will require some thought. This is what game programming is mostly about.
__________________
.
Jadzia is offline   Reply With Quote
Old April 12 2011, 07:41 PM   #79
Robert Maxwell
Not Your Toy
 
Robert Maxwell's Avatar
 
Location: A broken roof
View Robert Maxwell's Twitter Profile Send a message via ICQ to Robert Maxwell Send a message via AIM to Robert Maxwell Send a message via Windows Live Messenger to Robert Maxwell Send a message via Yahoo to Robert Maxwell
Re: My Dungeon Game [work in progress]

Wouldn't this be a matter of keeping two lists of references? Either memory pointers or object references, but the basic idea is the same: there is a "master list" of the items, then an "active list," but both point to the same actual program entities, so if you kill one it should delete it from both lists. Or, rather than "delete" it, set a "killed" bit and just have a periodic cleanup function that runs every so many cycles to get rid of anything with a "killed" bit. That way, you'd not have any null pointer exceptions and be able to defer removing killed units while not having a lot of wasted cycles. I can't imagine "if not unit[i].killed" would chew up too many cycles versus actually dereferencing it in real-time.
Robert Maxwell is online now   Reply With Quote
Old April 12 2011, 08:15 PM   #80
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

Robert Maxwell wrote: View Post
Wouldn't this be a matter of keeping two lists of references? Either memory pointers or object references, but the basic idea is the same: there is a "master list" of the items, then an "active list," but both point to the same actual program entities
The unit[] array contains the actual program entities, so uonscr[]->unitindex points to it.

So if you kill one it should delete it from both lists.
That deletion involves rearranging both lists, which can create problems with the references then pointing to the wrong things... so the references need to be rearranged at the same time as the lists are rearranged. There's some kind of juggling that needs to be done to make sure the books stay straight, it's just a matter of working out exactly what and in what order.

.
__________________
.
Jadzia is offline   Reply With Quote
Old April 12 2011, 08:35 PM   #81
Robert Maxwell
Not Your Toy
 
Robert Maxwell's Avatar
 
Location: A broken roof
View Robert Maxwell's Twitter Profile Send a message via ICQ to Robert Maxwell Send a message via AIM to Robert Maxwell Send a message via Windows Live Messenger to Robert Maxwell Send a message via Yahoo to Robert Maxwell
Re: My Dungeon Game [work in progress]

Why do you need to "rearrange" the lists? Is order significant? I wouldn't think so, as long as every entity gets updated once per cycle. That's why I was suggesting you just have a way to mark the entity as "dead" and then have a scheduled cleanup.
Robert Maxwell is online now   Reply With Quote
Old April 12 2011, 08:54 PM   #82
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

If unit 6 is deleted, then what becomes of entry unit[6]? Do we

(A)shuffle a unit down to fill that gap? -- this is what I mean by rearranging the list.

(B)leave unit[6] blank? -- If a player stands by a generator for several hours blasting everything it spawns, then the unit array would grow without limit, consuming more and more memory, even though there are only a few units active in the game.

A scheduled cleanup would still involve manipulating the arrays. I don't see how it makes any difference whether we do that now or later, because this isn't a performance issue where cleanup needs a bucketing algorithm. It's a question of how cleanup affects the arrangement of the lists and references to objects in those lists.
__________________
.
Jadzia is offline   Reply With Quote
Old April 12 2011, 11:08 PM   #83
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

I've solved it. Here is an outline of how.



These array diagrams are my own invention, btw. I think they're useful for visualizing these types of logic problems.
__________________
.
Jadzia is offline   Reply With Quote
Old April 12 2011, 11:20 PM   #84
Robert Maxwell
Not Your Toy
 
Robert Maxwell's Avatar
 
Location: A broken roof
View Robert Maxwell's Twitter Profile Send a message via ICQ to Robert Maxwell Send a message via AIM to Robert Maxwell Send a message via Windows Live Messenger to Robert Maxwell Send a message via Yahoo to Robert Maxwell
Re: My Dungeon Game [work in progress]

Glad you got it figured out! Sorry I was no help.
Robert Maxwell is online now   Reply With Quote
Old April 12 2011, 11:36 PM   #85
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

Robert Maxwell wrote: View Post
Glad you got it figured out! Sorry I was no help.
You helped me to think through it, and now I understand the problem better from explaining it to you.
__________________
.
Jadzia is offline   Reply With Quote
Old April 13 2011, 07:07 AM   #86
Itisnotlogical
Commodore
 
Itisnotlogical's Avatar
 
Location: Shufflin', shufflin', shufflin'...
Re: My Dungeon Game [work in progress]

I haven't even started graphical games yet; I intend to learn some Python before I even think about downloading the PyGame module. Currently I'm working on a text-based interactive story called Four Nights. I'm probably going to have to scrap the programming a few times as I learn to take advantage of more and more features, but mostly how it works is that there's four nights until Christmas. Each night, you can either make a good choice or an evil choice and the ending will vary based on choices you made.

The problem I'm having, though, is that I want to keep each night in it's own separate little programming chunk (in Python, called a defined function or def-block). However, variables created in a def-block are essentially forgotten and unusable as soon as the block is finished. I think there's some sort of function where a def-block can return a value, I have to look in to that.
__________________
"Good grief. You guys sure know how to make something out of nothing. And then take sides about whether or not it's nothing, and then change your minds and discuss why you thought it was something." - Kestra
Itisnotlogical is offline   Reply With Quote
Old April 13 2011, 08:54 AM   #87
BlobVanDam
Fleet Captain
 
BlobVanDam's Avatar
 
Location: Australia
Send a message via Windows Live Messenger to BlobVanDam Send a message via Yahoo to BlobVanDam
Re: My Dungeon Game [work in progress]

Jadzia wrote: View Post
Robert Maxwell wrote: View Post
Glad you got it figured out! Sorry I was no help.
You helped me to think through it, and now I understand the problem better from explaining it to you.
I have that all the time. When I'm stuck on something, I'll just talk through it with someone online, and even though they won't understand a word of it, it helps me just to type it all out. Or sometimes I type it up as a forum post, but end up solving it before I post it just because the act of typing it out forced me to think through it more thoroughly. Strange how that works.
BlobVanDam is offline   Reply With Quote
Old April 13 2011, 01:36 PM   #88
Jadzia
on holiday
 
Location: England
Re: My Dungeon Game [work in progress]

BlobVanDam wrote: View Post
I have that all the time. When I'm stuck on something, I'll just talk through it with someone online, and even though they won't understand a word of it, it helps me just to type it all out. Or sometimes I type it up as a forum post, but end up solving it before I post it just because the act of typing it out forced me to think through it more thoroughly. Strange how that works.
Putting ideas into words forces us to organise our thoughts and apply method. Sometimes that's all that's needed.

But sometimes, we can't apply method because we don't know what method to use, and it is here where visualization and metacognition are more useful. That is

visualisation: drawing diagrams that detail the problem so we don't have to juggle it in our minds,

metacognition: exploring why your current train of thought has not solved the problem, and creating new trains of thought.
__________________
.
Jadzia is offline   Reply With Quote
Old April 18 2011, 09:39 PM   #89
ThunderAeroI
Rear Admiral
 
ThunderAeroI's Avatar
 
Location: Perpetually being chased by airplanes
Re: My Dungeon Game [work in progress]

When I have a programming problem I talk it over with someone who knows nothing about programming. Often times they ill provide the incite I need to solve the problem.
__________________
No Where to be found, but everywhere you are - I'll be there looking for ways to save your life.
ThunderAeroI is offline   Reply With Quote
Old April 18 2011, 09:40 PM   #90
Robert Maxwell
Not Your Toy
 
Robert Maxwell's Avatar
 
Location: A broken roof
View Robert Maxwell's Twitter Profile Send a message via ICQ to Robert Maxwell Send a message via AIM to Robert Maxwell Send a message via Windows Live Messenger to Robert Maxwell Send a message via Yahoo to Robert Maxwell
Re: My Dungeon Game [work in progress]

I've found that, too. Lay people have no prejudices as far as solving such problems, or they at least have different prejudices than a programmer typically does.
__________________
It's all false love and affection
I has a blag.
"You are one of the most unpleasant individuals I have encountered on this forum. I have no respect for you, and I doubt I ever will, since you keep insisting on being a complete and utter ass." - Timewalker
Robert Maxwell is online now   Reply With Quote
Reply

Bookmarks

Tags
games, programming

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 11:18 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
FireFox 2+ or Internet Explorer 7+ highly recommended.