Creeper World 3D.... again

Started by Grun, April 02, 2013, 09:20:15 AM

Previous topic - Next topic

Grun

Written in C++ using openGL using 3dsMax for models and PS for textures.

Grun

MadMag

Wish I could have had time to learn 3dsMax better :/

Grun

Mad I know you amazing art skills, both map and 2d. Best bet is start with gmax. Think of models in 2d and draw with lines and extrude then just mess with vertecies. gmax has a lot less optitons so this should be quite easy with someone like you. Then take it from there.

Grun

Kingo

Hey grun, could we get a video update if its not too much to ask?

Grun

lol Kingo.....

Well what you want to see next in a vid and depending on how complex will put somthing together...

As for timescales.... well been very busy but should have a few hours over next few days so will see what I can do once I get ideas of what next.

Grun

Karsten75

Quote from: Kingo on July 04, 2013, 06:15:05 PM
Currently I've been trying to make Galaga (anyone here know what it is?) work in excel, it's actually doing good... I am a bit wet behind the ears in terms of general programming and its terms, but I am picking it up time to time :)

What programming language and/or API are you using?

Only one question: Why the heck would you program a game in Excel? I see posts of you all over the forum regarding your activities in this regard and it seems bizarre to say hte least. Performance should suck, the platform isn't suited and few people have Excel installed.

thepenguin

Quote from: Karsten75 on July 24, 2013, 09:38:08 AM
Only one question: Why the heck would you program a game in Excel? I see posts of you all over the forum regarding your activities in this regard and it seems bizarre to say hte least. Performance should suck, the platform isn't suited and few people have Excel installed.
Because he can.  It's also a very common platform to be operating off of.  It certainly is installed on more computers than something like unity or air (which these games are based in).  While not the most common of platforms, it is certainly more common than many others.

Also, I doubt that an excel spreadsheet gets worse performance than the atari that these games were first played on.
We have become the creeper...

Karsten75

Quote from: thepenguin on July 24, 2013, 10:01:44 AM
Quote from: Karsten75 on July 24, 2013, 09:38:08 AM
Only one question: Why the heck would you program a game in Excel? I see posts of you all over the forum regarding your activities in this regard and it seems bizarre to say hte least. Performance should suck, the platform isn't suited and few people have Excel installed.
Because he can.  It's also a very common platform to be operating off of.  It certainly is installed on more computers than something like unity or air (which these games are based in).  While not the most common of platforms, it is certainly more common than many others.

Also, I doubt that an excel spreadsheet gets worse performance than the atari that these games were first played on.

Kingo made you his spokesperson?

And as you should well know, you don't need to install anything on a computer (except the game) to run a Unity-based game.

Ronini

Although I can't speak for anyone else, I know that sometimes, you just need to do something immensely hard, inefficient and/or pointless, for no other reason than to prove that you can.

Kingo

#24
First of all, it's the only programming language I know of.
Second of all, I would like to do it as a challenge, and for experience.

And yes, I do know that performance on it is not too great, that is why I am trying to EMULATE it as best I can in excel.  
Admittedly you can download arcade game emulators that can run it at a good speed... but I want to program it in excel for the challenge and experience of it. It is possible, it just takes time and workarounds are needed often. I am doing it more for myself rather then to release the game, because a better version already exists, but it still is decent (for a game in excel suited to its caliber).

I believe, though, that this argument should have been taken to private messaging rather then this thread, as I know that Graunidad will be here as soon as I am done posting (as he seems to be all-knowing and all-seeing, lol) and threaten to lock this thread if we don't get back on topic.

thepenguin

Quote from: Karsten75 on July 24, 2013, 10:45:17 AM
And as you should well know, you don't need to install anything on a computer (except the game) to run a Unity-based game.
Unless it has browser-based content, in which case there is an install required.
We have become the creeper...

Grun

The actual language/platform etc. you use to create is not important when doing such for your own development/pleasure. From what I know about excell it is basicly visual basic (may be wrong) which is an objext orintated language. Once you get your head around OO and the advantages/problems from such the language it self is not as much of an issue. For example the main diffrence between say C++ and C# is the releasing of memory, the rest is pretty much sintax. The hardest part is looking at the logic, maths and physics and how to incorporate that into the OO structure you are using.

The odd thing is I think using excell/VB there is some advantages which is the ease of introcing complex equations which I imagine excell would be pretty efficent at (again may be wrong here)

With sim im making im looking at the pathfinding for packets and there requests. This is great example of the diffucltys with OO and this is same problem with all languages. The way it works is simply a method called A* (A star) which determins the route to take by looking at distance traveled between nodes and distance as crow flys to destination and then working both back and forward looking for which would be next shortest till it reachs destination (hard to explain in 1 sentance, google it if you want more detail).

Now I know there at least 1 person reading wanting to know how im planning (may change) this into my structure....

Well.... Each object when created will look for any objexts in radius X (not sure if to consider the Z axis) then from there adds a pointer to a list of all in range and then from that adding itself to the objects lists in that list so each link is referenced both ways.

From that we will know the source being the main hub/base and destination would be a call from the structure requireing a packet.

From there it gets quite complex reuireing either multiple lists with one list being visitied and one being available or a struct being created with a pointer to the object and a bool for used or not. Im thinking the latter with a struct with...

(baseObject object*, bool visited, baseObject* cameFrom) 

then working thorough each nearest not used step gets to destinationa and can use the cameFrom and repeat such till it gets to source adding each time to a list and you end up with a list of route to take. Then it about sending a packet at set speed along such route and updateing destination for such on arrival.

Now the hard part..... what happens if a object is destroyed along the route it would have taken???? well the object would be removed from game and then the pointer would be to nothing and cause a crash.... you could iterate through the list and remove any reference to such but that would be quite intesive if there a large number of objects on the map.... I have thought of a few ways for such but it quite messy so still thinking.....

Dam that was more than I intended to type :P

Grim

Kingo

#27
I don't believe there is a difference in improved performance of calculations..
The processor first has to cycle between all processes on the computer, then excel, and then the visual basic macro. It doesn't get its own process (since the VBA macro is not an application like Excel or Creeper World).
If the macros and excel in general ran faster, then it would probably be a decent (if not used often) API for programs (for novices who are either starting out with programming like me, for instance, to build their programming skills. I learned patience with bugfixing, for instance).

VBA is a lot simpler to learn with the Macro recording tool, anyways, and you can write functions knowing a small amount of the syntax to do many things since the screen is made of cells (column and row heights/widths can be adjusted to emulate a decent-looking screen made of pixels, except when you zoom or scroll excel takes a bit of time to render them out).
I don't believe the processing speed can be helped, though, but my computer is old, so I'm not sure if performance can be improved or not with a better computer.


it's more about the API you are using rather then the programming language most of the time... anyone can pick up a programming language, but to apply it to a game, you need to have an API, and fully understand it as well. Artwork is also quite important, as there is no game without artwork.

@Grun
Sounds interesting :) I understand your line of thought, quite a few times I've tried to write up  code for a function, then, when I realize it's too messy to fix and bugs keep popping up , I've had to delete it and start over, letting the problem simmer in my subconscious.

Grun

Yup Kingo,

That the point im at with A* just thinking the problem over.... I could introduce something that would work now but would create a lot of problems potentialy when I introduce the destruction or moving of objects.

As for where you at with programming and excel, sounds like you need to look at moving away from excel and look at VB, you mention you like using the screen made of cells being able to reference them by coloum and row.... well this is very very easy to create, would be something as simple as creating a 2 dimensional aray of a class called cell which then depending if each cell same size or not to draw just using the references from the array to draw. eg.. in excell you reference A3 this would be cell[0][2]. Thing is these cells can be anything, such as say creeper :) which each cell has a value it is above the terrain so things like cell[0][2]->addcreeper(10); as you can see it seems pretty easy :) as for how the addcreeper(10) works well again that easy enough, it simply takes the existing value of creeper at that cell and adds amount passed. So from that simple bit of code you have a simple reprensentation of what could be used as values for creeper over the whole map, then it just a case of drawing such which is a little more comlpex.

If you interested in learning more I would advise looking at http://nehe.gamedev.net/ which uses openGL and available in VB (although the info explain the code is in C++). This teachs you a lot about the graphics side. Go through some of that and look into openGL triangle strips and you would very quickly be able to create somthing similar to what I got so far excluding the 3d models and code structure.


Grun

thepenguin

Quote from: Grun on July 24, 2013, 08:12:15 PM
Now the hard part..... what happens if a object is destroyed along the route it would have taken???? well the object would be removed from game and then the pointer would be to nothing and cause a crash.... you could iterate through the list and remove any reference to such but that would be quite intesive if there a large number of objects on the map.... I have thought of a few ways for such but it quite messy so still thinking.....
If the pathfinding is an object method of the Unit object, when the unit is destroyed, the pathfinding logic also goes away.  Unless you mean one of the nodes you pathfind between, in which case a simple check for a null pointer should be able to fix it.  or, instead of removing the unit, you change it to a null unit, which can be evaluated, and the path discarded.
We have become the creeper...