Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => Casio PRIZM => Topic started by: Ashbad on September 01, 2011, 10:15:49 pm
-
So, I decided to finalize my choice for what I would do in the Prizm contest :P I was going to do pyyrix, but 30% a nasty bug hit and since I couldn't release the source (I would have to show at least 60% of it for someone to make sense of it) and after I realized I couldn't get it done in time, I decided last week to start another attempt: PrizmCity! :D
A full color SimCity1-like game where you are the mayor of a region and must build a city from scratch (like in SimCity, obviously :P). As with SimCity games, you can't build your own buildings (besides schools, police kiosks, landmarks/parks, etc.) but instead you zone them out into Residental, Industrial, and Commercial areas so that private builder will build in these areas.
The wealth of the buildings and residents entirely depends on how you plan you city though: you need to keep crime low, education and health high, environment pristine, utilities in check, transportation appropriate in certain city areas (low traffic in industrial and residential, high traffic in commercial), tourist attraction to bring business and wealth, and good laws/taxes/ordinances that aren't too strict yet still earn you money.
I should gave everything I just said ^above^ done by the contest due date (hopefully), and maybe afterwords I'll put in things like countries of joined regions, multiplayer region trading, disasters, designing custom terrain you city will be built on, and more.
Some screens (the in-game ones will probably be shown tomorrow):
(http://img.removedfromgame.com/imgs/TitleScreen.png)
(http://img.removedfromgame.com/imgs/AboutScreen.png)
(in case you didn't know, both backgrounds are of the Parque Central Twin Towers in Caracas, Venezuela :) I thought they showed a "city aura" well so I picked them for the job)
Also, this might possibly be the first thread out there for a Prizm contest entry :P and, in the about screen, it *says* open-sourced, and it will be open-sourced once the contest due date has passed (I can distribute it then)
-
Holy...
Those graphics are amazing *.*
-
O.O indeed! I hope you finish it though. That said nice job on the layout Ashy. Did you make the second screenshot graphics all yourself btw?
Sorry to hear about the Pyrix bug, though :(
-
Th graphics are real pics. :P
that said, it looks really nice. ;)
-
Sounds pretty promising. Don't forget the Prizm only have 65536 colors, you might want to downgrade these pics to 16 bit so it would be more realistic.
-
Sounds pretty promising. Don't forget the Prizm only have 65536 colors, you might want to downgrade these pics to 16 bit so it would be more realistic.
Actually, now that I have the menu fully working (title screen, cursor, about screen) I must remark you can barely tell the difference between the 24 bit versions and 16 bit versions :P I could only tell that one cloud looked blurrier. But to the sane person, it looks *amazing* even with only 2^16 colors :)
With that being said, yes I do have the main title screen elements working, and rather smoothly too. I messed with Kerm's PRGM_GetKey routine and was able to make sure that pressing keys won't go through the cursor options too fast or anything; in short, I have found a way to have Axe-Like GetKey responsiveness, whoever thought they went Casio BASIC speed was rather wrong (wrong about the custom GetKey routine that scans the buffer)
Got that done, and I already had some of the actual engine done (map generation) -- this is going very very well. Expect a very polished release on the due date. I went through 3 hours of coding just now to make a large set of custom Axe-Like routines, the Title Screen, and bug fixing tile generation so I'd say I'm moving rather fast. I should have some actual gameplay progress by sunday or labor day; tomorrow will be spent doing some of the spriting (probably roads, utilities, some more terrain objects, and zoning overlays)
:thumbsup:
-
Perhaps I should mention that I've been wanting a civilization type program for about the past three days. What a coincidence...
-
Perhaps I should mention that I've been wanting a civilization type program for about the past three days. What a coincidence...
:thumbsup: excellent! Just 14 more days! :P
-
Yeah the difference between 16 and 24 is hard to perceive with such pic. Heck you could even downgrade to 8 bits if you have a compression routine and save some space and it would probably not look too bad. On a side note can Paint convert to 16 bits color? ???
I'M glad some coding is done too. Also for Getkey I was actually confused the other day because Eiyeron seemed to have tried one routine after another and all seemed to run at BASIC speed. That scared the hell out of me, but finally it turned out he meant only one of the routines.
Good luck Ashy!
-
Thanks :) ATM I'm crazily working on it right now. I actually almost even have the structure done for the entire city (
50x50 60x60 cells, since each cell is a *highly condensed* structure that is ATM up to 15 14 (found an optimization to stack a certain attribute better) bytes big each -- I'm using a shitload of unions and non-limited enums to (even custom bit-width ints) to conserve every *bit* of every cell. Each bit is crucial and used very well)
^ hehe, t'was updating code while I wrote this
With the structure for the city done, I just need to plug it into my rudimentary lathe Save/Load thing and you can keep your progress safe in a single file :) though only one city at a time, since I'm not going to be able to have a whole searching-for-city-files thing done in time for the due date I'm sure.
Map generation is done, but needs to be polished. I still need to make sprites/tiles. And then the fun parts begin ^_^
EDIT: DJ, paint actually can't convert, but mkg3a and SourceCoder 2.5 can :) SC2.5 only accepts files up to 100MB, and the titlescreen/about screen were compressed many times in .png format and still were slightly too big; I actually had to process them in chunks :P
-
You forgot to make backups. <_<
But nice to hear and I'M glad mkg3a and SourceCoder can. Also 100MB? Shouldn't that be more than enough for any pic? 100 MB is like 100000x10000 bmp I think! O.O
Also by map generation do you mean maps are kinda randomized?
-
Oh yeah I meant 100KB :P
Yeah maps are somewhat randomized, not that much, but they are
Also, what do you mean about backups ??? I haven't lost any progress thus far and either way I still have it backed up
-
Ah I see, and I was kidding about backups. I was saying because I know some people still lose entire progress due to fried hard drives :P
-
Ah I see, and I was kidding about backups. I was saying because I know some people still lose entire progress due to fried hard drives :P
:P I think I'm one of the few people who have never (accidentally) lost progress with a RAM clear / HardDrive Error ;D
-
Yeah but it can actually happen to anyone. After all Calc84maniac said the same thing as you before I'm sure, then one day it happened. As of now I guess it's fine though. I just mean it would suck if on Sept 15th at 8 PM you suddenly lost everything you worked on plus about 700 GB of your questionable videos/images :P
-
Just the screenshots of the main menu's make me want to buy a Prizm. Looking awesome!
-
Ashbad, this seems like an ambitious project, the ideas you listed all seem neat, I hope you can make it before the deadline is over, unlike what happened in the Axe contest :S, good luck!
-
Thanks :)
And, only the most ambitious projects win in life. On a side note, this is still going much better than UCTI
-
yeah i think calc84maniac must've cried after losing his over 9000 projects <j/k>
good luck, and i want to buy the prizm now but the cx is more usefull >.<
-
finally some in-game stuff! :)
(http://img.removedfromgame.com/imgs/mapgeneration.png)
Here's a part of a map I "mocked-up" (I don't have a camera/videocam so I couldn't directly show a picture of the map generation I just got working so I pieced it together in paint using my Prizm as a reference -- It's actually just like in game though) showing one seed formula used to generate and the outcome. The black area is reserved for the future HUD. Basically, This one had a formula that squeezes all terrains into a map -- so that mountains, trees, grass, and sand/dirt are all very very close together. Parameters for seeding (you can actually input them to obtain prime results for your city's terrain!):
- Density, from 1 to 5. Basically, how close to put changes in tiles on the map. This generated map is set on 4
- Altitude, with "very low" to "very high" and an additional "varied" option. Basically, if a map is really high, it will have a lot of dirt/mountains, low ones have sand/water, medium ones have lots of grass, varied is.. varied. This map was on "varied"
- Climate, from "cold", "temperate", "normal", and "hot" -- cold means a lot of dirt mixed with grass, temperate means a lot trees growing, hot means lot of mix of sand and grass (basically affects how plant life grows), this map was on "temperate"
- Gradualism, from 1 to 3, basically tells how gradual to make the changes from one tile to the next (like Mountain -> Dirt -> grass) -- this map was on 2 (1 is low and 3 is high)
Next up will be simple statistics and utilities :)
-
Well, found some bugs with the generator :/ should be fixed by tomorrow, along with the addition of simple stats/utilities.
-
GOod luck.. I hope you do not encounter any nasty bug preventing a submission x.x
Btw those tiles looks kinda nice. You should maybe make the mountain borders lighter, though, to stay consistent with the overall style that lacks borders for the most part.
-
Map generating bugs nearly gone. Made a new random routine that really is rather random, but slow (I don't mind it though) so map generation is almost pitch perfect.
-
wow it looks quite nice! Keep it up so I can put it whenever I buy prizm! :D
-
This looks nice Ashbad, I hope you are able to complete a fairly playable demo by the deadline. Simcity is a pretty beastly project! O_o
I was also curious; what size tiles are you working with?
-
Wow... it looks nice...
I want prizm! Now?
O_o
-
This looks nice Ashbad, I hope you are able to complete a fairly playable demo by the deadline. Simcity is a pretty beastly project! O_o
I was also curious; what size tiles are you working with?
Thanks :D
only 16x16 tiles, and as you can tell pretty crappy ones (They're pretty much just placeholders for now, lol there's not even any border tiles yet)
-
Oh wow Ashbad. Can't wait to see this (I'm gonna buy a Prizm soon).
I do wish you finished UCTI because it looked AMAZING.
-
Thanks :D BUYAPRIZMBUYAPRIZMBUYAPRIZMBECAUSECISGREAT
I think I may release the source for UCTI tonight as well
EDIT: also got a preliminary HUD and a sweet map cursor working tonight
-
Nice!
-
Well, I got a preliminary HUD working, reduced the size of viewable playing field at a time (from 11x24 to 20x10 to make tons of room for the HUD), got a map cursor working, fixed a *very* fatal flaw in map generation, and a few other things :) I completely rewrote the map generation to fix the errors and I achieved 500 lines in one hour O.o
EDIT: even added those little quirky messages usually seen in SimCity games when setting up a new city like "Seeding Trees" or "Parsing Mountains" :3
-
This looks awesome, Ashbad. I really like how you're generating the maps. It's pretty cool. :D
Good luck!
-
Thank you :) so far I've put about 10 hours of coding at least into map generation, when I should be working on other things. To tell the truth, everything else is insignificant IMHO, because I've done city-type stuff before, but never map generation. Once map generation is immaculate (it's getting really really close, just a few problems with low density and high altitude), I'll move on. Right now, I'm writing yet another pass to the generator that adds more bodies of smooth water and grassy plains, and maybe a 4th pass:
1st pass -- simply using a bunch of mixed and pipelined algorithms, gets a general landscape setup with quite a few error spots
2nd pass -- cleans up error spots and smooths out terrain
3rd pass -- planned to add extra stuff like preset lakes
4th pass -- probably checking for impossible building situations
I'm also working on making the HUD even more functional, also by creating a custom set of text() and print() routines and a custom character set, and then finally "big buttons" seen in SimCity 3/4
-
Woaw, it looks really awesome !
Good luck !
/me is drooling
-
Thanks :) right now I'm getting rather annoyed because each time I try to debug a different setting of map generation, it takes a minute to generate. It's getting more time consuming to test than to write! XD
-
Well, finished all work concerning Map Generation. Things I did:
- reduced to a 2 pass system
- since generating lakes and islands and such didn't work well, it uses preset seeds in pass 2 to make them
- got rid of all junk generation
EDIT: on a side note... just noticed this:
http://img.removedfromgame.com/imgs/evil code.PNG (http://img.removedfromgame.com/imgs/evil code.PNG)
-
well after basking in the evilness above I have almost finished the HUD and... what do you think of the icons? :)
(http://img.removedfromgame.com/imgs/Icon_U.bmp) (http://img.removedfromgame.com/imgs/Icon_S.bmp)
-
Those icons look pretty nice! You might want to add some shadow in the second one if you want to match Casio's icons, though.
-
Well, my friend. Since we last talked I've added many dozens of KB into the size of the final binary (after compilation, of course), and I finally know where I'll stand with term of completion for the contest. I sadly can't get everything done in time, but I can promise:
- Beautiful Map generation (done)
- Wonderful graphics (done)
- A very simple yet chock-filled HUD (done)
- Simple zoning and utilities (almost done)
- Neural road system creation and detection (WIP)
- Approval ratings and very simple statistics (will likely be the last thing to get done in time)
Everything else will be updated while the polls take place. There will be constant update uploads and source code releases during the voting period, so if you'd rather wait until a more complete version is done to vote, just wait for about a week into voting. It should be very complete by then, and I would appreciate people waiting to try the extra features out before casting their thoughts into the system.
With that being said, the only known competitor of mine is z80man, who hasn't said much about his entry. He said he still is working on it, but like me, is unsure if he'll get it nearly done by the end. He didn't really announce what it was, but hinted publicly towards a Plants v. Zombies port. Good luck to z80man, shall our debut of skills provide a great learning experience for both of us :) be sure to consider voting for him too even though he didn't hype his up as much. I'm sure his entry will be very very good.
And in last thoughts, I won't be chatting much for the next three days. I'm literally coding my life away. I'm using my 30 minute long study-hall period, my 30 minute long lunch period, most of my comp. sci. Class time, and at least 5 hours when I get home each day just for this. If nothing else I want to do at least moderately well in this contest, to prove to myself I do know C much better than I think I do. And through this whole process of proving it, I've learned a lot about the Prizm's internal workings (which will help in later projects), and C in general. So this has helped :)
-
You said you're coding your life away but spent all this time writing a long post? O.O
/me votes we tempban both Ashbad and z80man until the deadline
jk
-
Hehe, you probably need to so I don't get distracted x_X
-
Or rate down any post made between Sept 13th 10:11 PM and Sept 16th 1:55 AM GMT-5 then rate them back up once the entry is submitted. J/k but Don't make the game way too big, though. Make sure you got a demo at least ready then add extra stuff if you have time.
-
Well, hopefully today ill get the preliminary zoning engine done, so no worries ;) then ill submit it to the contest application.
-
The entire source for the primary source file is available now! http://pastebin.com/6xMU2i2i
Full-length animated screeny coming soon
-
ash, how does this go about rendering its maps? it seemed to take a while for the PRIZM's fancy pants hardware, so i thought you must be doing something fancypants yourself and wanted to ask before looking at the source.
-
ash, how does this go about rendering its maps? it seemed to take a while for the PRIZM's fancy pants hardware, so i thought you must be doing something fancypants yourself and wanted to ask before looking at the source.
Well, it really isn't much. I just realized no matter how much I optimize the rendering process, it'll still be slow, since it's pretty simplistic:
void drawtilemap(city_cell*map, int xpos, int ypos) {
city_cell*cur_element = 0x00000000;
const char*tile = 0x00000000;
for(int j = 0; j < 10 ; j++) {
for(int i = 0; i < 20; i++) {
cur_element = access_map_element(map, xpos+i, ypos+j);
if(cur_element->occupied) {
switch(cur_element->occupied_type) {
case utility:
break;
case residential:
case commercial:
case industrial:
tile = ((cur_element->occupied_type-1)*512)+zoning_tiles;
break;
case school:
break;
case police:
break;
case firestation:
break;
case hospital:
break;
case road:
break;
case political:
break;
case park:
break;
case landmark:
break;
case ruins:
break;
}
} else {
switch(cur_element->natural_cell){
case grass:
tile = grass_tile;
break;
case water:
tile = water_tile;
break;
case dirt:
tile = dirt_tile;
break;
case sand:
tile = sand_tile;
break;
case tree:
tile = tree_tile;
break;
case mountain:
tile = mountain_tile;
break;
}
}
CopySprite(tile, i*16, j*16+56, 16, 16);
tile = 0x00000000;
}
}
}
What I did to make sure it runs fast is create an organized system of Renderloops controlled by a single one, and within the renderloops check to see if anything had to be done or changed; if not, do nothing. Also made sure that you couldn't do much at one single time within the renderloop, i.e. only one process at a time. The main helper here isn't that the rendering process is fancypants, but rather I just used good coding regimes :)